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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java

Issue 55023003: Issue 14653. It is compile-time error to use unresolved identifier for annotation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index b901da3152211f48553ef7ca55f558432b18f96b..cf63ed6317fbf43443f1f2571d0e80ed50d6fc85 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -1858,6 +1858,34 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_invalidAnnotation_unresolved_identifier() throws Exception {
+ Source source = addSource(createSource(//
+ "@unresolved",
+ "main() {",
+ "}"));
+ resolve(source);
+ assertErrors(source, CompileTimeErrorCode.INVALID_ANNOTATION);
+ }
+
+ public void test_invalidAnnotation_unresolved_invocation() throws Exception {
+ Source source = addSource(createSource(//
+ "@Unresolved()",
+ "main() {",
+ "}"));
+ resolve(source);
+ assertErrors(source, CompileTimeErrorCode.INVALID_ANNOTATION);
+ }
+
+ public void test_invalidAnnotation_unresolved_prefixedIdentifier() throws Exception {
+ Source source = addSource(createSource(//
+ "import 'dart:math' as p;",
+ "@p.unresolved",
+ "main() {",
+ "}"));
+ resolve(source);
+ assertErrors(source, CompileTimeErrorCode.INVALID_ANNOTATION);
+ }
+
public void test_invalidConstructorName_notEnclosingClassName_defined() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698