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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java

Issue 11189104: Issue 6087. Use getRealTarget() for DartPropertyAccess in const analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
index 5b2d316612be923e78b5bc40d416f70d736616b1..765bab7de4d1848ef30b2a5e291bb40ca593eadd 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
@@ -247,6 +247,21 @@ public class CompileTimeConstantTest extends ResolverTestCase {
errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 21, 1));
}
+ public void test_cascade() {
+ resolveAndTestCtConstExpectErrors(
+ Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "main() {",
+ " var v;",
+ " const c = v..foo;",
+ "}",
+ "class Object {}",
+ "class int {}",
+ ""),
+ errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 12, 1),
+ errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 13, 5));
+ }
+
public void test_stringInterpolation_referenceConstVar_String() {
resolveAndTestCtConstExpectErrors(Joiner.on("\n").join(
"// filler filler filler filler filler filler filler filler filler filler",
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698