blob: 7b09643bd5a578b2ec8d14e83bcc20367adb7cd8 [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;
});
}
}