Wiki
Show
Ignore:
Timestamp:
03/14/10 06:45:43 (2 years ago)
Author:
Chuck.Esterbrook
Message:

Arrays and lists can now be compared with == and <>.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Source/Compiler.cobra

    r2315 r2316  
    486486    var _anyFloatType as AnyFloatType? 
    487487    var _anyIntType as AnyIntType? 
     488    var _arrayTypes as Dictionary<of IType, ArrayType>? 
    488489    var _boolType as BoolType? 
    489490    var _charType as CharType? 
     
    518519            _anyIntType = AnyIntType() 
    519520        return _anyIntType to ! 
     521 
     522    def arrayType(type as IType) as ArrayType 
     523        if _arrayTypes is nil, _arrayTypes = Dictionary<of IType, ArrayType>() 
     524        if _arrayTypes.containsKey(type) 
     525            return _arrayTypes[type] 
     526        else 
     527            _arrayTypes[type] = at = ArrayType(type) 
     528            at.bindInh 
     529            at.bindInt 
     530            return at 
    520531 
    521532    get boolType as BoolType