Chromium Code Reviews| Index: pkg/compiler/lib/src/resolution/members.dart |
| diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart |
| index 9fb5495a263d791b6bbe0190fd8af48b046d14ed..a3c33ba4c1d9319bcc44ca233d53930cee21afec 100644 |
| --- a/pkg/compiler/lib/src/resolution/members.dart |
| +++ b/pkg/compiler/lib/src/resolution/members.dart |
| @@ -3886,11 +3886,14 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
| if (!isInvalid) { |
| // [constructor] might be the implementation element |
| // and only declaration elements may be registered. |
| - registry.registerStaticUse(new StaticUse.constructorInvoke( |
| - constructor.declaration, callStructure)); |
| // TODO(johniwinther): Avoid registration of `type` in face of redirecting |
| // factory constructors. |
| - registry.registerTypeUse(new TypeUse.instantiation(type)); |
| + registry.registerStaticUse( |
| + node.isConst |
| + ? new StaticUse.constConstructorInvoke( |
|
Harry Terkelsen
2016/10/07 15:53:21
this is the output of dartfmt? looks weird
Johnni Winther
2016/10/10 09:58:12
No. Forgot to dartfmt this CL.
|
| + constructor.declaration, callStructure, type) |
| + : new StaticUse.typedConstructorInvoke( |
| + constructor.declaration, callStructure, type)); |
| InterfaceType interfaceType = type; |
| if (interfaceType.typeArguments.any((DartType type) => !type.isDynamic)) { |
| registry.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK); |