Skip to content

Missing code assist while typing a ternary operator #359

@mauromol

Description

@mauromol

Consider this example:

package test

class Ternary {

	static main(args) {
		def a = true? String.val|
	}
}

Assume I want to call String.valueOf(boolean). Invoke code assist at "|": no suggestion is given.
In order to make Groovy give me some suggestions, I have to complete the second assignment, i.e. something like this:

def a = true? String.val| : 'false'

If you invoke code assist at "|", it then works.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions