OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 engine.non_error_resolver_test; | 5 library engine.non_error_resolver_test; |
6 | 6 |
7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; | 10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 Source source = addSource(r''' | 926 Source source = addSource(r''' |
927 class A { | 927 class A { |
928 static x() {} | 928 static x() {} |
929 static set x(int p) {} | 929 static set x(int p) {} |
930 }'''); | 930 }'''); |
931 resolve(source); | 931 resolve(source); |
932 assertNoErrors(source); | 932 assertNoErrors(source); |
933 verify([source]); | 933 verify([source]); |
934 } | 934 } |
935 | 935 |
| 936 void test_const_dynamic() { |
| 937 Source source = addSource(''' |
| 938 const Type d = dynamic; |
| 939 '''); |
| 940 resolve(source); |
| 941 assertNoErrors(source); |
| 942 verify([source]); |
| 943 } |
| 944 |
936 void test_constConstructorWithNonConstSuper_explicit() { | 945 void test_constConstructorWithNonConstSuper_explicit() { |
937 Source source = addSource(r''' | 946 Source source = addSource(r''' |
938 class A { | 947 class A { |
939 const A(); | 948 const A(); |
940 } | 949 } |
941 class B extends A { | 950 class B extends A { |
942 const B(): super(); | 951 const B(): super(); |
943 }'''); | 952 }'''); |
944 resolve(source); | 953 resolve(source); |
945 assertNoErrors(source); | 954 assertNoErrors(source); |
(...skipping 4436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5382 resolve(source); | 5391 resolve(source); |
5383 assertNoErrors(source); | 5392 assertNoErrors(source); |
5384 verify([source]); | 5393 verify([source]); |
5385 reset(); | 5394 reset(); |
5386 } | 5395 } |
5387 | 5396 |
5388 void _check_wrongNumberOfParametersForOperator1(String name) { | 5397 void _check_wrongNumberOfParametersForOperator1(String name) { |
5389 _check_wrongNumberOfParametersForOperator(name, "a"); | 5398 _check_wrongNumberOfParametersForOperator(name, "a"); |
5390 } | 5399 } |
5391 } | 5400 } |
OLD | NEW |