Skip to content

[haxe] Auto-build macro in the same file breaks completion #2183

Open
@gene-pavlovsky

Description

@gene-pavlovsky

With the latest development version, an auto-build macro breaks completion.

Minimal example:

package;
#if macro
import haxe.macro.Expr;

class A {
	macro public static function build():Array<Field> {
	}
}
#else

@:build(A.build())
class A {
	public static function foo(bar:Bool):Void{
		// XXX
	}
}
#end

On the line marked as // XXX:

  • Remove the comment
  • Type if (ba
  • Press Ctrl+Space to activate the completion
    Expected: bar offered as completion
    Actual: all kinds of types and keywords offered as completion (A, abstract, Access, etc.)

Remove the macro public static function build and the completion works again.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions