Skip to content

Commit

Permalink
Introduce @as_record syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jariji authored and thautwarm committed Feb 16, 2024
1 parent a6891f8 commit fb9c79a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/syntax/records.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Records
----------------------

To add support pattern-matching deconstruction for a regular struct `A`, invoke `@as_record A`. Then `@match` can deconstruct `A(a,b,c)` using the same `A(a,b,c)` syntax as the constructor.

```julia-console
julia> struct A
a
Expand Down

0 comments on commit fb9c79a

Please sign in to comment.