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

Unified Diff: tests/language/initializing_formal_type_test.dart

Issue 2141023002: Make initializing formal access available by default (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Additional clean-up, now ready to land Created 4 years, 1 month 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 | « tests/isolate/compile_time_error_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/initializing_formal_type_test.dart
diff --git a/tests/language/initializing_formal_type_test.dart b/tests/language/initializing_formal_type_test.dart
index 7544f9d7a28690bdaf3bd18e244432d4ddfbe92a..af4444481f44c8070642c7f1356d29ae3bcb7b3e 100644
--- a/tests/language/initializing_formal_type_test.dart
+++ b/tests/language/initializing_formal_type_test.dart
@@ -8,9 +8,14 @@
import "package:expect/expect.dart";
class A {
- int x;
- String y;
- A(this.x) : y = x { y = x; }
+ num x;
+ double y;
+ // Finding the type of an initializing formal: should cause a warning
+ // in the initializer but not the body, because the former has type
+ // `int` and the latter has type `num`.
+ A(int this.x) : y = x {
+ y = x;
+ }
}
main() {
« no previous file with comments | « tests/isolate/compile_time_error_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698