Wiki
Show
Ignore:
Timestamp:
03/11/10 10:12:09 (2 years ago)
Author:
Chuck.Esterbrook
Message:

Code cleanup.

Files:
1 modified

Legend:

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

    r2310 r2312  
    804804                            (_right.right to MemberExpr).name == 'keys' and _ 
    805805                            _right.left.type inherits Box and _ 
    806                             _isIDictionary(_right.left.type to Box) 
     806                            (_right.left.type to Box).isIndirectConstructionOf(.compiler.idictionaryOfType) 
    807807                            # then 
    808808                            contains = DotExpr(.token, 'DOT', _right.left, CallExpr(.token, 'containsKey', List<of Expr>([_left]), true, isImplicit=true)) 
     
    826826                _needsNilCheck = true 
    827827                return true 
    828         return false 
    829  
    830     def _isIDictionary(box as Box) as bool 
    831         if box.isGeneric 
    832             genDef = box.genericDef 
    833             if genDef.genericParams.count == 2  # <of TKey, TValue> 
    834                 genIDict = .compiler.idictionaryOfType 
    835                 idict = genIDict.constructedTypeFor(genDef.genericParams) to Interface 
    836                 return genDef.isDescendantOfInterface(idict) 
    837828        return false 
    838829