We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 189f19a commit 71330a9Copy full SHA for 71330a9
src/HybridStructs.jl
@@ -69,7 +69,11 @@ function _hybrid(expr)
69
end
70
71
72
- union_struct = :(const $struct_name = Union{$struct_name_mut, $struct_name_immut})
+ if type_params == []
73
+ union_struct = :(const $struct_name = Union{$struct_name_immut, $struct_name_mut})
74
+ else
75
+ union_struct = :(const $struct_name = Union{$struct_name_immut{$(type_params...)}, $struct_name_mut{$(type_params...)}} where {$(type_params...)})
76
+ end
77
78
return quote
79
if !(@isdefined $abstract_struct_name_mut) && $(namify(abstract_type)) != Any
@@ -97,4 +101,4 @@ end
97
101
98
102
include("precompile.jl")
99
103
100
-end
104
+end
0 commit comments