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

Unified Diff: tests/language/constructor_duplicate_initializers_test.dart

Issue 10834327: Produce error when duplicate field initializers are found (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: == -> ===, improved test, removed unnecessary "defensive" null checks Created 8 years, 4 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 | « tests/co19/co19-leg.status ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/constructor_duplicate_initializers_test.dart
diff --git a/tests/language/constructor_duplicate_initializers_test.dart b/tests/language/constructor_duplicate_initializers_test.dart
index ab9a0994fcd091d91787278deb5986d6f531d036..df64c5f3d198c97462bff14c0df3a3d12cee5a59 100644
--- a/tests/language/constructor_duplicate_initializers_test.dart
+++ b/tests/language/constructor_duplicate_initializers_test.dart
@@ -15,10 +15,17 @@ class Class {
// formals and initializer list.
: field_ = 2 /// 02: compile-time error
;
+ // Test against duplicate final field initialization in initializing formals.
+ Class.two_fields(this.field_
+ , this.field_ /// 03: compile-time error
+ );
final field_;
}
main() {
new Class(42);
new Class.field(42);
+ new Class.two_fields(42
+ , 42 /// 03: continued
+ );
}
« no previous file with comments | « tests/co19/co19-leg.status ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698