Ticket #9 (new defect)

Opened 5 years ago

Last modified 5 years ago

Disallow unboxed data being present in function closures.

Reported by: benl Owned by:
Priority: minor Milestone: 0.1.4
Component: Core Type Checker Version: 0.1.2
Keywords: Cc:

Description

The runtime system doesn't support unboxed data being present in closures. We should check this in core and give a suitable error message.

This program

main () 
 = putStr $ show $ fun () ()

fun ()
 = do	dude	= 100#
	(\t -> dude + 100#)

Causes:

./test/Broken-skip/T9-UnboxedDataInClosures/Main.ddc.c: In function ‘Main_main’:
./test/Broken-skip/T9-UnboxedDataInClosures/Main.ddc.c:43: warning: assignment makes integer from pointer without a cast
./test/Broken-skip/T9-UnboxedDataInClosures/Main.ddc.c:44: warning: passing argument 2 of ‘Data_Function__symDl’ makes pointer from integer without a cast
./test/Broken-skip/T9-UnboxedDataInClosures/Main.ddc.c: In function ‘Main_fun’:
./test/Broken-skip/T9-UnboxedDataInClosures/Main.ddc.c:79: warning: assignment makes pointer from integer without a cast
ddc: PANIC in Main.Invoke
        invokeSeaCompiler: compilation of C file failed.
            pathC = ./test/Broken-skip/T9-UnboxedDataInClosures/Main.ddc.c

Change History

Changed 5 years ago by benl

  • version set to 0.1.2

Changed 5 years ago by benl

Test is T9-UnboxedDataInClosures

Note: See TracTickets for help on using tickets.