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

Issue 10825140: Add check for duplicate field initialization (Closed)

Created:
8 years, 4 months ago by hausner
Modified:
8 years, 4 months ago
Reviewers:
regis
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add check for duplicate field initialization This change adds a check that reports duplicate initialization of instance fields. Fixes issues 921 and 1034. There were several tests in the language suite that had duplicate initializers for final instance fields. Corrected the tests. dart2js also contained duplicate initializations of a couple of final fields. Committed: https://code.google.com/p/dart/source/detail?r=10146

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -42 lines) Patch
M lib/compiler/implementation/universe.dart View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M runtime/vm/parser.h View 1 2 1 chunk +11 lines, -3 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 10 chunks +39 lines, -7 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M tests/language/compile_time_constant_d_test.dart View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tests/language/compile_time_constant_e_test.dart View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tests/language/compile_time_constant_f_test.dart View 1 2 3 chunks +1 line, -4 lines 0 comments Download
M tests/language/compile_time_constant_g_test.dart View 1 2 4 chunks +1 line, -5 lines 0 comments Download
M tests/language/compile_time_constant_h_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/language/compile_time_constant_i_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 2 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
hausner
8 years, 4 months ago (2012-08-01 20:47:37 UTC) #1
regis
LGTM, but you should add at least one negative test verifying that duplicate field initialization ...
8 years, 4 months ago (2012-08-01 21:58:03 UTC) #2
hausner
Thanks for the review. We have several negative tests in co19. They now all pass, ...
8 years, 4 months ago (2012-08-01 22:23:14 UTC) #3
ahe
8 years, 4 months ago (2012-08-02 17:10:35 UTC) #4
Hi Matthias,

Thank you for fixing the bug in dart2js!

Cheers,
Peter

Powered by Google App Engine
This is Rietveld 408576698