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

Unified Diff: test/checker/inferred_type_test.dart

Issue 1180513002: fix #214, check type of inferred initializing formal with default value (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
Index: test/checker/inferred_type_test.dart
diff --git a/test/checker/inferred_type_test.dart b/test/checker/inferred_type_test.dart
index be7a158a837ad143c6ccbe10c00a720cb45309ee..28373e9b9c14a0c7242c67c58a1a7cb3bf0cfa5d 100644
--- a/test/checker/inferred_type_test.dart
+++ b/test/checker/inferred_type_test.dart
@@ -1515,4 +1515,12 @@ void main() {
'''
}, inferDownwards: true);
});
+
+ test('inferred initializing formal checks default value', () => testChecker({
+ '/main.dart': '''
+ class Foo {
+ var x = 1;
+ Foo([this.x = /*severe:StaticTypeError*/"1"]);
+ }'''
+ }));
}

Powered by Google App Engine
This is Rietveld 408576698