Open
Description
(library (beep-lib)
(export cons beep)
(import (chezscheme))
(define beep 'beep)
(define-property cons beep #t))
(library (boop-lib)
(export button)
(import (chezscheme)
(rename (beep-lib)
(beep boop)))
(define (button) (display boop)))
Attempting to load and import the (boop-lib)
causes an error:
Exception: multiple definitions for cons in body (library (boop-lib) (export button) (import (chezscheme) (rename (...) (...))) (define (button) (display boop))) at line 1, char 1 of boop-lib.sls
This is incorrect because cons
has the same binding in both libraries from which (boop-lib)
imports it, and there is no identifier property conflict.
This only happens when one of the bindings imported from the re-exporting library is renamed. This library works fine:
(library (button-lib)
(export button)
(import (chezscheme)
(beep-lib))
(define (button) (display beep)))
(Chez Scheme Version 10.1.0)
Metadata
Metadata
Assignees
Labels
No labels