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

Issue 19802003: Report an error if a const constructor calls a non-const constructor. (Closed)

Created:
7 years, 5 months ago by ngeoffray
Modified:
7 years, 5 months ago
CC:
reviews_dartlang.org, Lasse Reichstein Nielsen, floitsch
Visibility:
Public.

Description

Report an error if a const constructor calls a non-const constructor. R=karlklose@google.com Committed: https://code.google.com/p/dart/source/detail?r=25206

Patch Set 1 : #

Total comments: 8

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -5 lines) Patch
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 4 chunks +9 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/warnings.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 chunk +0 lines, -1 line 0 comments Download
A tests/language/const_constructor_mixin2_test.dart View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
A tests/language/const_constructor_mixin3_test.dart View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M tests/language/const_constructor_mixin_test.dart View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M tests/language/language.status View 1 chunk +4 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
ngeoffray
7 years, 5 months ago (2013-07-19 11:54:01 UTC) #1
karlklose
LGTM.
7 years, 5 months ago (2013-07-19 11:57:32 UTC) #2
floitsch
DBC. https://codereview.chromium.org/19802003/diff/5001/tests/language/const_constructor_mixin2_test.dart File tests/language/const_constructor_mixin2_test.dart (right): https://codereview.chromium.org/19802003/diff/5001/tests/language/const_constructor_mixin2_test.dart#newcode18 tests/language/const_constructor_mixin2_test.dart:18: var a = const B(42); /// 01: compile-time ...
7 years, 5 months ago (2013-07-19 11:59:45 UTC) #3
ngeoffray
Thanks Karl and Florian. https://codereview.chromium.org/19802003/diff/5001/tests/language/const_constructor_mixin2_test.dart File tests/language/const_constructor_mixin2_test.dart (right): https://codereview.chromium.org/19802003/diff/5001/tests/language/const_constructor_mixin2_test.dart#newcode18 tests/language/const_constructor_mixin2_test.dart:18: var a = const B(42); ...
7 years, 5 months ago (2013-07-19 12:04:06 UTC) #4
ngeoffray
Committed patchset #3 manually as r25206 (presubmit successful).
7 years, 5 months ago (2013-07-19 12:05:43 UTC) #5
Lasse Reichstein Nielsen
DBC https://codereview.chromium.org/19802003/diff/5001/tests/language/const_constructor_mixin2_test.dart File tests/language/const_constructor_mixin2_test.dart (right): https://codereview.chromium.org/19802003/diff/5001/tests/language/const_constructor_mixin2_test.dart#newcode18 tests/language/const_constructor_mixin2_test.dart:18: var a = const B(42); /// 01: compile-time ...
7 years, 5 months ago (2013-07-19 12:19:54 UTC) #6
ngeoffray
7 years, 5 months ago (2013-07-19 12:39:40 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/19802003/diff/5001/tests/language/const_const...
File tests/language/const_constructor_mixin2_test.dart (right):

https://codereview.chromium.org/19802003/diff/5001/tests/language/const_const...
tests/language/const_constructor_mixin2_test.dart:18: var a = const B(42);  ///
01: compile-time error
On 2013/07/19 12:19:54, Lasse Reichstein Nielsen wrote:
> Actually, the error is in line 14, because super(foo) is not a const
> constructor.

What I like about Florian's suggestion is that the 'none' version of the
multitest runs with a const call.

Powered by Google App Engine
This is Rietveld 408576698