Re: Static calls with qualified class name

24 views
Skip to first unread message

Sven Efftinge

unread,
Apr 25, 2013, 4:32:23 PM4/25/13
to xtend...@googlegroups.com
it is 

java::lang::String::format(…)

but we are working on allowing the Java syntax as well.

On Apr 25, 2013, at 10:20 PM, vistall...@gmail.com wrote:

Example:

println(String::format("this is one %d", 1))

Ill ok.  

But if i write 

println(java.lang.String::format("this is one %d", 1)) 

Compiler cant compile it.


But this 

static val String AA = ""
static val java.lang.String AB = ""

Valid 

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sebastian Zarnekow

unread,
Apr 26, 2013, 3:22:15 AM4/26/13
to xtend...@googlegroups.com
Hi,

the code compiles fine for me with the Eclipse Java Compiler, even though it'll give a runtime exception (stackoverflow).
What error message do you get from JavaC?

Regards,
Sebastian


On 26.04.2013, at 09:13, vistall...@gmail.com wrote:

Using the opportunity, I ask, this bug is known ? 

val (String) => String a = [c | a + c]

This code is valid by Xtend compiler, but invalid by Java compiler 

Sebastian Zarnekow

unread,
Apr 26, 2013, 3:52:21 AM4/26/13
to xtend...@googlegroups.com
I see, thanks for clarifying. I thought it was a field declaration. We are aware of the problem but I filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=406620 for the issue so it doesn't get lost.

Regards,
Sebastian

On 26.04.2013, at 09:26, vistall...@gmail.com wrote:

'a' is not resolved.

U can see on screenshot - code and message
Reply all
Reply to author
Forward
0 new messages