Show
Ignore:
Timestamp:
08/28/08 05:23:09 (4 months ago)
Author:
Chuck.Esterbrook
Message:

Test that the default type for vars, properties and method arguments is dynamic?

Files:
1 modified

Legend:

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

    r1583 r1596  
    5555 
    5656        def clrType(qualifiedName as String) as System.Type 
     57 
     58        def defaultType as IType 
    5759 
    5860 
     
    7779        var _voidType                   as VoidType? 
    7880        var _variTypes                  as Dictionary<of IType, VariType>? 
     81        var _defaultType                as IType? 
    7982 
    8083        def typeForName(name as String) as IType 
     
    184187        def clrType(qualifiedName as String) as System.Type 
    185188                return sharp'Type.GetType(qualifiedName)' to System.Type 
     189 
     190        def defaultType as IType 
     191                if _defaultType is nil 
     192                        _defaultType = NilableType(.dynamicType) 
     193                return _defaultType to ! 
    186194 
    187195