1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-22 03:30:22 +02:00

Don't simplify 'equal?' to 'eq?' when constant is an *inexact* small integer.

* module/language/tree-il/primitives.scm (*primitive-expand-table*):
  Refine test for fixnums to verify that the small integer is exact.

* test-suite/tests/tree-il.test ("primitives"): Add test.
This commit is contained in:
Mark H Weaver 2012-10-07 23:57:13 -04:00
parent 2446f8e126
commit ebd363161e
2 changed files with 5 additions and 0 deletions

View file

@ -106,6 +106,10 @@
(apply (primitive equal?) (const 42) (toplevel x))
(apply (primitive eq?) (const 42) (toplevel x)))
(pass-if-primitives-resolved
(apply (primitive equal?) (const 42.0) (toplevel x))
(apply (primitive equal?) (const 42.0) (toplevel x)))
(pass-if-primitives-resolved
(apply (primitive equal?) (const #nil) (toplevel x))
(apply (primitive eq?) (const #nil) (toplevel x))))