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

Unified Diff: pkg/analyzer/test/src/dart/analysis/driver_test.dart

Issue 2824873002: Fix cast exception when a Handle gets a wrong element because of name conflict. (Closed)
Patch Set: Created 3 years, 8 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/dart/analysis/driver_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 800f4c5f8bc2ef36c8619d2906868c41bcfa5fe4..4f3b2afd6e9bd4786f969a30d4fa53e4f05c9490 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -1428,6 +1428,20 @@ var V;
await driver.getResult(testFile);
}
+ test_getResult_nameConflict_local_typeInference() async {
+ String content = r'''
+typedef F();
+var F;
+F _ff() => null;
+var f = _ff(); // the inference must fail
+main() {
+ f();
+}
+''';
+ addTestFile(content);
+ await driver.getResult(testFile);
+ }
+
test_getResult_notDartFile() async {
var path = _p('/test/lib/test.txt');
provider.newFile(path, 'class A {}');
« 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