As the title says, there seems to be a problem with autocompletion for parameters in a macro-generated constructor, especially for anonymous types. Minimal example:
Main.hx
class Main
{
static function main() {
// Autocompletion works fine with a normal constructor:
new AnotherPerson(...
// But autocompletion doesn't work in a
// macro-generated constructor with an anonymous type
new Person(...
var p = new Person({birthYear: 1978, name: "Andreas"});
// But it works in a macro-generated method:
p.ageInYear(...
}
}
@:build(AddConstructor.run())
class Person
{
public var birthYear : Int;
public var name : String;
}
class AnotherPerson
{
public var birthYear : Int;
public var name : String;
public function new(data : { birthYear: Int, name: String }) {
this.birthYear = data.birthYear;
this.name = data.name;
}
}
I've tested on Sublime 3 with the latest Haxe package, also on HaxeDevelop 5.2.0.3. For anonymous types, it doesn't work in any of them. A simpler type like macro : Int works in Sublime.
As the title says, there seems to be a problem with autocompletion for parameters in a macro-generated constructor, especially for anonymous types. Minimal example:
Main.hx
AddConstructor.hx
I've tested on Sublime 3 with the latest Haxe package, also on HaxeDevelop 5.2.0.3. For anonymous types, it doesn't work in any of them. A simpler type like
macro : Int
works in Sublime.Cross-posted issue: https://github.com/HaxeFoundation/haxe/issues/5968