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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 29013005: Report compile-time error for const factories redirecting to malformed type (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | tests/language/language.status » ('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 29118)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -278,12 +278,18 @@
const Function& factory) {
const Function& target = Function::Handle(factory.RedirectionTarget());
if (target.IsNull()) {
- const Type& type = Type::Handle(factory.RedirectionType());
+ Type& type = Type::Handle(factory.RedirectionType());
if (!type.IsMalformed()) {
const GrowableObjectArray& visited_factories =
GrowableObjectArray::Handle(GrowableObjectArray::New());
ResolveRedirectingFactoryTarget(cls, factory, visited_factories);
}
+ if (factory.is_const()) {
+ type = factory.RedirectionType();
+ if (type.IsMalformed()) {
+ ReportError(Error::Handle(type.malformed_error()));
+ }
+ }
}
}
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698