| 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 import 'package:analyzer/dart/element/type.dart'; | 5 import 'package:analyzer/dart/element/type.dart'; |
| 6 import 'package:analyzer/src/dart/element/element.dart'; | 6 import 'package:analyzer/src/dart/element/element.dart'; |
| 7 import 'package:analyzer/src/summary/format.dart'; | 7 import 'package:analyzer/src/summary/format.dart'; |
| 8 import 'package:analyzer/src/summary/idl.dart'; | 8 import 'package:analyzer/src/summary/idl.dart'; |
| 9 import 'package:analyzer/src/summary/link.dart'; | 9 import 'package:analyzer/src/summary/link.dart'; |
| 10 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 addBundle('/a.ds', bundle); | 779 addBundle('/a.ds', bundle); |
| 780 createLinker(''' | 780 createLinker(''' |
| 781 import 'a.dart'; | 781 import 'a.dart'; |
| 782 var y = x; | 782 var y = x; |
| 783 '''); | 783 '''); |
| 784 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); | 784 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); |
| 785 expect(_getVariable(library.getContainedName('y')).inferredType.toString(), | 785 expect(_getVariable(library.getContainedName('y')).inferredType.toString(), |
| 786 'dynamic'); | 786 'dynamic'); |
| 787 } | 787 } |
| 788 | 788 |
| 789 @failingTest | |
| 790 void test_methodCall_withTypeArguments_topLevelVariable() { | |
| 791 // The following code is incorrect but it shouldn't crash analyzer. | |
| 792 // TODO(paulberry): fix this. | |
| 793 createLinker('var f = f/*<int>*/();'); | |
| 794 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); | |
| 795 library.libraryCycleForLink.ensureLinked(); | |
| 796 } | |
| 797 | |
| 798 void test_multiplyInheritedExecutable_differentSignatures() { | 789 void test_multiplyInheritedExecutable_differentSignatures() { |
| 799 createLinker(''' | 790 createLinker(''' |
| 800 class B { | 791 class B { |
| 801 void f() {} | 792 void f() {} |
| 802 } | 793 } |
| 803 abstract class I { | 794 abstract class I { |
| 804 f(); | 795 f(); |
| 805 } | 796 } |
| 806 class C extends B with I {} | 797 class C extends B with I {} |
| 807 class D extends C { | 798 class D extends C { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 */ | 935 */ |
| 945 EntityRef _lookupInferredType(LinkedUnit unit, int slot) { | 936 EntityRef _lookupInferredType(LinkedUnit unit, int slot) { |
| 946 for (EntityRef ref in unit.types) { | 937 for (EntityRef ref in unit.types) { |
| 947 if (ref.slot == slot) { | 938 if (ref.slot == slot) { |
| 948 return ref; | 939 return ref; |
| 949 } | 940 } |
| 950 } | 941 } |
| 951 return null; | 942 return null; |
| 952 } | 943 } |
| 953 } | 944 } |
| OLD | NEW |