From 5ba85b4ab85b7c55511960ae05cbc9277391a65a Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Sat, 11 Nov 2023 22:45:53 -0800 Subject: [PATCH] Nothing type should not be Enum --- .../wvlet/airframe/surface/CompileTimeSurfaceFactory.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala b/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala index a8222a5f06..e814fa6672 100644 --- a/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala +++ b/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala @@ -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 }}