Skip to content

Commit

Permalink
Made sure val for constant invariant.
Browse files Browse the repository at this point in the history
  • Loading branch information
robby-phd committed Sep 15, 2023
1 parent 194454d commit a535c39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/src/main/scala/org/sireum/logika/Logika.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ import Util._
val (s1, v) = nameIntro(pos, s0, name :+ id, t, Some(pos))
return (s1, v)
case res: AST.ResolvedInfo.LocalVar =>
if (res.context.isEmpty && context.methodName.nonEmpty) {
if (res.isVal && res.context.isEmpty && context.methodName.nonEmpty) {
th.nameMap.get(ISZ(res.id)) match {
case Some(info: Info.LocalVar) =>
AST.Util.constantInitOpt(info.initOpt, info.typedOpt) match {
Expand Down

0 comments on commit a535c39

Please sign in to comment.