ngala...@abinitio.com
unread,Jan 15, 2015, 4:15:10 PM1/15/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to us...@groovy.codehaus.org
Hello,
In a class that is @CompileStatic, if
I have:
void foo()
{
int i
String s
(i, s) = intAndStr()
...
}
and
List intAndStr()
{
[3,
"hi"]
}
I get the compilation error:
Error:(700, 14) Groovyc: [Static type
checking] - Multiple assignments without list expressions on the right
hand side are unsupported in static type checking mode
I'm having trouble interpreting the
error message. To me, intAndStr() looks like a "list expression".
Does this mean that multiple return
values are not supported at all under @CompileStatic?
If they are supported, how do I declare
intAndStr()?
Thanks,
Neil
NOTICE from Ab Initio: This email (including any attachments) may contain
information that is subject to confidentiality obligations or is legally
privileged, and sender does not waive confidentiality or privilege. If
received in error, please notify the sender, delete this email, and make
no further use, disclosure, or distribution.