OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 class Type extends Element { | 5 class Type extends Element { |
6 bool isTested = false; | 6 bool isTested = false; |
7 bool isChecked = false; | 7 bool isChecked = false; |
8 | 8 |
9 /** | 9 /** |
10 * For core types (int, String, etc) this is the generated type assertion | 10 * For core types (int, String, etc) this is the generated type assertion |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 abstract Type resolveTypeParams(ConcreteType inType); | 35 abstract Type resolveTypeParams(ConcreteType inType); |
36 | 36 |
37 Member getMember(String name) => null; | 37 Member getMember(String name) => null; |
38 abstract MethodMember getConstructor(String name); | 38 abstract MethodMember getConstructor(String name); |
39 abstract MethodMember getFactory(Type type, String name); | 39 abstract MethodMember getFactory(Type type, String name); |
40 abstract Type getOrMakeConcreteType(List<Type> typeArgs); | 40 abstract Type getOrMakeConcreteType(List<Type> typeArgs); |
41 abstract Map<String, MethodMember> get constructors(); | 41 abstract Map<String, MethodMember> get constructors(); |
42 abstract addDirectSubtype(Type type); | 42 abstract addDirectSubtype(Type type); |
43 abstract bool get isClass(); | 43 abstract bool get isClass(); |
| 44 abstract Library get library(); |
44 Set<Type> get subtypes() => null; | 45 Set<Type> get subtypes() => null; |
45 | 46 |
46 // TODO(jmesserly): rename to isDynamic? | 47 // TODO(jmesserly): rename to isDynamic? |
47 bool get isVar() => false; | 48 bool get isVar() => false; |
48 bool get isTop() => false; | 49 bool get isTop() => false; |
49 | 50 |
50 bool get isObject() => false; | 51 bool get isObject() => false; |
51 bool get isString() => false; | 52 bool get isString() => false; |
52 bool get isBool() => false; | 53 bool get isBool() => false; |
53 bool get isFunction() => false; | 54 bool get isFunction() => false; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 // And now for some fun: T << U and U << S -> T << S | 373 // And now for some fun: T << U and U << S -> T << S |
373 // To implement this, we need to enumerate a set of types C such that | 374 // To implement this, we need to enumerate a set of types C such that |
374 // U will be an element of C. We can do this by either enumerating less | 375 // U will be an element of C. We can do this by either enumerating less |
375 // specific types of T, or more specific types of S. | 376 // specific types of T, or more specific types of S. |
376 if (parent != null && parent.isSubtypeOf(other)) { | 377 if (parent != null && parent.isSubtypeOf(other)) { |
377 return true; | 378 return true; |
378 } | 379 } |
379 if (interfaces != null && interfaces.some((i) => i.isSubtypeOf(other))) { | 380 if (interfaces != null && interfaces.some((i) => i.isSubtypeOf(other))) { |
380 return true; | 381 return true; |
381 } | 382 } |
error: old chunk mismatch |
None
OLD | NEW |