bugKawa - Bugs: bug #24369, Use of colon in define in...

 
 

bug #24369: Use of colon in define in evaluated form does not bind properly in environment.

Submitter:  None
Submitted:  Wed 24 Sep 2008 07:08:20 PM UTC
   
 
Category:  Scheme language Severity:  3 - Normal
Item Group:  Run-time exception Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 24 Sep 2008 07:11:54 PM UTC, comment #1: 

this affects both 1.9.1 and TRUNK

Anonymous
Wed 24 Sep 2008 07:08:20 PM UTC, original submission:  

examples:

works:

(define my-env (interaction-environment))

(define (eval:something)
  (eval '(define (with:colon x) (+ x 1)) my-env))

(eval:something)
(display (with:colon 1)) (newline)

also works:

(define my-env (interaction-environment))

(define (eval:something)
  (eval '(define (nocolon x) (+ x 1)) my-env)
  (display (nocolon 1)) (newline))

(eval:something)

fails:

(define my-env (interaction-environment))

(define (eval:something)
  (eval '(define (with:colon x) (+ x 1)) my-env)
  (display (environment-bound? (interaction-environment) 'with:colon)) (newline)
  (display (environment-bound? my-env 'with:colon)) (newline)
  (display (with:colon 1)) (newline))

(eval:something)

->

#|kawa:1|# (load "bugs/kawa/eval/fail.scm")
#t
#t
bugs/kawa/eval/fail.scm:7:13: unbound location with
        at gnu.mapping.Location.get(Location.java:67)
        at atInteractiveLevel$3.eval$ClSomething(fail.scm:7)
        at atInteractiveLevel$3.apply0(fail.scm:3)
        at gnu.expr.ModuleMethod.apply0(ModuleMethod.java:176)
        at gnu.expr.ModuleMethod.apply(ModuleMethod.java:150)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:296)
        at kawa.Shell.run(Shell.java:230)
        at kawa.standard.load.loadSource(load.java:110)
        at kawa.standard.load.apply(load.java:210)
        at kawa.standard.load.apply2(load.java:147)
        at kawa.standard.load.apply1(load.java:138)
        at gnu.mapping.Procedure.apply(Procedure.java:112)
        at gnu.mapping.Procedure.apply(Procedure.java:95)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:296)
        at kawa.Shell.run(Shell.java:230)
        at kawa.Shell.run(Shell.java:172)
        at kawa.Shell.run(Shell.java:159)
        at kawa.repl.main(repl.java:844)
#|kawa:2|# make: * [repl] Error 130


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code