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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2918913003: Handle list and map literals (Closed)
Patch Set: Updated cf. comments Created 3 years, 7 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/type_resolver.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 1fa39bcdd218b567d919c95b485e8b9dc76d62bc..b9e8935e8e7d68e22f2e387ca717adab4763c3bb 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -3565,14 +3565,14 @@ class SsaBuilder extends ast.Visitor
bool definitelyFails = false;
void addTypeVariableBoundCheck(
- GenericType instance,
+ ResolutionInterfaceType instance,
ResolutionDartType typeArgument,
ResolutionTypeVariableType typeVariable,
ResolutionDartType bound) {
if (definitelyFails) return;
int subtypeRelation = types.computeSubtypeRelation(typeArgument, bound);
- if (subtypeRelation == Types.IS_SUBTYPE) return;
+ if (subtypeRelation == DartTypes.IS_SUBTYPE) return;
String message = "Can't create an instance of malbounded type '$type': "
"'${typeArgument}' is not a subtype of bound '${bound}' for "
@@ -3582,11 +3582,11 @@ class SsaBuilder extends ast.Visitor
: "'${instance.element.thisType}' on the supertype "
"'${instance}' of '${type}'"
}.";
- if (subtypeRelation == Types.NOT_SUBTYPE) {
+ if (subtypeRelation == DartTypes.NOT_SUBTYPE) {
generateTypeError(node, message);
definitelyFails = true;
return;
- } else if (subtypeRelation == Types.MAYBE_SUBTYPE) {
+ } else if (subtypeRelation == DartTypes.MAYBE_SUBTYPE) {
Set<ResolutionDartType> seenChecks = seenChecksMap.putIfAbsent(
typeArgument, () => new Set<ResolutionDartType>());
if (!seenChecks.contains(bound)) {
@@ -3601,7 +3601,7 @@ class SsaBuilder extends ast.Visitor
return true;
}
for (ResolutionInterfaceType supertype in type.element.allSupertypes) {
- ResolutionDartType instance = type.asInstanceOf(supertype.element);
+ ResolutionInterfaceType instance = type.asInstanceOf(supertype.element);
types.checkTypeVariableBounds(instance, addTypeVariableBoundCheck);
if (definitelyFails) {
return true;
« no previous file with comments | « pkg/compiler/lib/src/resolution/type_resolver.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698