haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Skip default type parameters with _

Open kLabz opened this issue 2 years ago • 3 comments

(needed an issue number for tests)

Allow this:

function main() {
    var a:A<_,Int>;
    $type(a); // A<String,Int>
}

typedef A<K = String, V> = haxe.ds.BalancedTree<K,V>;

kLabz avatar Apr 19 '23 08:04 kLabz

Uhm, did we agree to do this? I can't remember...

Simn avatar Feb 06 '24 10:02 Simn

Well, I did agree with myself there :grin:

iirc you were mostly worried about that syntax being potentially useful for something else, but I don't remember what

kLabz avatar Feb 06 '24 10:02 kLabz

Random idea: A<default, Int>.

back2dos avatar Feb 06 '24 10:02 back2dos