Skip to content

Commit

Permalink
resultType type fix in DeserializeContextDef
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Jan 8, 2025
1 parent e6bf0f4 commit 91b7fc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sc/shared/src/main/scala/sigma/compiler/ir/Base.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import scala.annotation.unchecked.uncheckedVariance
import scala.annotation.{implicitNotFound, unused}
import scala.collection.compat.immutable.ArraySeq
import scala.collection.mutable
import scala.language.implicitConversions
import scala.language.{existentials, implicitConversions}

/**
* The Base trait houses common AST nodes. It also manages a list of encountered definitions which
Expand Down Expand Up @@ -207,8 +207,8 @@ abstract class Base { thisIR: IRContext =>
/**
* Def done in order to carry on DeserializeContext through stages of compilation intact
*/
case class DeserializeContextDef[V <: SType](d: DeserializeContext[V], e: Elem[V]) extends Def[V] {
override def resultType: Elem[V] = e
case class DeserializeContextDef[V <: SType](d: DeserializeContext[V], e: Elem[V#WrappedType]) extends Def[V#WrappedType] {
override def resultType: Elem[V#WrappedType] = e
}

/** Base class for virtualized instances of type companions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ trait GraphBuilding extends Base with DefRewriting { IR: IRContext =>
ctx.getVar(id)(e)

case d: DeserializeContext[T] =>
val e = stypeToElem(d.tpe).asInstanceOf[Elem[T]]
val e = stypeToElem(d.tpe)
DeserializeContextDef(d, e)

case ValUse(valId, _) =>
Expand Down

0 comments on commit 91b7fc5

Please sign in to comment.