Skip to content

Commit

Permalink
codegen: fix oneOf types without common parent for scala 3 (#4261)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson authored Jan 13, 2025
1 parent 3411caa commit 4c8fe25
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ class EndpointGenerator {
if (allElemTypes.size == 1) allElemTypes.head
else
allElemTypes.map { s => parentMap.getOrElse(s, Nil).toSet }.reduce(_ intersect _) match {
case s if s.isEmpty && targetScala3 => types.mkString(" | ")
case s if s.isEmpty && targetScala3 => types.flatten.mkString(" | ")
case s if s.isEmpty => "Any"
case s if targetScala3 => s.mkString(" & ")
case s => s.mkString(" with ")
Expand Down

0 comments on commit 4c8fe25

Please sign in to comment.