The formatter incorrectly splits generic type parameters (like Dictionary and Array) across multiple lines, breaking the syntax.
Input:
func test() -> Dictionary[String, String]:
return {}
Output (broken):
func test() -> Dictionary[
String,
String
]:
return { }
Expected:
The generic type should remain intact as Dictionary[String, String] on a single line.
Reproduction:
gdscript-formatter --max-line-length 10
This also occurs with Array[...] types and without --max-line-length on longer functions.
The formatter incorrectly splits generic type parameters (like Dictionary and Array) across multiple lines, breaking the syntax.
Input:
Output (broken):
Expected:
The generic type should remain intact as Dictionary[String, String] on a single line.
Reproduction:
gdscript-formatter --max-line-length 10This also occurs with Array[...] types and without --max-line-length on longer functions.