e7b3737b84
These tests don't have a lot of value right now - but will have more value as of the 2.11 release. I am also going to manually validate that they work if I bump the sdk version to 2.11. Bug:https://github.com/dart-lang/sdk/issues/43034 Change-Id: I7a86f5698ad4c8a0d17d4ae68ecb2143ef7b378f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160704 Auto-Submit: Jake Macdonald <jakemac@google.com> Reviewed-by: Leaf Petersen <leafp@google.com> Commit-Queue: Jake Macdonald <jakemac@google.com>
17 lines
570 B
Dart
17 lines
570 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// This version should opt out of null safety on all sdks after 2.9, regardless
|
|
// of the experiment flag.
|
|
// @dart = 2.9
|
|
// Requirements=nnbd-weak
|
|
|
|
void main() {
|
|
// This should be an error since we are opted out.
|
|
int? x;
|
|
// ^
|
|
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
|
|
// [cfe] Null safety features are disabled for this library.
|
|
}
|