blob: 9498d516fb4c058915b84733cd05ee264b9374f3 [file] [log] [blame]
// Copyright (c) 2011, 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 The class of a function literal implements the built-in class
/// Function.
/// @description Checks that a function literal implements interface Function.
/// @author msyabro
import '../../../Utils/expect.dart';
main() {
Expect.isTrue(() {} is Function);
Expect.isTrue((() => 1) is Function);
Expect.isTrue(((p1, p2) {}) is Function);
Expect.isTrue(((p1, [int? p2]) {}) is Function);
Expect.isTrue(((p1, {int p2: 1}) {}) is Function);
}