| 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.summary.summary_common; | 5 library analyzer.test.src.summary.summary_common; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/dart/scanner/reader.dart'; | 10 import 'package:analyzer/src/dart/scanner/reader.dart'; |
| (...skipping 4805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4816 | 4816 |
| 4817 test_function_inferred_type_implicit_return() { | 4817 test_function_inferred_type_implicit_return() { |
| 4818 UnlinkedExecutable f = serializeExecutableText('f() => null;'); | 4818 UnlinkedExecutable f = serializeExecutableText('f() => null;'); |
| 4819 expect(f.inferredReturnTypeSlot, 0); | 4819 expect(f.inferredReturnTypeSlot, 0); |
| 4820 } | 4820 } |
| 4821 | 4821 |
| 4822 test_generic_gClass_gMethodStatic() { | 4822 test_generic_gClass_gMethodStatic() { |
| 4823 UnlinkedClass cls = serializeClassText(''' | 4823 UnlinkedClass cls = serializeClassText(''' |
| 4824 class C<T, U> { | 4824 class C<T, U> { |
| 4825 static void m<V, W>(V v, W w) { | 4825 static void m<V, W>(V v, W w) { |
| 4826 void f<X, Y>(V v, W w, X x, Y y) { |
| 4827 } |
| 4826 } | 4828 } |
| 4827 } | 4829 } |
| 4828 '''); | 4830 '''); |
| 4829 List<UnlinkedParam> params = cls.executables[0].parameters; | 4831 UnlinkedExecutable m = cls.executables[0]; |
| 4830 checkParamTypeRef(params[0].type, 2); | 4832 UnlinkedExecutable f = m.localFunctions[0]; |
| 4831 checkParamTypeRef(params[1].type, 1); | 4833 checkParamTypeRef(m.parameters[0].type, 2); |
| 4834 checkParamTypeRef(m.parameters[1].type, 1); |
| 4835 checkParamTypeRef(f.parameters[0].type, 4); |
| 4836 checkParamTypeRef(f.parameters[1].type, 3); |
| 4837 checkParamTypeRef(f.parameters[2].type, 2); |
| 4838 checkParamTypeRef(f.parameters[3].type, 1); |
| 4832 } | 4839 } |
| 4833 | 4840 |
| 4834 test_generic_method_in_generic_class() { | 4841 test_generic_method_in_generic_class() { |
| 4835 UnlinkedClass cls = serializeClassText( | 4842 UnlinkedClass cls = serializeClassText( |
| 4836 'class C<T, U> { void m<V, W>(T t, U u, V v, W w) {} }'); | 4843 'class C<T, U> { void m<V, W>(T t, U u, V v, W w) {} }'); |
| 4837 List<UnlinkedParam> params = cls.executables[0].parameters; | 4844 List<UnlinkedParam> params = cls.executables[0].parameters; |
| 4838 checkParamTypeRef(params[0].type, 4); | 4845 checkParamTypeRef(params[0].type, 4); |
| 4839 checkParamTypeRef(params[1].type, 3); | 4846 checkParamTypeRef(params[1].type, 3); |
| 4840 checkParamTypeRef(params[2].type, 2); | 4847 checkParamTypeRef(params[2].type, 2); |
| 4841 checkParamTypeRef(params[3].type, 1); | 4848 checkParamTypeRef(params[3].type, 1); |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6706 final String absoluteUri; | 6713 final String absoluteUri; |
| 6707 final String relativeUri; | 6714 final String relativeUri; |
| 6708 final int numTypeParameters; | 6715 final int numTypeParameters; |
| 6709 | 6716 |
| 6710 _PrefixExpectation(this.kind, this.name, | 6717 _PrefixExpectation(this.kind, this.name, |
| 6711 {this.inLibraryDefiningUnit: false, | 6718 {this.inLibraryDefiningUnit: false, |
| 6712 this.absoluteUri, | 6719 this.absoluteUri, |
| 6713 this.relativeUri, | 6720 this.relativeUri, |
| 6714 this.numTypeParameters: 0}); | 6721 this.numTypeParameters: 0}); |
| 6715 } | 6722 } |
| OLD | NEW |