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

Unified Diff: pkg/compiler/lib/src/serialization/modelz.dart

Issue 2033893004: Align semantics of getDefaultConstructor() (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
Index: pkg/compiler/lib/src/serialization/modelz.dart
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index 87f5fbceea5a8f8b7dcc1560eb4420f003181e21..a03ef2f2b12f68251d0365defecf0bac6df40494 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -835,7 +835,8 @@ abstract class ClassElementMixin
@override
ConstructorElement lookupDefaultConstructor() {
ConstructorElement constructor = lookupConstructor("");
- if (constructor != null && constructor.parameters.isEmpty) {
+ if (constructor != null &&
+ constructor.functionSignature.requiredParameterCount == 0) {
return constructor;
}
return null;
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | tests/compiler/dart2js/serialization/equivalence_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698