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

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

Issue 1985063003: Add preliminary local function reference support to the AST summary linker. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 38838767ffd7480b17d673a9b2d95ed4b711e8d1..c492f2333ec532d3f61a8a72436a850d94b07cd8 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -150,6 +150,28 @@ const x = [const C()];
expect(classC.unnamedConstructor.isCycleFree, false);
}
+ void test_inferredType_closure_fromBundle() {
+ var bundle = createPackageBundle(
+ '''
+var x = () {};
+''',
+ path: '/a.dart');
+ addBundle(bundle);
+ createLinker('''
+import 'a.dart';
+var y = x;
+''');
+ LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ expect(
+ library
+ .getContainedName('y')
+ .asTypeInferenceNode
+ .variableElement
+ .inferredType
+ .toString(),
+ '() → dynamic');
+ }
+
void test_inferredType_instanceField_dynamic() {
createLinker('''
var x;
« 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