Skip to content

Commit

Permalink
Fixed asInstanceOf.
Browse files Browse the repository at this point in the history
  • Loading branch information
robby-phd committed Mar 8, 2025
1 parent 76cab5d commit 3dd63b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/src/main/scala/org/sireum/anvil/Anvil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2377,7 +2377,7 @@ import Anvil._
var grounds = ISZ[AST.IR.Stmt.Ground]()
for (g <- b.grounds) {
g match {
case AST.IR.Stmt.Assign.Temp(lhs, rhs: AST.IR.Exp.Type, pos) if !isScalar(rhs.t) =>
case g@AST.IR.Stmt.Assign.Temp(lhs, rhs: AST.IR.Exp.Type, pos) if !isScalar(rhs.t) =>
val sha3Types = sha3TypeImplOf(rhs.t)
val tLabel = fresh.label()
val fLabel = fresh.label()
Expand All @@ -2395,7 +2395,7 @@ import Anvil._
ISZ(AST.IR.Stmt.Assign.Temp(lhs, AST.IR.Exp.Bool(F, pos), pos)),
egoto)
else
(ISZ(),
(ISZ(g(rhs = rhs.exp)),
AST.IR.Jump.Goto(eLabel, pos),
printStringLit(T, s"Cannot cast to ${rhs.t}\n", pos),
if (config.runtimeCheck) AST.IR.Jump.Halt(pos)
Expand Down

0 comments on commit 3dd63b2

Please sign in to comment.