Chromium Code Reviews| Index: compiler/lib/implementation/rtt.js |
| diff --git a/compiler/lib/implementation/rtt.js b/compiler/lib/implementation/rtt.js |
| index 83179d3dfa46193a18563e04bcd62f1eaa1ee3dc..daea1603a37a7ad39eb8f5847f152b6ffefd17c6 100644 |
| --- a/compiler/lib/implementation/rtt.js |
| +++ b/compiler/lib/implementation/rtt.js |
| @@ -208,19 +208,16 @@ RTT.getTypeArgsFor = function(o, classkey) { |
| // Base types for runtime type information |
| /** @type {!RTT} */ |
| -RTT.objectType = new RTT($cls('Object')); |
| -RTT.objectType.implementedBy = function(o) {return true}; |
| -RTT.objectType.implementedByType = function(o) {return true}; |
| - |
| -/** @type {!RTT} */ |
| -RTT.dynamicType = new RTT($cls('Dynamic')); |
| -RTT.dynamicType.implementedBy = function(o) {return true}; |
| -RTT.dynamicType.implementedByType = function(o) {return true}; |
| +function ImplementsAll(name) { |
|
zundel
2011/11/30 15:09:57
(what does this have to do with this patch?)
mmendez
2011/12/01 21:31:30
Makes it such that properties are either x.y or x.
|
| + RTT.call(this,name); |
| +} |
| +$inherits(ImplementsAll,RTT); |
| +ImplementsAll.prototype.implementedBy = function(o) {return true}; |
| +ImplementsAll.prototype.implementedByType = function(o) {return true}; |
| -/** @type {!RTT} */ |
| -RTT.placeholderType = new RTT($cls('::')); |
| -RTT.placeholderType.implementedBy = function(o) {return true}; |
| -RTT.placeholderType.implementedByType = function(o) {return true}; |
| +RTT.objectType = new ImplementsAll($cls('Object')); |
| +RTT.dynamicType = new ImplementsAll($cls('Dynamic')); |
| +RTT.placeholderType = new ImplementsAll($cls('::')); |
| /** |
| * Checks that a value is assignable to an expected type, and either returns that |