blob: 1ad5754ac2b52f73ab9703f8896c51d45f8e9668 [file] [log] [blame]
// Copyright (c) 2014, 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=--optimization-counter-threshold=5
import 'package:expect/expect.dart';
typedef FunObjObj = Object? Function<T>(Object?, {Object? y});
Object? funTypObj<T>(T x, {Object? y}) => y;
main() {
for (int i = 0; i < 10; i++) {
Expect.throwsTypeError(() {
dynamic y = funTypObj;
final FunObjObj x2 = y;
});
}
}