Skip to content

Commit

Permalink
Fix lookupStr not to lookup when str is Bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
hyp3rflow committed Jul 6, 2023
1 parent a47e674 commit ee51a7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/scala/esmeta/analyzer/domain/state/TypeDomain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,9 @@ object TypeDomain extends state.Domain {
// string lookup
private def lookupStr(str: BSet[String], prop: ValueTy): ValueTy =
var res = ValueTy()
if (str.isBottom) return res
if (prop.str contains "length") res ||= MathT
if (!str.isBottom && !prop.math.isBottom) res ||= CodeUnitT
if (!prop.math.isBottom) res ||= CodeUnitT
// TODO if (!str.isBottom)
// boundCheck(
// prop,
Expand Down

0 comments on commit ee51a7e

Please sign in to comment.