blob: 2230c92502809cac315e49e0a5f117876860c6b8 [file] [log] [blame] [edit]
// Copyright (c) 2019, 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 If e translates to F then e(args) translates to:
/// PASSTHRU[F, fn[x] => x(ARGS(args))]
///
/// @description If e translates to F then e(args) translates to:
/// PASSTHRU[F, fn[x] => x(ARGS(args))]
/// @author sgrekhov@unipro.ru
import "../../Utils/expect.dart";
typedef String Func();
String foo() => "Lily was here";
class C {
}
main() {
Func f1 = foo;
Expect.equals("Lily was here", foo());
Expect.equals("Lily was here", f1());
Expect.isTrue(C() is C);
Expect.runtimeIsType<C>(C());
Func? f2 = foo;
Expect.equals("Lily was here", f2());
}