Skip to content

Commit

Permalink
Nothing type should not be Enum
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial committed Nov 12, 2023
1 parent e15299b commit 5ba85b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) {
'{ new GenericSurface(${ clsOf(a1) }, typeArgs = ${ Expr.ofSeq(typeArgs) }.toIndexedSeq) }
case r: Refinement =>
newGenericSurfaceOf(r.info)
case t if t <:< TypeRepr.of[scala.reflect.Enum] =>
case t if t <:< TypeRepr.of[scala.reflect.Enum] && !(t =:= TypeRepr.of[Nothing]) =>
/**
* Build a code for finding Enum instance from an input string value: {{ (cl: Class[_], s: String) =>
* Try(EnumType.valueOf(s)).toOption }}
Expand Down

0 comments on commit 5ba85b4

Please sign in to comment.