Skip to content

Commit

Permalink
allow anything expect TResource to coerce to TAnyValue without other …
Browse files Browse the repository at this point in the history
…coercions
  • Loading branch information
pieter-bos committed Oct 25, 2023
1 parent da448ce commit bb99abc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/col/vct/col/typerules/CoercionUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ case object CoercionUtils {
case (TResourceVal(), TResource()) => CoerceResourceValResource()
case (TBool(), TResource()) => CoerceBoolResource()

case (_, TAnyValue()) => CoerceSomethingAnyValue(source)

case (source @ TOption(innerSource), target @ TOption(innerTarget)) =>
CoerceMapOption(getCoercion(innerSource, innerTarget).getOrElse(return None), innerSource, innerTarget)
case (source @ TTuple(Seq(leftSource, rightSource)), target @ TTuple(Seq(leftTarget, rightTarget))) =>
Expand Down

0 comments on commit bb99abc

Please sign in to comment.