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

Unified Diff: pkg/analyzer/test/src/summary/linker_test.dart

Issue 2925663002: Support for implicitFunctionTypeIndices in CompilationUnitElementForLink.resolveTypeRef(). (Closed)
Patch Set: Remove commented out code. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/linker_test.dart
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index ec201eb58c428eecbe96bf024fef8f626e95ac49..01a6c44b747fb5b4327b83d3b8661a8eb8fe0849 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -351,6 +351,34 @@ var y = C.x;
'(D) → dynamic');
}
+ void test_inferredType_implicitFunctionTypeIndices() {
+ var bundle = createPackageBundle(
+ '''
+class A {
+ void foo(void bar(int arg)) {}
+}
+class B extends A {
+ void foo(bar) {}
+}
+''',
+ path: '/a.dart');
+ addBundle('/a.ds', bundle);
+ createLinker('''
+import 'a.dart';
+class C extends B {
+ void foo(bar) {}
+}
+''');
+ LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ library.libraryCycleForLink.ensureLinked();
+ ClassElementForLink_Class cls = library.getContainedName('C');
+ expect(cls.methods, hasLength(1));
+ MethodElementForLink foo = cls.methods[0];
+ expect(foo.parameters, hasLength(1));
+ FunctionType barType = foo.parameters[0].type;
+ expect(barType.parameters[0].type.toString(), 'int');
+ }
+
void test_inferredType_instanceField_conditional_genericFunctions() {
createLinker('''
class C {
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698