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

Side by Side Diff: tests/language/src/ConstructorDuplicateInitializersTest.dart

Issue 9081001: Issue 991: Missing compiler errors for uninitialized final fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 // Check that initializers are not duplicated
5
6
7 class Class {
8 Class(var v)
9 : field_ = v
10 , field_ = 2 /// 01: compile-time error
ahe 2012/01/03 22:57:12 I suggest adding a comment above explaining what t
codefu 2012/01/04 15:18:49 Done.
11 ;
12 Class.field(this.field_)
13 : field_ = 2 /// 02: compile-time error
ahe 2012/01/03 22:57:12 Ditto.
codefu 2012/01/04 15:18:49 Done.
14 ;
15 final field_;
16 }
17
18 main() {
19 new Class(42);
20 new Class.field(42);
21 }
OLDNEW
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698