| Index: lib/compiler/implementation/typechecker.dart
|
| diff --git a/lib/compiler/implementation/typechecker.dart b/lib/compiler/implementation/typechecker.dart
|
| index c98e4140d8668e56c1a7feba08ff984c4d5b4dcd..6326ddb9f7667bc685b61b074ac6dd45032556bb 100644
|
| --- a/lib/compiler/implementation/typechecker.dart
|
| +++ b/lib/compiler/implementation/typechecker.dart
|
| @@ -578,7 +578,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
|
|
|