| Index: pkg/analyzer/test/generated/hint_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
|
| index fd3bf9d14e2c61a9496ebf342bae47d66225d04e..93ea7b340d16dbd44fe3fcd0bff55732f03d3b70 100644
|
| --- a/pkg/analyzer/test/generated/hint_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/hint_code_test.dart
|
| @@ -2499,10 +2499,10 @@ class C {
|
| verify([source]);
|
| }
|
|
|
| - test_strongMode_downCastCompositeNoHint() async {
|
| + test_strongMode_downCastCompositeHint() async {
|
| AnalysisOptionsImpl options = new AnalysisOptionsImpl();
|
| options.strongMode = true;
|
| - options.strongModeHints = false;
|
| + options.strongModeHints = true;
|
| resetWith(options: options);
|
| Source source = addSource(r'''
|
| main() {
|
| @@ -2511,14 +2511,14 @@ main() {
|
| print(list);
|
| }''');
|
| await computeAnalysisResult(source);
|
| - assertNoErrors(source);
|
| + assertErrors(source, [StrongModeCode.DOWN_CAST_COMPOSITE]);
|
| verify([source]);
|
| }
|
|
|
| - test_strongMode_downCastCompositeHint() async {
|
| + test_strongMode_downCastCompositeNoHint() async {
|
| AnalysisOptionsImpl options = new AnalysisOptionsImpl();
|
| options.strongMode = true;
|
| - options.strongModeHints = true;
|
| + options.strongModeHints = false;
|
| resetWith(options: options);
|
| Source source = addSource(r'''
|
| main() {
|
| @@ -2527,7 +2527,7 @@ main() {
|
| print(list);
|
| }''');
|
| await computeAnalysisResult(source);
|
| - assertErrors(source, [StrongModeCode.DOWN_CAST_COMPOSITE]);
|
| + assertNoErrors(source);
|
| verify([source]);
|
| }
|
|
|
| @@ -2554,6 +2554,20 @@ main() {
|
| verify([source]);
|
| }
|
|
|
| + test_strongMode_topLevelInstanceGetter() async {
|
| + resetWith(options: new AnalysisOptionsImpl()..strongMode = true);
|
| + Source source = addSource(r'''
|
| +class A {
|
| + int get g => 0;
|
| +}
|
| +var a = new A();
|
| +var b = a.g;
|
| +''');
|
| + await computeAnalysisResult(source);
|
| + assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
|
| + verify([source]);
|
| + }
|
| +
|
| test_typeCheck_type_is_Null() async {
|
| Source source = addSource(r'''
|
| m(i) {
|
|
|