| 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/summary/format.dart'; | 6 import 'package:analyzer/src/summary/format.dart'; |
| 7 import 'package:analyzer/src/summary/link.dart'; | 7 import 'package:analyzer/src/summary/link.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
| 9 | 9 |
| 10 import '../../reflective_tests.dart'; | 10 import '../../reflective_tests.dart'; |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 expect(gTypeElement.implicitFunctionTypeIndices, [1]); | 580 expect(gTypeElement.implicitFunctionTypeIndices, [1]); |
| 581 ParameterElementForLink h = gTypeElement.parameters[3]; | 581 ParameterElementForLink h = gTypeElement.parameters[3]; |
| 582 FunctionType hType = h.type; | 582 FunctionType hType = h.type; |
| 583 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element; | 583 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element; |
| 584 expect(hTypeElement.implicitFunctionTypeIndices, [1, 3]); | 584 expect(hTypeElement.implicitFunctionTypeIndices, [1, 3]); |
| 585 } | 585 } |
| 586 | 586 |
| 587 void test_parameterParentElementForLink_innermostExecutable() { | 587 void test_parameterParentElementForLink_innermostExecutable() { |
| 588 createLinker('void f(void g(void h())) {}'); | 588 createLinker('void f(void g(void h())) {}'); |
| 589 TopLevelFunctionElementForLink f = testLibrary.getContainedName('f'); | 589 TopLevelFunctionElementForLink f = testLibrary.getContainedName('f'); |
| 590 expect(f.innermostExecutable, same(f)); | 590 expect(f.typeParameterContext, same(f)); |
| 591 ParameterElementForLink g = f.parameters[0]; | 591 ParameterElementForLink g = f.parameters[0]; |
| 592 FunctionType gType = g.type; | 592 FunctionType gType = g.type; |
| 593 FunctionElementForLink_FunctionTypedParam gTypeElement = gType.element; | 593 FunctionElementForLink_FunctionTypedParam gTypeElement = gType.element; |
| 594 expect(gTypeElement.innermostExecutable, same(f)); | 594 expect(gTypeElement.typeParameterContext, same(f)); |
| 595 ParameterElementForLink h = gTypeElement.parameters[0]; | 595 ParameterElementForLink h = gTypeElement.parameters[0]; |
| 596 FunctionType hType = h.type; | 596 FunctionType hType = h.type; |
| 597 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element; | 597 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element; |
| 598 expect(hTypeElement.innermostExecutable, same(f)); | 598 expect(hTypeElement.typeParameterContext, same(f)); |
| 599 } | 599 } |
| 600 } | 600 } |
| OLD | NEW |