Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar committed Jul 30, 2024
1 parent 782f0be commit 6099eb4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/agents.jl
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,13 @@ macro multiagent(typedef)
model to use the new methodology."
return esc(_multiagent(QuoteNode(:opt_speed), typedef))
else
return esc(:($DynamicSumTypes.@sumtype $typedef))
if typedef.head === :call
abstract_type = :AbstractAgent
type_with_variants = typedef
elseif typedef.head === :(<:)
abstract_type = typedef.args[2]
type_with_variants = typedef.args[1]
end
return esc(:($DynamicSumTypes.@sumtype $type_with_variants <: $abstract_type))
end
end

0 comments on commit 6099eb4

Please sign in to comment.