bugKawa - Bugs: bug #38026, Mixed variables scope

 
 

bug #38026: Mixed variables scope

Submitted by:  Alex Moiseenko <imdagger>
Submitted on:  Sat 05 Jan 2013 11:38:16 PM UTC  
 
Category:  Scheme language Severity:  3 - Normal
Item Group:  Run-time exception Status:  Fixed
Privacy:  Public Assigned to:  Per Bothner <bothner>
Open/Closed:  Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 19 Jul 2013 12:43:54 AM UTC, comment #1:

I checked in a fix and your test-case.

Sorry for letting this one sit so long.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 05 Jan 2013 11:38:16 PM UTC, original submission:

I'm not sure that my code snippet is allowed in real projects, but i have met similar situation again like lambda-in-class-1.scm tries to cover:

(define-class A ()
((some-method (x ::int) (f ::procedure)) ::int
(f x)))

(define-class B ()
(p ::int 42)
((another-method) ::int
((A):some-method 13 (lambda (o ::int) ::int (+ o p)))))

(display ((B):another-method)) (newline)

For define-class (but not for define-simple-class) it fails with:
java.lang.IncompatibleClassChangeError: Class test$frame does not implement the requested interface test$B
at test$B$class.lambda1(test.scm:8)
at test$frame.apply1(test.scm:8)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:192)
at test$A$class.someMethod(test.scm:3)
at test$A$class.someMethod(test.scm)
at test$B$class.anotherMethod(test.scm:8)
at test$B$class.anotherMethod(test.scm)
at test.run(test.scm:10)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:309)
at gnu.expr.CompiledModule.evalModule(CompiledModule.java:41)
at gnu.expr.CompiledModule.evalModule(CompiledModule.java:60)
at kawa.Shell.runFile(Shell.java:505)
at kawa.Shell.runFileOrClass(Shell.java:420)
at kawa.repl.main(repl.java:879)

I understand that I can write "(this):p" instead of "p", but I guess Kawa should not fail in this situation and maybe try to warn about missed "(this)" construction.

Alex Moiseenko <imdagger>

 

(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

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  • -email is unavailable- added by imdagger (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-19 bothner StatusNone => Fixed
        Assigned toNone => bothner
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.3