Skip to content

Commit

Permalink
rename to DictKeyWithLabelExpressionParser
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Philipiak committed Nov 28, 2024
1 parent 8a33cf3 commit 2c855f1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ case class DictKeyWithLabelExpressionTypingInfo(key: String, label: Option[Strin

// We should support at least types defined in FragmentParameterValidator#permittedTypesForEditors
override def typingResult: TypingResult = expectedType match {
case clazz: TypedClass if clazz.canBeSubclassOf(Typed[Long]) && Try(key.toLong).toOption.isDefined =>
case clazz: TypedClass if clazz.canBeConvertedTo(Typed[Long]) && Try(key.toLong).toOption.isDefined =>
TypedObjectWithValue(clazz.runtimeObjType, key.toLong)
case clazz: TypedClass if clazz.canBeSubclassOf(Typed[Boolean]) && Try(key.toBoolean).toOption.isDefined =>
case clazz: TypedClass if clazz.canBeConvertedTo(Typed[Boolean]) && Try(key.toBoolean).toOption.isDefined =>
TypedObjectWithValue(clazz.runtimeObjType, key.toBoolean)
case clazz: TypedClass if clazz.canBeSubclassOf(Typed[String]) =>
case clazz: TypedClass if clazz.canBeConvertedTo(Typed[String]) =>
TypedObjectWithValue(clazz.runtimeObjType, key)
case _ => expectedType
}
Expand Down

0 comments on commit 2c855f1

Please sign in to comment.