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: Per Bothner
Subject: [Bug-kawa] [bug #40710] Class aliases and array definition
Date: Tue, 26 Nov 2013 17:12:03 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36

Update of bug #40710 (project kawa):

                  Status:                    None => Invalid                
             Assigned to:                    None => bothner                

    _______________________________________________________

Follow-up Comment #1:

Ah, but it does work, if you use the right syntax:

#|kawa:1|# (define-alias <MyString> <java.lang.String>)
#|kawa:2|# (make <MyString>[] size: 1)
[#!null]

Don't think of the syntax <Foo> as the syntax for a class or type-specifier. 
It's just an ordinary name, as is <Foo[]>.  It's just that <Foo> and <Foo[]>
have a *default binding* to the class or array type *if* class Foo exists (at
compile-time).  But in newer versions of Kawa, so does the syntax without
angle-brackets:

#|kawa:4|# (define-alias MyString java.lang.String)
#|kawa:5|# (make MyString[] size: 1)
[#!null]
#|kawa:6|# (make java.lang.String[] size: 1)
[#!null]

You can also mix the forms:

#|kawa:8|# (define-alias MyString <java.lang.String>)
#|kawa:9|# (make MyString[] size: 1)
[#!null]

There is a slight difference between <ClassName> and plain ClassName, but it
is pretty subtle, mainly in noting intent.

    _______________________________________________________

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]