Index: runtime/lib/mirrors.cc |
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc |
index 88b35b0169b5798359a93d212f3b9c1288b46235..252248074dd7e25c70e3003d32c9f555be59514d 100644 |
--- a/runtime/lib/mirrors.cc |
+++ b/runtime/lib/mirrors.cc |
@@ -111,7 +111,9 @@ DEFINE_NATIVE_ENTRY(Mirrors_isLocalPort, 1) { |
} |
static void EnsureConstructorsAreCompiled(const Function& func) { |
- if (func.kind() != RawFunction::kConstructor) return; |
+ // Only generative constructors can have initializing formals. |
+ if (!func.IsConstructor()) return; |
+ |
const Class& cls = Class::Handle(func.Owner()); |
const Error& error = Error::Handle(cls.EnsureIsFinalized(Isolate::Current())); |
if (!error.IsNull()) { |