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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 10910142: Issue 4988. Fixe for 'assert' statement vs function resolving (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for artificial 'assert' function name Created 8 years, 3 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/type/TypeAnalyzer.java ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index b03409596d6b11bde2265845346821a25e0c0df8..a6c47020b19ac7538eece7eb31b042b7b9b30027 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -1117,13 +1117,13 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
"");
assertErrors(
libraryResult.getErrors(),
+ errEx(ResolverErrorCode.CANNOT_RESOLVE_METHOD, 13, 3, 6),
+ errEx(ResolverErrorCode.CANNOT_BE_RESOLVED, 14, 3, 6),
errEx(TypeErrorCode.ASSERT_BOOL, 5, 10, 9),
errEx(TypeErrorCode.ASSERT_BOOL, 6, 10, 6),
errEx(TypeErrorCode.ASSERT_BOOL, 7, 10, 1),
errEx(TypeErrorCode.ASSERT_BOOL, 11, 10, 13),
errEx(TypeErrorCode.ASSERT_BOOL, 12, 10, 12),
- errEx(TypeErrorCode.ASSERT_NUMBER_ARGUMENTS, 13, 3, 19),
- errEx(TypeErrorCode.ASSERT_NUMBER_ARGUMENTS, 14, 3, 7),
errEx(TypeErrorCode.ASSERT_IS_STATEMENT, 16, 10, 12));
}
@@ -1150,6 +1150,21 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
"");
assertErrors(libraryResult.getErrors());
}
+
+ public void test_assert_asInheritedGetter() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " get assert() {}",
+ "}",
+ "class B extends A {",
+ " foo() {",
+ " assert;",
+ " }",
+ "}",
+ "");
+ assertErrors(libraryResult.getErrors());
+ }
/**
* <p>
« no previous file with comments | « compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698