blob: 0d4dd9605b6789c09e47766a204e8e24073f0e06 [file] [log] [blame]
// 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.
// @dart=2.9
library test;
typedef void F<T>(T x);
typedef U G<T, U>(T x);
class C<T> {
void f1(T x) {}
T f2(List<T> x) => x.first;
F<num> g1(C<num> c) {
return c.f1;
void g2(C<int> c, Object x) {
F<Object> f = g1(c) as F<Object>;
G<List<num>, num> g3(C<num> c) {
return c.f2;
void test() {
var x = g1(new C<int>());
g3(new C<int>());
main() {}