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

Side by Side Diff: pkg/compiler/lib/src/resolution/type_resolver.dart

Issue 2366263004: Handle fields with initializers in kernel_impact (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.resolution.types; 5 library dart2js.resolution.types;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Resolution; 8 import '../common/resolution.dart' show Resolution;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart' 10 import '../elements/elements.dart'
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 userProvidedBadType: typeVariable.type); 215 userProvidedBadType: typeVariable.type);
216 } else { 216 } else {
217 type = typeVariable.type; 217 type = typeVariable.type;
218 } 218 }
219 type = checkNoTypeArguments(type); 219 type = checkNoTypeArguments(type);
220 } else { 220 } else {
221 reporter.internalError( 221 reporter.internalError(
222 node, "Unexpected element kind ${element.kind}."); 222 node, "Unexpected element kind ${element.kind}.");
223 } 223 }
224 if (addTypeVariableBoundsCheck) { 224 if (addTypeVariableBoundsCheck) {
225 registry.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);
226 visitor.addDeferredAction(visitor.enclosingElement, 225 visitor.addDeferredAction(visitor.enclosingElement,
227 () => checkTypeVariableBounds(node, type)); 226 () => checkTypeVariableBounds(node, type));
228 } 227 }
229 } 228 }
230 registry.useType(node, type); 229 registry.useType(node, type);
231 return type; 230 return type;
232 } 231 }
233 232
234 /// Checks the type arguments of [type] against the type variable bounds. 233 /// Checks the type arguments of [type] against the type variable bounds.
235 void checkTypeVariableBounds(TypeAnnotation node, GenericType type) { 234 void checkTypeVariableBounds(TypeAnnotation node, GenericType type) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 arguments.add(argType); 275 arguments.add(argType);
277 } 276 }
278 if (index < expectedVariables) { 277 if (index < expectedVariables) {
279 reporter.reportWarningMessage( 278 reporter.reportWarningMessage(
280 node.typeArguments, MessageKind.MISSING_TYPE_ARGUMENT); 279 node.typeArguments, MessageKind.MISSING_TYPE_ARGUMENT);
281 typeArgumentCountMismatch = true; 280 typeArgumentCountMismatch = true;
282 } 281 }
283 return typeArgumentCountMismatch; 282 return typeArgumentCountMismatch;
284 } 283 }
285 } 284 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698