blob: c788378901d19574ac1672ba4153f349925ad3f3 [file] [log] [blame]
// 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.
// @dart = 2.9
// Regression test for Issue https://github.com/dart-lang/sdk/issues/37264.
typedef SomeCb = T Function<T>(T val);
class A<T> {
final SomeCb cb;
A(this.cb);
factory A.b(SomeCb cb) {
return A(cb);
}
}
main() {
// VM should not crash on this case
A<int>.b(<String>(v) => v);
}