blob: 6a2eb8d5bf9fc80b49a5e127703f7216a6a739e2 [file] [log] [blame]
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Tests function invocation return types.
import "package:expect/expect.dart";
const var1 = fn();
void fn() {}
const var2 = fn2();
void fn2() {
return;
}
const var3 = fn3();
int? fn3() => null;
const var4 = fn4();
int? fn4() {
return null;
}
void main() {
Expect.equals((var1 as dynamic), null);
Expect.equals((var2 as dynamic), null);
Expect.equals(var3, null);
Expect.equals(var4, null);
}