blob: 4c5a5a6f424fd175aa3932c03d8cafaf40f5a2f0 [file] [log] [blame]
// Copyright (c) 2012, 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 test for legally self referencing function type alias.
import "package:expect/expect.dart";
typedef F(
<F> //# 00: compile-time error
typedef D C();
class D {
C foo() {}
D bar() {}
main() {
var f = (List x) {};
Expect.isTrue(f is F);
var g = (List<F> x) {};
Expect.isFalse(g is F);
var d = new D();
Expect.isTrue( is! C);
Expect.isTrue( is C);