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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 1156583005: Fix isAssignableTo in VM mirrors to use subtype (<:) rather than moreSpecificThan (<<). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: + dart2js status Created 5 years, 6 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 | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_impl.dart
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 634d2731c1f1ba2098aaa58feb81f82f23dfd35b..2e55bfd844d1d2d303e33c017d11090abcd0089a 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -75,9 +75,6 @@ List _metadata(reflectee)
bool _subtypeTest(Type a, Type b)
native 'TypeMirror_subtypeTest';
-bool _moreSpecificTest(Type a, Type b)
- native 'TypeMirror_moreSpecificTest';
-
class _AccessorCacheAssociation {
String key;
Function value;
@@ -878,8 +875,8 @@ class _LocalClassMirror extends _LocalObjectMirror
bool isAssignableTo(TypeMirror other) {
if (other == currentMirrorSystem().dynamicType) return true;
if (other == currentMirrorSystem().voidType) return false;
- return _moreSpecificTest(_reflectedType, other._reflectedType)
- || _moreSpecificTest(other._reflectedType, _reflectedType);
+ return _subtypeTest(_reflectedType, other._reflectedType)
+ || _subtypeTest(other._reflectedType, _reflectedType);
}
bool isSubclassOf(ClassMirror other) {
@@ -1093,8 +1090,8 @@ class _LocalTypeVariableMirror extends _LocalDeclarationMirror
bool isAssignableTo(TypeMirror other) {
if (other == currentMirrorSystem().dynamicType) return true;
if (other == currentMirrorSystem().voidType) return false;
- return _moreSpecificTest(_reflectedType, other._reflectedType)
- || _moreSpecificTest(other._reflectedType, _reflectedType);
+ return _subtypeTest(_reflectedType, other._reflectedType)
+ || _subtypeTest(other._reflectedType, _reflectedType);
}
static DeclarationMirror _TypeVariableMirror_owner(reflectee)
@@ -1198,8 +1195,8 @@ class _LocalTypedefMirror extends _LocalDeclarationMirror
bool isAssignableTo(TypeMirror other) {
if (other == currentMirrorSystem().dynamicType) return true;
if (other == currentMirrorSystem().voidType) return false;
- return _moreSpecificTest(_reflectedType, other._reflectedType)
- || _moreSpecificTest(other._reflectedType, _reflectedType);
+ return _subtypeTest(_reflectedType, other._reflectedType)
+ || _subtypeTest(other._reflectedType, _reflectedType);
}
static _nativeReferent(reflectedType)
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698