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:
15
examples/sysir/typeerr1.janet
Normal file
15
examples/sysir/typeerr1.janet
Normal 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))
|
||||
Reference in New Issue
Block a user