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

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 1346923007: allow dart:* libs to implement otherwise disallowed types (e.g. int) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 89db77bf8ffc4e6aaf889bc6d63d2e49cc6a9220..a165b228ef78833a01d42067f355fe5b85e219f5 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -3199,6 +3199,11 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
if (typeName.isSynthetic) {
return false;
}
+ // The SDK implementation may implement disallowed types. For example,
+ // JSNumber in dart2js and _Smi in Dart VM both implement int.
+ if (_currentLibrary.source.isInSystemLibrary) {
+ return false;
+ }
DartType superType = typeName.type;
for (InterfaceType disallowedType
in _DISALLOWED_TYPES_TO_EXTEND_OR_IMPLEMENT) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698