Skip to content

Commit 92d1240

Browse files
fix: handle subtyped structs in @matchable
1 parent 675f8a2 commit 92d1240

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ end
210210
macro matchable(expr)
211211
@assert expr.head == :struct
212212
name = expr.args[2]
213+
if Meta.isexpr(name, :<:)
214+
name = name.args[1]
215+
end
213216
if name isa Expr && name.head === :curly
214217
name = name.args[1]
215218
end

0 commit comments

Comments
 (0)