bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #40710] Class aliases and array definition


From: Matthieu Vachon
Subject: [Bug-kawa] [bug #40710] Class aliases and array definition
Date: Tue, 26 Nov 2013 15:24:05 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36

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

                 Summary: Class aliases and array definition
                 Project: Kawa
            Submitted by: maoueh
            Submitted on: Tue 26 Nov 2013 03:24:04 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

It would be cool if aliases could be resolved to aliased class when creating
arrays.

For example, the following will fail in the REPL:


(define-alias <MyString> <java.lang.String>)
(make <MyString[]> size: 1)


This will generate the following output in the REPL:


$ kawa
#|kawa:1|# (scheme-implementation-version)
1.14
#|kawa:2|# (define-alias <MyString> <java.lang.String>)
#|kawa:3|# (make <MyString[]> size: 1)
<unknown>: internal compile error - caught java.lang.RuntimeException: no such
class: MyString
    gnu.bytecode.ObjectType.getReflectClass(ObjectType.java:129)
    gnu.bytecode.ClassType.addEnclosingMember(ClassType.java:204)
    gnu.bytecode.ClassType.getEnclosingMember(ClassType.java:191)
    gnu.bytecode.ClassType.doFixups(ClassType.java:1146)
    gnu.bytecode.ClassType.writeToStream(ClassType.java:1166)
    gnu.bytecode.ClassType.writeToArray(ClassType.java:1224)
    gnu.expr.ModuleExp.evalToClass(ModuleExp.java:88)
    gnu.expr.ModuleExp.evalModule1(ModuleExp.java:251)
    gnu.expr.ModuleExp.evalModule(ModuleExp.java:205)
    kawa.Shell.run(Shell.java:279)
    kawa.Shell.run(Shell.java:194)
    kawa.Shell.run(Shell.java:175)
    kawa.repl.main(repl.java:873)


There will be a similar error when compiling the code. For now, the simple
workaround is to use the non-aliased class name.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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