Ticket #160 (new defect)

Opened 4 years ago

Last modified 4 years ago

Runtime crash with recursive bindings

Reported by: benl Owned by:
Priority: blocker Milestone: 0.1.3
Component: Runtime System Version: 0.1.2
Keywords: Cc:

Description

The following Haskell code to solve the 2nd Euler problem causes a runtime crash.

maxN	= 10000
main ()
 = do	println $ show solution1

even x = x `mod` 2 == 0

solution1 
  = sum [ x 	| x <- takeWhile ((<=) maxN) fibs
              		, even x]
  where	fibs = 1 : 1 : zipWith (+) fibs (tail fibs)

Change History

Changed 4 years ago by benl

We don't handle recursive bindings like fibs. This should give an error instead of a runtime crash.

Note: See TracTickets for help on using tickets.