bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #38026] Mixed variables scope


From: Alex Moiseenko
Subject: [Bug-kawa] [bug #38026] Mixed variables scope
Date: Sat, 05 Jan 2013 23:38:18 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0

URL:
  <http://savannah.gnu.org/bugs/?38026>

                 Summary: Mixed variables scope
                 Project: Kawa
            Submitted by: imdagger
            Submitted on: Sat 05 Jan 2013 11:38:16 PM GMT
                Category: Scheme language
                Severity: 3 - Normal
              Item Group: Run-time exception
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38026>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]