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

Issue 12288041: It's not allowed to have an initializer for a final field that is initialized where it's declared. (Closed)

Created:
7 years, 10 months ago by ngeoffray
Modified:
7 years, 10 months ago
CC:
reviews_dartlang.org, kasperl
Visibility:
Public.

Description

It's not allowed to have an initializer for a final field that is initialized where it's declared. Committed: https://code.google.com/p/dart/source/detail?r=18672

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -13 lines) Patch
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 4 chunks +27 lines, -10 lines 0 comments Download
M tests/co19/co19-dart2js.status View 3 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ngeoffray
7 years, 10 months ago (2013-02-19 10:49:55 UTC) #1
ahe
LGTM except for the error message. I like that you're using the element rather than ...
7 years, 10 months ago (2013-02-19 10:58:10 UTC) #2
ngeoffray
Thanks Peter, PTAL. https://codereview.chromium.org/12288041/diff/1/sdk/lib/_internal/compiler/implementation/resolution/members.dart File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): https://codereview.chromium.org/12288041/diff/1/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode959 sdk/lib/_internal/compiler/implementation/resolution/members.dart:959: warning(initialized[field], MessageKind.ALREADY_INITIALIZED, On 2013/02/19 10:58:10, ahe ...
7 years, 10 months ago (2013-02-19 11:18:10 UTC) #3
ahe
7 years, 10 months ago (2013-02-19 11:46:06 UTC) #4
LGTM!

https://codereview.chromium.org/12288041/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right):

https://codereview.chromium.org/12288041/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/resolution/members.dart:963: Node
fieldNode = field.parseNode(visitor.compiler).asSendSet();
On 2013/02/19 11:18:10, ngeoffray wrote:
> On 2013/02/19 10:58:10, ahe wrote:
> > Why asSendSet?
> 
> Because that's how we know the field is initialized. Is there another node?

Sorry, I misread the code.

Powered by Google App Engine
This is Rietveld 408576698