Issue summarized from a run of the Scala Open Community Build
When compiling this project with -Yexplicit-nulls enabled, the project fails with the following message:
java.lang.RuntimeException: Unspported type :FlexibleType(OrType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class java)),object lang),class String),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Null)),TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class java)),object lang),class String))
The cause is from
|
def resolveType(typeRepr: TypeRepr, params: Map[String, TypeRepr]): Expr[AnyRef] = { |
|
var tpe = typeRepr |
|
var args: List[Expr[AnyRef]] = List.empty |
|
tpe match { |
|
case d: TypeRef => if (tpe.typeSymbol.flags.is(Flags.Param) && params.contains(tpe.typeSymbol.name)) tpe = params(tpe.typeSymbol.name) |
|
case c: AppliedType => args = resolveParamTypes(c, params) |
|
case d: AnnotatedType => tpe = d.underlying |
|
case c: ConstantType => |
|
case n: OrType => |
|
case _ => throw new RuntimeException("Unspported type :" + tpe) |
|
} |
|
if args.isEmpty then typeOf(tpe) |
|
else '{ Array(${ typeOf(tpe) }, Array(${ Varargs(args) }: _*)) } |
|
} |
where
FlexibleTypes are not handled.
The fix is to add a corresponding case to the match and recurse on the underlying type. This might require a minor refactor.
Issue summarized from a run of the Scala Open Community Build
When compiling this project with -Yexplicit-nulls enabled, the project fails with the following message:
The cause is from
commons/src/main/scala/org/beangle/commons/lang/reflect/BeanInfoDigger.scala
Lines 198 to 211 in 76013a8
The fix is to add a corresponding case to the match and recurse on the underlying type. This might require a minor refactor.