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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 652743007: - Do not attempt to set parameter types if they (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 41169)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -1146,16 +1146,21 @@
AbstractType& type = AbstractType::Handle(function.result_type());
// It is not a compile time error if this name does not resolve to a class or
// interface.
- type = FinalizeType(cls, type, kCanonicalize);
+ AbstractType& finalized_type =
+ AbstractType::Handle(FinalizeType(cls, type, kCanonicalize));
// The result type may be malformed or malbounded.
- function.set_result_type(type);
+ if (type.raw() != finalized_type.raw()) {
+ function.set_result_type(type);
+ }
// Resolve formal parameter types.
const intptr_t num_parameters = function.NumParameters();
for (intptr_t i = 0; i < num_parameters; i++) {
type = function.ParameterTypeAt(i);
- type = FinalizeType(cls, type, kCanonicalize);
+ finalized_type = FinalizeType(cls, type, kCanonicalize);
// The parameter type may be malformed or malbounded.
- function.SetParameterTypeAt(i, type);
+ if (type.raw() != finalized_type.raw()) {
+ function.SetParameterTypeAt(i, type);
+ }
}
}
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698