mercredi 24 février 2021

Groovy doesn't like nested blocks of conditionals?

Anyone familiar why the following won't compile?

list.each { item ->
  if(item.get('foo').equals('bar')){
    // do things 
  }
}

I get the following error but it's not clear:

Unexpected input: '{'

Aucun commentaire:

Enregistrer un commentaire