1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-29 22:53:03 +00:00

Add check for redefining types.

This commit is contained in:
Calvin Rose
2023-08-13 11:07:38 -05:00
parent 4b8e7a416f
commit b939671b79
2 changed files with 67 additions and 18 deletions

View File

@@ -0,0 +1,15 @@
(def ir-asm
@{:instructions
'(
# Types
(type-prim Real f32)
(type-prim 1 s32)
(bind bob Real)
(return bob))
:parameter-count 0
:link-name "redefine_type_fail"})
(def as (sysir/asm ir-asm))
(print (sysir/to-c as))