Files
AILang/examples/ct_3b_bad_qualified_known_module.ailx
T

24 lines
762 B
Plaintext

; Fieldtest — canonical-type-names, axis 2 (variant b): BadCrossModuleTypeRef
; — known module, unknown type. Author qualifies as `std_maybe.Widget`
; where `std_maybe` IS a workspace module but does not declare a
; `Widget` type. Per ct.1's load-time validator, this should be
; rejected with `BadCrossModuleTypeRef`.
(module ct_3b_bad_qualified_known_module
(import std_maybe)
(fn passthrough
(doc "Identity at std_maybe.Widget — `std_maybe` is real, but `Widget` is not in it.")
(type
(fn-type
(params (con std_maybe.Widget))
(ret (con std_maybe.Widget))))
(params w)
(body w))
(fn main
(type (fn-type (params) (ret (con Unit)) (effects IO)))
(params)
(body (do io/print_str "unreachable"))))