blob: b1bde2d73e44bc7b11d49b03d0a2f55b2b7dc57a [file] [log] [blame]
// Copyright (c) 2020, 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.
/// @assertion A function value, or an instance of a class with a "call" method,
/// is a subtype of a function type, and as such, a subtype of Function.
/// @description Checks that function object is an instance of a class which is a
/// subtype of [Function] and has a [call] method.
/// @author iarkh
import "../../../Utils/expect.dart";
int foo(String s) {
return 21;
main() {
Expect.equals(1, (int, double) { return 1; } (1, 3.14));
Expect.equals(1, (() => 1)());