// Copyright (c) 2017, 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. // VMOptions=--reify-generic-functions import 'package:expect/expect.dart'; void foo(F f(F f)) {} B bar(B g(F f)) => null; Function baz() { B foo(F f) => null; return foo; } class C { void foo(F f(T t, F f)) => null; B bar(B g(T t, F f)) => null; Function baz() { B foo(T t, F f) => null; return foo; } } main() { Expect.equals("((F) => F) => void", foo.runtimeType.toString()); Expect.equals("((F) => B) => B", bar.runtimeType.toString()); Expect.equals("(F) => int", baz().runtimeType.toString()); var c = new C(); Expect.equals("((bool, F) => F) => void", c.foo.runtimeType.toString()); Expect.equals("((bool, F) => B) => B", c.bar.runtimeType.toString()); Expect.equals("(bool, F) => int", c.baz().runtimeType.toString()); }