Skip to content

whitespace typeHintColonPolicy doesn't apply to enums and @:overload #488

Closed
@jorisbinkies

Description

@jorisbinkies

Describe the bug

I have set "typeHintColonPolicy": "around", because we like the spaces between the variable, colon and typehint. However, this does not seem to be applied to arguments of enums. I also noticed it does not apply the whitespace to the return arguments of @:overloads (might be related to #184)

Input file

enum LoadState
{
	NotLoaded;
	Loaded;
	Loading(progress:Float);
}
extern class Angular
{
	@:overload(function(element:js.html.Element):AngularElement {})
	public static function element(name:String):AngularElement;
}

Broken output

enum LoadState
{
	NotLoaded;
	Loaded;
	Loading(progress:Float);
}
extern class Angular
{
	@:overload(function(element : js.html.Element):AngularElement {})
	public static function element(name : String) : AngularElement;
}

Expected output

enum LoadState
{
	NotLoaded;
	Loaded;
	Loading(progress : Float);
}
extern class Angular
{
	@:overload(function(element : js.html.Element) : AngularElement {})
	public static function element(name : String) : AngularElement;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtokentreerequires fix in tokentreewhitespacemissing or incorrect space around token

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions