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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1780783002: Don't report redundant type errors in strong mode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/src/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index 599485d4bbe3c89a59dd1c1f6c17326465a70cff..28d59058feff5e1a10cf87d3cff7d98a059bc387 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -4760,10 +4760,9 @@ void main() {
AnalysisTarget source = newSource(
'/test.dart',
'''
-int topLevel = 3;
-class C {
- String field = topLevel;
-}
+class A {}
+class B extends A {}
+B b = new A();
''');
computeResult(new LibrarySpecificUnit(source, source), STRONG_MODE_ERRORS);
// validate

Powered by Google App Engine
This is Rietveld 408576698