Support prefabs for unsafe-struct-ref
This commit is contained in:
parent
5d708ab53f
commit
8e6710438f
|
@ -81,6 +81,8 @@
|
|||
(match (single-value #'struct)
|
||||
[(tc-result1: (and struct-t (app resolve (Struct: _ _ (list (fld: flds _ _) ...) _ _ _))))
|
||||
(tc/hetero-ref #'index flds struct-t "struct")]
|
||||
[(tc-result1: (and struct-t (app resolve (Prefab: _ (list flds ...)))))
|
||||
(tc/hetero-ref #'index flds struct-t "prefab struct")]
|
||||
[s-ty (tc/app-regular #'form expected)]))
|
||||
;; vector-ref on het vectors
|
||||
(pattern (~and form ((~or vector-ref unsafe-vector-ref unsafe-vector*-ref) vec:expr index:expr))
|
||||
|
|
|
@ -34,3 +34,6 @@
|
|||
(poly-x (poly "foo"))
|
||||
(poly-x (poly 3))
|
||||
(poly-x #s(poly "foo"))
|
||||
|
||||
;; Test match (indirectly tests unsafe-struct-ref)
|
||||
(match (foo 'x) [(foo s) s])
|
||||
|
|
Loading…
Reference in New Issue
Block a user