| Index: lib/compiler/implementation/typechecker.dart
|
| diff --git a/lib/compiler/implementation/typechecker.dart b/lib/compiler/implementation/typechecker.dart
|
| index c44326180dce5407de98ff00452b1a6f585a8dad..0ef0cf5e988f063ab0ffc7e8d3c665fe58a2b5d9 100644
|
| --- a/lib/compiler/implementation/typechecker.dart
|
| +++ b/lib/compiler/implementation/typechecker.dart
|
| @@ -118,8 +118,8 @@ class Types {
|
|
|
| // TODO(karlklose): should we have a class Void?
|
| Types.with(Element dynamicElement, LibraryElement library)
|
| - : voidType = new InterfaceType(VOID, new ClassElement(VOID, library)),
|
| - dynamicType = new InterfaceType(DYNAMIC, dynamicElement);
|
| + : voidType = new InterfaceType(VOID, new ClassElement(VOID, library)),
|
| + dynamicType = new InterfaceType(DYNAMIC, dynamicElement);
|
|
|
| Type lookup(SourceString s) {
|
| if (VOID == s) {
|
| @@ -577,7 +577,8 @@ class TypeCheckerVisitor implements Visitor<Type> {
|
| /** Dart Programming Language Specification: 11.10 Return */
|
| Type visitReturn(Return node) {
|
| final expression = node.expression;
|
| - final isVoidFunction = (expectedReturnType === types.voidType);
|
| + final isVoidFunction =
|
| + (expectedReturnType.element === compiler.types.voidType.element);
|
|
|
| // Executing a return statement return e; [...] It is a static type warning
|
| // if the type of e may not be assigned to the declared return type of the
|
|
|