| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.generated.strong_mode_test; | 5 library analyzer.test.generated.strong_mode_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| (...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1943 void test() { | 1943 void test() { |
| 1944 // | 1944 // |
| 1945 A ai; | 1945 A ai; |
| 1946 B bi; | 1946 B bi; |
| 1947 C ci; | 1947 C ci; |
| 1948 var aa = new A(); | 1948 var aa = new A(); |
| 1949 var bb = new B(); | 1949 var bb = new B(); |
| 1950 var cc = new C(); | 1950 var cc = new C(); |
| 1951 } | 1951 } |
| 1952 '''; | 1952 '''; |
| 1953 await resolveTestUnit(code); | 1953 await resolveTestUnit(code, noErrors: false); |
| 1954 expectIdentifierType('ai', "A<dynamic>"); | 1954 expectIdentifierType('ai', "A<dynamic>"); |
| 1955 expectIdentifierType('bi', "B<num>"); | 1955 expectIdentifierType('bi', "B<num>"); |
| 1956 expectIdentifierType('ci', "C<int, B<int>, B<dynamic>>"); | 1956 expectIdentifierType('ci', "C<int, B<int>, B<dynamic>>"); |
| 1957 expectIdentifierType('aa', "A<dynamic>"); | 1957 expectIdentifierType('aa', "A<dynamic>"); |
| 1958 expectIdentifierType('bb', "B<num>"); | 1958 expectIdentifierType('bb', "B<num>"); |
| 1959 expectIdentifierType('cc', "C<int, B<int>, B<dynamic>>"); | 1959 expectIdentifierType('cc', "C<int, B<int>, B<dynamic>>"); |
| 1960 } | 1960 } |
| 1961 | 1961 |
| 1962 test_objectMethodOnFunctions_Anonymous() async { | 1962 test_objectMethodOnFunctions_Anonymous() async { |
| 1963 String code = r''' | 1963 String code = r''' |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2412 main() { | 2412 main() { |
| 2413 var v = x; | 2413 var v = x; |
| 2414 v; // marker | 2414 v; // marker |
| 2415 } | 2415 } |
| 2416 int x = 3; | 2416 int x = 3; |
| 2417 '''; | 2417 '''; |
| 2418 await assertPropagatedAssignedType(code, typeProvider.intType, null); | 2418 await assertPropagatedAssignedType(code, typeProvider.intType, null); |
| 2419 await assertTypeOfMarkedExpression(code, typeProvider.intType, null); | 2419 await assertTypeOfMarkedExpression(code, typeProvider.intType, null); |
| 2420 } | 2420 } |
| 2421 } | 2421 } |
| OLD | NEW |