gosu-lang/Gosu-IntelliJ-Plugin — Issue #2: Make type inference work with code completion
Author: chrisgow
Created: 2012-03-08 15:41:35+00:00
State: open

I have the following:

public enum Fruit {
APPLE,
ORANGE,
STRAWBERRY,
BANANA
}

class Blender {
function mix(f : Fruit) {
// blend, blend
}
}

make_a_smoothie.gsp:

var b = new Blender()
b.mix(BANANA)

In IJ right now when I am typing b.mix() I have to first type Fruit.BANANA (or use code completion) and then go back and remove the Fruit. enum bit.

Ideally, the code completion should look at the type expected from the mix method and automatically present me with a list of the enum options.