Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Side by Side Diff: dart/tests/compiler/dart2js_extra/mirror_type_inference_function_test.dart

Issue 23455028: Mirrors overhaul. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r29550. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js_extra/mirror_type_inference_field_test.dart ('k') | dart/tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698