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

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

Issue 1421003004: Add CoreClasses (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/types.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/typechecker.dart
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
index 0aacdb9ed36d8abd1311afe3f656e6c80825e620..0a0596ce0397a20f1e411dc3c08afe8c46ab70b2 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -756,7 +756,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
// This is an access the implicit 'call' method of a function type.
return new FunctionCallAccess(receiverElement, unaliasedBound);
}
- if (types.isSubtype(interface, compiler.functionClass.rawType)) {
+ if (types.isSubtype(interface, coreTypes.functionType)) {
// This is an access of the special 'call' method implicitly defined
// on 'Function'. This method can be called with any arguments, which
// we ensure by giving it the type 'dynamic'.
@@ -1334,15 +1334,15 @@ class TypeCheckerVisitor extends Visitor<DartType> {
LinkBuilder<DartType> argumentTypesBuilder = new LinkBuilder<DartType>();
DartType resultType =
analyzeInvocation(node, access, argumentTypesBuilder);
- if (identical(receiverType.element, compiler.intClass)) {
+ if (receiverType == intType) {
if (identical(name, '+') ||
identical(operatorName, '-') ||
identical(name, '*') ||
identical(name, '%')) {
DartType argumentType = argumentTypesBuilder.toLink().head;
- if (identical(argumentType.element, compiler.intClass)) {
+ if (argumentType == intType) {
return intType;
- } else if (identical(argumentType.element, compiler.doubleClass)) {
+ } else if (argumentType == doubleType) {
return doubleType;
}
}
@@ -1839,7 +1839,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
Types.computeInterfaceType(resolution, expressionType);
if (interfaceType != null) {
InterfaceType streamType =
- interfaceType.asInstanceOf(compiler.streamClass);
+ interfaceType.asInstanceOf(streamOfDynamic.element);
if (streamType != null) {
DartType streamElementType = streamType.typeArguments.first;
if (!types.isAssignable(streamElementType, elementType)) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/types.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698