otto: TestBinaryShiftOperation test fails

got ./...
panic triggered: test
interrupt
interrupt
~~~ FAIL: (Terst)
	runtime_test.go:592:
		FAIL (==)
		     got: 1073741823 (int32)
		expected: -1073741824 (int)
--- FAIL: TestBinaryShiftOperation (0.00s)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 31 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Passing with latest commit:

commit a4c7202cfd14ce01451d87b48c0bce0620431b86 (HEAD -> fix/number-to-ints, origin/fix/number-to-ints)
Author: Steven Hartland <steven.hartland@multiplay.co.uk>
Date:   Wed Nov 30 16:58:51 2022 +0000

    fix: use int64 not uint64 for uint cases

    Try using int64 instead of uint64 for uint cases.
=== RUN   Test_issue457_toInt32_3
abs: 2.147483648e+09
iv: 2.147483648e+09
iv32: 2.147483648e+09
res1: -2147483648
--- FAIL: Test_issue457_toInt32_3 (0.00s)