fieldtest: canonical-type-names — 5 examples, 9 findings
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
; Fieldtest — canonical-type-names, axis 2: BadCrossModuleTypeRef.
|
||||
;
|
||||
; A consumer references a fully qualified type `mystery.Widget`
|
||||
; where the module `mystery` does not exist in the workspace.
|
||||
; Per ct.1's load-time validator, this should be rejected with
|
||||
; `BadCrossModuleTypeRef` naming the unknown owner.
|
||||
|
||||
(module ct_3_bad_qualified
|
||||
|
||||
(fn passthrough
|
||||
(doc "Identity at mystery.Widget — but `mystery` is not a workspace module.")
|
||||
(type
|
||||
(fn-type
|
||||
(params (con mystery.Widget))
|
||||
(ret (con mystery.Widget))))
|
||||
(params w)
|
||||
(body w))
|
||||
|
||||
(fn main
|
||||
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||
(params)
|
||||
(body (do io/print_str "unreachable"))))
|
||||
Reference in New Issue
Block a user