Changeset 1707

Show
Ignore:
Timestamp:
10/25/08 02:06:19 (2 months ago)
Author:
Chuck.Esterbrook
Message:

Fix a bug regarding floats first reported at
http://cobra-language.com/forums/viewtopic.php?f=4&t=186#p972

reported-by:irrlicht

Location:
cobra/trunk/Source
Files:
2 modified

Legend:

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

    r1706 r1707  
    22002200                _value = token.value to float 
    22012201 
    2202         def canBeAssignedTo(type as IType) as bool is override 
    2203                 if type.isDescendantOf(.compiler.anyFloatType) 
    2204                         # TODO: check that the literal fits in the range of the type 
    2205                         return true 
    2206                 else 
    2207                         return base.canBeAssignedTo(type) 
    2208  
    22092202        def _bindImp is override 
    22102203                base._bindImp 
  • cobra/trunk/Source/Types.cobra

    r1706 r1707  
    10691069        def init(size as int, superType as IType?) 
    10701070                require 
    1071                         size in [8, 16, 32, 64] 
     1071                        size in [32, 64] 
    10721072                        superType implies superType inherits AnyFloatType 
    10731073                body