OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import "package:expect/expect.dart" show Expect; |
| 6 |
| 7 test(f) { |
| 8 if (f is void Function(Object, StackTrace)) return 1; |
| 9 if (f is void Function(Object)) return 10; |
| 10 if (f is void Function()) return 100; |
| 11 } |
| 12 |
| 13 main() { |
| 14 Expect.equals( |
| 15 111, |
| 16 test(() => null) + |
| 17 test((Object o) => null) + |
| 18 test((Object o, StackTrace t) => null)); |
| 19 } |
OLD | NEW |