Euphoria Ticket #316: const sequence from routine to atom = ok

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

Type: Bug Report Severity: Normal Category: Interpreter
Assigned To: jimcbrown Status: Fixed Reported Release:
Fixed in SVN #: 3820, 3821, 3823 View VCS: 3820, 3821, 3823 Milestone: 4.0.0RC1

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.

Search



Quick Links

User menu

Not signed in.

Misc Menu