groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <mg...@arscreat.com>
Subject Groovy 3.0: Multiline list/map arguments
Date Fri, 06 Apr 2018 16:13:36 GMT
Quick question, since I just came across that again in Groovy 2.4: Will 
Groovy 3.0 support passing multiline lists/maps to a method without 
surrounding it with brackets ?

E.g.

def foo(List l) { ... }

could be called giving

final result = foo [
      "some rather long literal string argument",
     "another long literal string argument",
     "and so on and so forth (not the language)",
]

instead of

final result = foo ([
      "some rather long literal string argument",
     "another long literal string argument",
     "and so on and so forth (not the language)",
])




Mime
View raw message