| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Test that type inference sees the call to `fisk` from the mirror system | 5 // Test that type inference sees the call to `fisk` from the mirror system |
| 6 // and not infers the argument to be an integer. | 6 // and not infers the argument to be an integer. |
| 7 library test; | 7 library test; |
| 8 | 8 |
| 9 @MirrorsUsed(targets: 'fisk', override: '*') | 9 @MirrorsUsed(targets: 'fisk', override: '*') |
| 10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
| 11 | 11 |
| 12 import 'package:expect/expect.dart'; | 12 import 'package:expect/expect.dart'; |
| 13 | 13 |
| 14 bool fisk(a) => a is int; | 14 bool fisk(a) => a is int; |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 Expect.isTrue(fisk(1)); | 17 Expect.isTrue(fisk(1)); |
| 18 var lm = currentMirrorSystem().findLibrary(const Symbol('test')).single; | 18 var lm = currentMirrorSystem().findLibrary(const Symbol('test')); |
| 19 Expect.isFalse(lm.invoke(const Symbol('fisk'), ['hest']).reflectee); | 19 Expect.isFalse(lm.invoke(const Symbol('fisk'), ['hest']).reflectee); |
| 20 } | 20 } |
| OLD | NEW |