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

Side by Side Diff: frog/type.dart

Issue 8478025: Restore r1383: Fix method resolution to warn about things that don't exist on the declared type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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
None
OLDNEW
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 implements Named, Hashable { 5 class Type implements Named, Hashable {
6 final String name; 6 final String name;
7 bool isTested; 7 bool isTested;
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
34 abstract SourceSpan get span(); 34 abstract SourceSpan get span();
35 35
36 abstract Type resolveType(TypeReference node, bool isRequired); 36 abstract Type resolveType(TypeReference node, bool isRequired);
37 37
38 abstract Type resolveTypeParams(ConcreteType inType); 38 abstract Type resolveTypeParams(ConcreteType inType);
39 39
40 abstract MemberSet resolveMember(String name); 40 abstract MemberSet resolveMember(String name);
41 Member getMember(String name) => null; 41 Member getMember(String name) => null;
42 abstract MethodMember getConstructor(String name); 42 abstract MethodMember getConstructor(String name);
43 abstract MethodMember getFactory(Type type, String name); 43 abstract MethodMember getFactory(Type type, String name);
44 44 abstract Type getOrMakeConcreteType(List<Type> typeArgs);
45 abstract Map<String, MethodMember> get constructors();
46 abstract addDirectSubtype(Type type);
jimhug 2011/11/10 15:47:21 Another of those cool vs. weird things - but I'm a
45 abstract bool get isClass(); 47 abstract bool get isClass();
46 abstract Library get library(); 48 abstract Library get library();
47 49
48 // TODO(jmesserly): rename to isDynamic? 50 // TODO(jmesserly): rename to isDynamic?
49 bool get isVar() => false; 51 bool get isVar() => false;
50 bool get isTop() => false; 52 bool get isTop() => false;
51 53
52 bool get isObject() => false; 54 bool get isObject() => false;
53 bool get isString() => false; 55 bool get isString() => false;
54 bool get isBool() => false; 56 bool get isBool() => false;
(...skipping 21 matching lines...) Expand all
76 bool get isNative() => isNativeType; // TODO(jimhug): remove isNativeType. 78 bool get isNative() => isNativeType; // TODO(jimhug): remove isNativeType.
77 79
78 bool get hasTypeParams() => false; 80 bool get hasTypeParams() => false;
79 81
80 String get typeofName() => null; 82 String get typeofName() => null;
81 83
82 String get jsname() => _jsname == null ? name : _jsname; 84 String get jsname() => _jsname == null ? name : _jsname;
83 85
84 set jsname(String name) => _jsname = name; 86 set jsname(String name) => _jsname = name;
85 87
88 Map<String, Member> get members() => null;
89 Definition get definition() => null;
90 FactoryMap get factories() => null;
91
86 // TODO(jmesserly): should try using a const list instead of null to represent 92 // TODO(jmesserly): should try using a const list instead of null to represent
87 // the absence of type parameters. 93 // the absence of type parameters.
88 Collection<Type> get typeArgsInOrder() => null; 94 Collection<Type> get typeArgsInOrder() => null;
89 Type get genericType() => this; 95 DefinedType get genericType() => this;
90 96
91 // TODO(jmesserly): what should these do for ParameterType? 97 // TODO(jmesserly): what should these do for ParameterType?
92 List<Type> get interfaces() => null; 98 List<Type> get interfaces() => null;
93 Type get parent() => null; 99 Type get parent() => null;
94 100
95 Map<String, Member> getAllMembers() => {}; 101 Map<String, Member> getAllMembers() => {};
96 102
97 int hashCode() => name.hashCode(); 103 int hashCode() => name.hashCode();
98 104
99 void ensureSubtypeOf(Type other, SourceSpan span, [bool typeErrors=false]) { 105 void ensureSubtypeOf(Type other, SourceSpan span, [bool typeErrors=false]) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 300 }
295 } 301 }
296 302
297 303
298 /** A type parameter within the body of the type. */ 304 /** A type parameter within the body of the type. */
299 class ParameterType extends Type { 305 class ParameterType extends Type {
300 TypeParameter typeParameter; 306 TypeParameter typeParameter;
301 Type extendsType; 307 Type extendsType;
302 308
303 bool get isClass() => false; 309 bool get isClass() => false;

error: old chunk mismatch

OLDNEW

Powered by Google App Engine
This is Rietveld 408576698