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

Unified Diff: pkg/compiler/lib/src/resolution/resolution.dart

Issue 2456643006: More functionality in kernel_impact. (Closed)
Patch Set: Cleanup. Created 4 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
Index: pkg/compiler/lib/src/resolution/resolution.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index bdfffd8a4485bd9feb8e2aacfcbe2a9209ed26a5..09ef8f902c1c07bf737080643d09ee7d7525b19b 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -315,11 +315,22 @@ class ResolverTask extends CompilerTask {
// Ensure the signature of the synthesized element is
// resolved. This is the only place where the resolver is
// seeing this element.
- element.computeType(resolution);
+ FunctionType type = element.computeType(resolution);
if (!target.isMalformed) {
registry.registerStaticUse(new StaticUse.superConstructorInvoke(
- target, CallStructure.NO_ARGS));
+ // TODO(johnniwinther): Provide the right call structure for
+ // forwarding constructors.
+ target,
+ CallStructure.NO_ARGS));
}
+ // TODO(johnniwinther): Remove this substitution when synthesized
+ // constructors handle type variables correctly.
+ type = type.substByContext(
+ constructor.enclosingClass.asInstanceOf(target.enclosingClass));
+ type.parameterTypes.forEach(registry.registerCheckedModeCheck);
+ type.optionalParameterTypes
+ .forEach(registry.registerCheckedModeCheck);
+ type.namedParameterTypes.forEach(registry.registerCheckedModeCheck);
return registry.impactBuilder;
} else {
assert(element.isDeferredLoaderGetter || element.isMalformed);
@@ -382,6 +393,8 @@ class ResolverTask extends CompilerTask {
// happens for enum fields where the type is known but is not in the
// synthesized AST.
element.variables.type = const DynamicType();
+ } else {
+ registry.registerCheckedModeCheck(element.variables.type);
}
Expression initializer = element.initializer;

Powered by Google App Engine
This is Rietveld 408576698