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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1083093002: Don't permit annotations inside variable declarations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix a bogus comment. Created 5 years, 8 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: pkg/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 7b293a8103c308bbfc8ec1f7da8ce1b2351a850d..da6980435f283b9030a549a8697df9a540c04981 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -576,6 +576,23 @@ f() sync* {
verify([source]);
}
+ void test_bug_23176() {
+ Source source = addSource('''
+class A {
+ const A([x]);
+}
+class B {
+ dynamic @A(const A()) x;
+}
+''');
+ resolve(source);
+ assertErrors(source, [
+ ParserErrorCode.EXPECTED_CLASS_MEMBER,
+ ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
+ ]);
+ verify([source]);
+ }
+
void test_builtInIdentifierAsMixinName_classTypeAlias() {
Source source = addSource(r'''
class A {}

Powered by Google App Engine
This is Rietveld 408576698