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

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

Issue 1749753002: Fix bug when @protected is not on a class member (issue 25882) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 152b2661f8663c43dba0cf16fcd4439094e78d68..c32fb53e5b46d3f246b41c09bd1fd6ea08008e77 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -3552,6 +3552,21 @@ abstract class B implements A {
verify([source]);
}
+ void test_invalidUseOfProtectedMember_topLevelVariable() {
+ Source source = addSource(r'''
+import 'package:meta/meta.dart';
+@protected
+int x = 0;
+main() {
+ print(x);
+}''');
+ computeLibrarySourceErrors(source);
+ // TODO(brianwilkerson) This should produce a hint because the annotation is
+ // being applied to the wrong kind of declaration.
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_isDouble() {
AnalysisOptionsImpl options = new AnalysisOptionsImpl();
options.dart2jsHint = true;
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698