Euphoria
Ticket #316:
const sequence from routine to atom = ok
-
Reported by
jeremy
Nov 03, 2010
Thomas reported this in message:113332. I created a more simple test case here.
function seq()
return {10,20,30}
end function
constant aSequence = seq()
atom aAtom = aSequence
? aAtom[1]
The above code runs fine.
Details
1. Comment by jimcbrown
Nov 04, 2010
This has now been fixed.
2. Comment by mattlewis
Nov 04, 2010
Updated to take into account possible compile time information about the value of a constant. If it is known at compile time to be a sequence, we raise an error right then, otherwise, if the value is known to be an atom, we optimize out the type check. The type check is emitted when the value is not known.