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

Unified Diff: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java

Issue 11366062: Use union type parts when check if type is subtype. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index 398b1e70fe677812fcc7e71e2dec7afce911f875..bb615ba3b03f4b85fa1e60f8b8780aa503132402 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -1491,7 +1491,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
private void setCascadeUnionType(DartCascadeExpression node, Type newType) {
DartExpression target = node.getTarget();
Type type = node.getType();
- if (isExclicitlySpecifiedType(newType) && types.isAssignable(type, newType)) {
+ if (isExplicitlySpecifiedType(newType) && types.isAssignable(type, newType)) {
Type unionType = getUnionType(type, newType);
unionType = Types.makeInferred(unionType);
node.setType(unionType);
@@ -2857,7 +2857,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
// if type is declared and right side is closure, infer its parameter types
if (value != null) {
Type varType = node.getElement().getType();
- if (isExclicitlySpecifiedType(varType)) {
+ if (isExplicitlySpecifiedType(varType)) {
inferFunctionLiteralParametersTypes(value, varType);
}
}
@@ -2964,7 +2964,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
// if type is declared and right side is closure, infer its parameter types
if (value != null) {
Type fieldType = node.getElement().getType();
- if (isExclicitlySpecifiedType(fieldType)) {
+ if (isExplicitlySpecifiedType(fieldType)) {
inferFunctionLiteralParametersTypes(value, fieldType);
}
}
@@ -3557,7 +3557,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
}
}
- private static boolean isExclicitlySpecifiedType(Type type) {
+ private static boolean isExplicitlySpecifiedType(Type type) {
return type != null && TypeKind.of(type) != TypeKind.DYNAMIC
&& !TypeQuality.isInferred(type);
}

Powered by Google App Engine
This is Rietveld 408576698