| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.test.src.task.strong.checker_test; | 5 library analyzer.test.src.task.strong.checker_test; |
| 6 | 6 |
| 7 import '../../../reflective_tests.dart'; | 7 import '../../../reflective_tests.dart'; |
| 8 import 'strong_test_helper.dart'; | 8 import 'strong_test_helper.dart'; |
| 9 | 9 |
| 10 void main() { | 10 void main() { |
| (...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 class Child extends helper.Base { | 3007 class Child extends helper.Base { |
| 3008 /*error:INVALID_FIELD_OVERRIDE*/var f1; | 3008 /*error:INVALID_FIELD_OVERRIDE*/var f1; |
| 3009 var _f2; | 3009 var _f2; |
| 3010 var _f4; | 3010 var _f4; |
| 3011 | 3011 |
| 3012 String _m1() => null; | 3012 String _m1() => null; |
| 3013 } | 3013 } |
| 3014 '''); | 3014 '''); |
| 3015 } | 3015 } |
| 3016 | 3016 |
| 3017 void test_proxy() { |
| 3018 checkFile(r''' |
| 3019 @proxy class C {} |
| 3020 @proxy class F implements Function { noSuchMethod(i) => 42; } |
| 3021 |
| 3022 m() { |
| 3023 C c = new C(); |
| 3024 /*info:DYNAMIC_INVOKE*/c.m(); |
| 3025 /*info:DYNAMIC_INVOKE*/c.m; |
| 3026 /*info:DYNAMIC_INVOKE*/-c; |
| 3027 /*info:DYNAMIC_INVOKE*/c + 7; |
| 3028 /*info:DYNAMIC_INVOKE*/c[7]; |
| 3029 /*error:INVOCATION_OF_NON_FUNCTION,info:DYNAMIC_INVOKE*/c(); |
| 3030 |
| 3031 F f = new F(); |
| 3032 /*info:DYNAMIC_INVOKE*/f(); |
| 3033 } |
| 3034 '''); |
| 3035 } |
| 3036 |
| 3017 void test_redirectingConstructor() { | 3037 void test_redirectingConstructor() { |
| 3018 checkFile(''' | 3038 checkFile(''' |
| 3019 class A { | 3039 class A { |
| 3020 A(A x) {} | 3040 A(A x) {} |
| 3021 A.two() : this(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3); | 3041 A.two() : this(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3); |
| 3022 } | 3042 } |
| 3023 '''); | 3043 '''); |
| 3024 } | 3044 } |
| 3025 | 3045 |
| 3026 void test_relaxedCasts() { | 3046 void test_relaxedCasts() { |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3660 // Regression test for https://github.com/dart-lang/sdk/issues/25069 | 3680 // Regression test for https://github.com/dart-lang/sdk/issues/25069 |
| 3661 checkFile(''' | 3681 checkFile(''' |
| 3662 typedef int Foo(); | 3682 typedef int Foo(); |
| 3663 void foo() {} | 3683 void foo() {} |
| 3664 void main () { | 3684 void main () { |
| 3665 Foo x = /*error:INVALID_ASSIGNMENT,info:USE_OF_VOID_RESULT*/foo(); | 3685 Foo x = /*error:INVALID_ASSIGNMENT,info:USE_OF_VOID_RESULT*/foo(); |
| 3666 } | 3686 } |
| 3667 '''); | 3687 '''); |
| 3668 } | 3688 } |
| 3669 } | 3689 } |
| OLD | NEW |