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

Issue 9875002: Remove error message when compile time constants used in +,-,/,* expressions (Closed)

Created:
8 years, 9 months ago by zundel
Modified:
8 years, 9 months ago
Reviewers:
scheglov
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Remove error message when compile time constants used in +,-,/,* expressions The type of sub expressions was computed to be 'number' for integer math expressions. This caused an inappropriate error message 'Not a compile time constant, expected int, got num' Committed: https://code.google.com/p/dart/source/detail?r=5939

Patch Set 1 : Added another test case #

Total comments: 1

Patch Set 2 : Added test mixing int and doubles #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -3 lines) Patch
M compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java View 1 2 chunks +23 lines, -3 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java View 1 1 chunk +120 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
zundel
I found this bug when trying to analyze a performance test.
8 years, 9 months ago (2012-03-27 22:22:25 UTC) #1
scheglov
LGTM https://chromiumcodereview.appspot.com/9875002/diff/2001/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java File compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java (right): https://chromiumcodereview.appspot.com/9875002/diff/2001/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java#newcode572 compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java:572: public void testParenthizedMathExpressions3() { Do we want to ...
8 years, 9 months ago (2012-03-27 22:39:21 UTC) #2
zundel
On 2012/03/27 22:39:21, scheglov wrote: > LGTM > > https://chromiumcodereview.appspot.com/9875002/diff/2001/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java > File > compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java > ...
8 years, 9 months ago (2012-03-28 15:35:14 UTC) #3
scheglov
8 years, 9 months ago (2012-03-28 16:35:57 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698