Ticket #9 (new defect)
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
Note: See
TracTickets for help on using
tickets.
