// 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. class A> {} typedef F = Function(); class B { B(Function() a); factory B.foo(Function() a) => new B(a); foo2(Function() a) {} Function() foo3() => throw 42; Function() get foo4 => throw 42; void set foo5(Function() a) {} Function() foo6 = (() => throw 42)(); } bar2(Function() a) {} Function() bar3() => throw 42; Function() get bar4 => throw 42; void set bar5(Function() a) {} Function() bar6 = (() => throw 42)(); extension E on int { baz2(Function() a) {} Function() baz3() => throw 42; Function() get baz4 => throw 42; void set baz5(Function() a) {} } main() {}