Include often causes errors, even memory errors
porky11 opened this issue · comments
Fabio Krapohl commented
I don't know many exact cases, where errors occur, mostly it happened while trying to include some files in https://github.com/porky11/dale-gl
Some simple example:
(namespace include
(include "enum.dt")
(def print-enum (fn intern void ((a enum)) ;;type enum not defined in this scope
(printf "%u" a)))
)
(def main (fn extern-c void (void)
(print-enum value)))
where enum.dt is:
(import enum)
(def-enum enum extern uint
((value 0)))
tomhrr commented
Thanks, this should be fixed now.
tomhrr commented
There were some bad assumptions with this change, so this needs a little more work now, but it shouldn't take long.
tomhrr commented
Should be OK now.