| Index: compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
|
| diff --git a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
|
| index 433f8f940a298497ed042cea1745a2018ebd6dea..f0dc599147742f5e557a13f3b3f4d7eff4ae25f8 100644
|
| --- a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
|
| @@ -15,6 +15,7 @@ import com.google.dart.compiler.ast.DartBinaryExpression;
|
| import com.google.dart.compiler.ast.DartBooleanLiteral;
|
| import com.google.dart.compiler.ast.DartCase;
|
| import com.google.dart.compiler.ast.DartClass;
|
| +import com.google.dart.compiler.ast.DartConditional;
|
| import com.google.dart.compiler.ast.DartDeclaration;
|
| import com.google.dart.compiler.ast.DartDoubleLiteral;
|
| import com.google.dart.compiler.ast.DartExpression;
|
| @@ -279,9 +280,8 @@ public class CompileTimeConstantAnalyzer {
|
| checkMathExpression(x, lhs, rhs, lhsType, rhsType);
|
| break;
|
| case TRUNC:
|
| - reportExceptionIfZeroLiteral(x, rhs);
|
| - // pass-through
|
| case MOD:
|
| + reportExceptionIfZeroLiteral(x, rhs);
|
| if (checkNumber(lhs, lhsType) && checkNumber(rhs, rhsType)) {
|
| rememberInferredType(x, intType);
|
| }
|
| @@ -340,6 +340,12 @@ public class CompileTimeConstantAnalyzer {
|
| rememberInferredType(x, doubleType);
|
| return null;
|
| }
|
| +
|
| + @Override
|
| + public Void visitConditional(DartConditional node) {
|
| + expectedConstant(node);
|
| + return null;
|
| + }
|
|
|
| @Override
|
| public Void visitField(DartField x) {
|
|
|