c195fc9e92
Review URL: https://codereview.chromium.org//11549027 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16069 260f80e4-7a28-3924-810f-c04153c831b5
26 lines
638 B
Dart
26 lines
638 B
Dart
// 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.
|
|
|
|
class X {
|
|
call() => 42;
|
|
}
|
|
|
|
class Y {
|
|
call(int x) => 87;
|
|
}
|
|
|
|
typedef F(int x);
|
|
typedef G(String y);
|
|
|
|
main() {
|
|
X x = new X();
|
|
Function f = x; // Should pass checked mode test
|
|
Y y = new Y();
|
|
Function g = y; // Should pass checked mode test
|
|
F f0 = y; // Should pass checked mode test
|
|
F f1 = x; /// 00: dynamic type error, static type warning
|
|
G g0 = y; /// 01: dynamic type error, static type warning
|
|
}
|
|
|