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

Issue 8921009: frog: check that const constructors have potentially const initializers. Also (Closed)

Created:
9 years ago by Siggi Cherem (dart-lang)
Modified:
9 years ago
Reviewers:
jimhug
CC:
reviews_dartlang.org
Visibility:
Public.

Description

frog: check that const constructors have potentially const initializers. Also check that const objects don't have non-final fields (this makes ConstConstructorNegativeTest fail for the right reasons) Committed: https://code.google.com/p/dart/source/detail?r=2347

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -5 lines) Patch
M frog/member.dart View 2 chunks +12 lines, -3 lines 2 comments Download
M frog/minfrog View 2 chunks +10 lines, -2 lines 0 comments Download
M tests/language/language.status View 2 chunks +2 lines, -0 lines 2 comments Download
A tests/language/src/ConstInit6NegativeTest.dart View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Siggi Cherem (dart-lang)
addressing BUG http://code.google.com/p/dart/issues/detail?id=777 http://codereview.chromium.org/8921009/diff/1/tests/language/language.status File tests/language/language.status (right): http://codereview.chromium.org/8921009/diff/1/tests/language/language.status#newcode97 tests/language/language.status:97: ConstInit5NegativeTest: Pass # Should fail at ...
9 years ago (2011-12-12 18:04:37 UTC) #1
jimhug
LGTM Nice fix and extension of the test suite all together! http://codereview.chromium.org/8921009/diff/1/frog/member.dart File frog/member.dart (right): ...
9 years ago (2011-12-12 18:14:30 UTC) #2
Siggi Cherem (dart-lang)
9 years ago (2011-12-12 18:20:55 UTC) #3
http://codereview.chromium.org/8921009/diff/1/frog/member.dart
File frog/member.dart (right):

http://codereview.chromium.org/8921009/diff/1/frog/member.dart#newcode1148
frog/member.dart:1148: assign.y.span);
On 2011/12/12 18:14:30, jimhug wrote:
> Could this be val.span instead?  It doesn't really matter right now, I'm just
> thinking a little ahead to richer Values and more analysis with them.

For some reason in this case they are not the same - we need to look more into
it. In the new test, assing.y.span is the whole expression "1.toString()", but
val.span is just the method call portion ("toString").

Powered by Google App Engine
This is Rietveld 408576698