Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: pkg/analyzer/test/src/dart/element/element_test.dart

Issue 2997333002: Deprecate MethodElement.getReifiedType (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/member.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 analyzer.test.src.dart.element.element_test; 5 library analyzer.test.src.dart.element.element_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/constant/value.dart'; 8 import 'package:analyzer/dart/constant/value.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 3911 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 // prepare CompilationUnitElement 3922 // prepare CompilationUnitElement
3923 LibraryElement libraryElement = context.computeLibraryElement(source); 3923 LibraryElement libraryElement = context.computeLibraryElement(source);
3924 CompilationUnitElement unitElement = libraryElement.definingCompilationUnit; 3924 CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
3925 DartType objectType = _typeProvider.objectType; 3925 DartType objectType = _typeProvider.objectType;
3926 // B.f 3926 // B.f
3927 ClassElement elementB = unitElement.getType("B"); 3927 ClassElement elementB = unitElement.getType("B");
3928 MethodElement BfElement = elementB.type 3928 MethodElement BfElement = elementB.type
3929 .lookUpInheritedMethod("f", library: libraryElement, thisType: true); 3929 .lookUpInheritedMethod("f", library: libraryElement, thisType: true);
3930 MethodElement AfElement = elementB.type 3930 MethodElement AfElement = elementB.type
3931 .lookUpInheritedMethod("f", library: libraryElement, thisType: false); 3931 .lookUpInheritedMethod("f", library: libraryElement, thisType: false);
3932 expect(BfElement.getReifiedType(objectType), 3932 expect(
3933 equals(AfElement.getReifiedType(objectType))); 3933 BfElement.getReifiedType(objectType), // ignore: deprecated_member_use
3934 equals(AfElement
3935 .getReifiedType(objectType))); // ignore: deprecated_member_use
3934 } 3936 }
3935 } 3937 }
3936 3938
3937 @reflectiveTest 3939 @reflectiveTest
3938 class MultiplyDefinedElementImplTest extends EngineTestCase { 3940 class MultiplyDefinedElementImplTest extends EngineTestCase {
3939 void test_fromElements_conflicting() { 3941 void test_fromElements_conflicting() {
3940 TopLevelVariableElement firstElement = 3942 TopLevelVariableElement firstElement =
3941 ElementFactory.topLevelVariableElement2('xx'); 3943 ElementFactory.topLevelVariableElement2('xx');
3942 TopLevelVariableElement secondElement = 3944 TopLevelVariableElement secondElement =
3943 ElementFactory.topLevelVariableElement2('yy'); 3945 ElementFactory.topLevelVariableElement2('yy');
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
4355 } 4357 }
4356 4358
4357 class _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction 4359 class _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction
4358 extends InterfaceTypeImpl { 4360 extends InterfaceTypeImpl {
4359 _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction(ClassElement arg0) 4361 _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction(ClassElement arg0)
4360 : super(arg0); 4362 : super(arg0);
4361 4363
4362 @override 4364 @override
4363 bool get isDartCoreFunction => true; 4365 bool get isDartCoreFunction => true;
4364 } 4366 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/member.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698