Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for struct_type in (:Struct, :Mutable, :CustomStruct, :OrderedStruct, :AbstractT
```
is equivalent to
```julia
StructTypes.StructType(::Type{MyStruct}) = StructType.Struct()
StructTypes.StructType(::Type{MyStruct}) = StructTypes.$(isolate_name($struct_type))()
```
and
```julia
Expand All @@ -29,7 +29,7 @@ for struct_type in (:Struct, :Mutable, :CustomStruct, :OrderedStruct, :AbstractT
struct MyStruct
val::Int
end
StructTypes.StructType(::Type{MyStruct}) = StructType.Struct()
StructTypes.StructType(::Type{MyStruct}) = StructTypes.$(isolate_name($struct_type))()
```
""" macro $struct_type(expr)
return macro_constructor(expr, $struct_type)
Expand Down
Loading