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

Unified Diff: runtime/vm/object.cc

Issue 8393033: Fix type tests involving an implicit closure of a non-parameterized class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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/vm/code_generator_ia32.cc ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 770)
+++ runtime/vm/object.cc (working copy)
@@ -1238,6 +1238,14 @@
}
return type_arguments.IsMoreSpecificThan(other_type_arguments, len);
}
+ // Check for two function types.
+ if (IsSignatureClass() && other.IsSignatureClass()) {
+ const Function& fun = Function::Handle(signature_function());
+ const Function& other_fun = Function::Handle(other.signature_function());
+ return fun.IsSubtypeOf(type_arguments,
+ other_fun,
+ other_type_arguments);
+ }
// Check for 'direct super type' in the case of an interface and check for
// transitivity at the same time.
if (other.is_interface()) {
@@ -1279,14 +1287,7 @@
}
}
}
- if (IsSignatureClass() && other.IsSignatureClass()) {
- const Function& fun = Function::Handle(signature_function());
- const Function& other_fun = Function::Handle(other.signature_function());
- return fun.IsSubtypeOf(type_arguments,
- other_fun,
- other_type_arguments);
- }
-
+ // Check the interface case.
if (is_interface()) {
// We already checked the case where 'other' is an interface. Now, 'this',
// an interface, cannot be more specific than a class, except class Object,
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698