groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aarjav Patel <aar...@semandex.net>
Subject Literal negative values as keys of a map
Date Wed, 05 Apr 2017 15:26:45 GMT
Hi,

Right now when initializing a map, we have to use parenthesis sometimes:
Map<Integer, ?> foo = [1: 'ok', (-1): 'not ok']
If it's not too hard, I'd like to be able to define it as:
Map<Integer, ?> foo = [1: 'ok', -1: 'all is well :)']

Although there might be a steep learning curve for me, let me know if
there's anything I might be able to help with.

Thanks,

- Aarjav

Mime
View raw message