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

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

Issue 1672923002: restore inline JS builtin test (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2106dba5b3c11734082b4c4a04c12054d27f99b5..663ee78c3cde942090a4776e3015e8d81a952595 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -1629,8 +1629,18 @@ main() {
// TODO(jmesserly): we should change how this inference works.
// For now this test will cover what we use.
- // TODO(jmesserly): it looks like we lost our "infer JS builtin" test in
- // a bad merge. Restore it.
+ test('infer JS builtin', () {
+ checkFile('''
+ 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;
+ }
+ ''');
+ });
+
test('inferred generic instantiation', () {
checkFile('''
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698