Skip to content

Commit

Permalink
Bigint compile RangeError
Browse files Browse the repository at this point in the history
  • Loading branch information
shiroyk committed Aug 22, 2024
1 parent e9606b3 commit b02b9b5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler_expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1268,9 +1268,6 @@ func (e *compiledLiteral) emitGetter(putOnStack bool) {
}

func (e *compiledLiteral) constant() bool {
if _, ok := e.val.(*valueBigInt); ok {
return false
}
return true
}

Expand Down Expand Up @@ -2451,7 +2448,7 @@ func (c *compiler) emitThrow(v Value) {
if o, ok := v.(*Object); ok {
t := nilSafe(o.self.getStr("name", nil)).toString().String()
switch t {
case "TypeError":
case "TypeError", "RangeError":
c.emit(loadDynamic(t))
msg := o.self.getStr("message", nil)
if msg != nil {
Expand Down

0 comments on commit b02b9b5

Please sign in to comment.