Changeset 2304 for cobra/trunk/Source/Compiler.cobra
- Timestamp:
- 03/08/10 06:19:46 (2 years ago)
- Files:
-
- 1 modified
-
cobra/trunk/Source/Compiler.cobra (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/Compiler.cobra
r2277 r2304 483 483 var _unspecifiedType as UnspecifiedType? 484 484 var _voidType as VoidType? 485 var _nilableTypes as Dictionary<of INode, NilableType>? 485 486 var _variTypes as Dictionary<of INode, VariType>? 486 487 var _nilableDynamicType as NilableType? … … 597 598 return _voidType to ! 598 599 600 def nilableType(type as IType) as NilableType 601 if type inherits NilableType, return type 602 if _nilableTypes is nil 603 _nilableTypes = Dictionary<of INode, NilableType>() 604 if _nilableTypes.containsKey(type) 605 return _nilableTypes[type] 606 else 607 _nilableTypes[type] = nt = NilableType(type) 608 nt.bindInh 609 nt.bindInt 610 return nt 611 599 612 def variType(type as IType) as VariType 600 613 if _variTypes is nil … … 615 628 616 629 ## More type stuff 617 618 def nilableType(t as IType) as NilableType619 """620 Returns a NilableType wrapper for t, unless t is already a NilableType in which case621 it is returned directly.622 """623 if t inherits NilableType624 return t625 else626 return NilableType(t).bindAll to NilableType # CC: axe cast after "as this"627 630 628 631 def readSystemTypes



