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

Unified Diff: runtime/lib/error.cc

Issue 8872037: Adjust index of type parameters at finalization time (fix issue 718). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 | runtime/vm/class_finalizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/error.cc
===================================================================
--- runtime/lib/error.cc (revision 2282)
+++ runtime/lib/error.cc (working copy)
@@ -226,16 +226,24 @@
if (FLAG_trace_type_checks) {
const Type& src_type = Type::Handle(src_instance.GetType());
- AbstractType& instantiated_dst_type = AbstractType::Handle(dst_type.raw());
- if (!dst_type.IsInstantiated()) {
+ if (dst_type.IsInstantiated()) {
+ OS::Print("TypeCheck: '%s' %s assignable to '%s' of '%s'.\n",
+ String::Handle(src_type.Name()).ToCString(),
+ is_assignable ? "is" : "is not",
+ String::Handle(dst_type.Name()).ToCString(),
+ dst_name.ToCString());
+ } else {
// Instantiate dst_type before printing.
- instantiated_dst_type =
- dst_type.InstantiateFrom(dst_type_instantiator, 0);
+ const AbstractType& instantiated_dst_type = AbstractType::Handle(
+ dst_type.InstantiateFrom(dst_type_instantiator));
+ OS::Print("TypeCheck: '%s' %s assignable to '%s' of '%s' "
+ "instantiated from '%s'.\n",
+ String::Handle(src_type.Name()).ToCString(),
+ is_assignable ? "is" : "is not",
+ String::Handle(instantiated_dst_type.Name()).ToCString(),
+ dst_name.ToCString(),
+ String::Handle(dst_type.Name()).ToCString());
}
- OS::Print("TypeCheck: '%s' %s assignable to '%s'.\n",
- String::Handle(src_type.Name()).ToCString(),
- is_assignable ? "is" : "is not",
- String::Handle(dst_type.Name()).ToCString());
}
if (!is_assignable) {
const Type& src_type = Type::Handle(src_instance.GetType());
@@ -244,7 +252,7 @@
if (!dst_type.IsInstantiated()) {
// Instantiate dst_type before reporting the error.
const AbstractType& instantiated_dst_type = AbstractType::Handle(
- dst_type.InstantiateFrom(dst_type_instantiator, 0));
+ dst_type.InstantiateFrom(dst_type_instantiator));
dst_type_name = instantiated_dst_type.Name();
} else {
dst_type_name = dst_type.Name();
@@ -313,7 +321,7 @@
if (!element_type.IsInstantiated()) {
// Instantiate element_type before reporting the error.
const AbstractType& instantiated_element_type = AbstractType::Handle(
- element_type.InstantiateFrom(element_type_instantiator, 0));
+ element_type.InstantiateFrom(element_type_instantiator));
dst_type_name = instantiated_element_type.Name();
} else {
dst_type_name = element_type.Name();
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698