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

Unified Diff: pkg/analyzer/test/src/task/strong/inferred_type_test.dart

Issue 1643033002: fixes #25610, infer JS builtin in strong mode like we used to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index d823b20b49e2c3a02b3b4282a5d0c75c06a6e924..a397c9e9a609d6e85aaa3b9c4ba2374220d6658a 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -1583,5 +1583,21 @@ main() {
}
'''
});
+
+ // TODO(jmesserly): we should change how this inference works.
+ // For now this test will cover what we use.
+ testChecker(
+ 'infer from RHS only if it wont conflict with overridden fields 2', {
+ '/main.dart': '''
+ import 'dart:_foreign_helper' show JS;
+ main() {
+ String x = /*severe:STATIC_TYPE_ERROR*/JS('int', '42');
+ var y = JS('String', '"hello"');
+ y = "world";
+ y = /*severe:STATIC_TYPE_ERROR*/42;
+ }
+ '''
+ });
+
});
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | pkg/analyzer/test/src/task/strong/strong_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698