OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library test.instance_members_unimplemented_interface; | |
6 | |
7 import 'dart:mirrors'; | |
8 import 'package:expect/expect.dart'; | |
9 | |
10 class I { | |
11 implementMe() {} | |
12 } | |
13 class C implements I {} | |
14 | |
15 selectKeys(map, predicate) { | |
16 return map.keys.where((key) => predicate(map[key])); | |
17 } | |
18 | |
19 main() { | |
20 ClassMirror cm = reflectClass(C); | |
21 | |
22 Expect.setEquals( | |
23 [#implementMe, | |
rmacnak
2013/10/25 21:58:36
?
gbracha
2013/10/26 18:37:48
No, C says it implements I but it does not. Classe
| |
24 #hashCode, | |
25 #runtimeType, | |
26 #==, | |
27 #noSuchMethod, | |
28 #toString], | |
29 selectKeys(cm.instanceMembers, (dm) => !dm.isPrivate)); | |
30 // Filter out private to avoid implementation-specific members of Object. | |
31 } | |
OLD | NEW |