-
-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
I use gdformat in my project for checking before git commit. I experienced that it transformed my code to invalid code.
The following example reproduces what I have experienced.
Input:
func example_code() -> void:
var array = [1,2,3,4,5,6,7,8,9]
var string_array: Array[String] = []
string_array.assign(
(
array.map(
func(number_with_very_long_name: int): \
return str(number_with_very_long_name) + "some unnecessary long string to make this bug reproducible"
)
as Array[int]
)
)Outcome:
func example_code() -> void:
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9]
var string_array: Array[String] = []
string_array.assign(
(
array.map(
func(number_with_very_long_name: int):
return (
str(number_with_very_long_name)
+ "some unnecessary long string to make this bug reproducible"
)
)
as Array[int]
)
)It seems that a \ after the lambda function header would fix it.
func(number_with_very_long_name: int): \
I tried it with gdtoolkit 4.3.4 and gdtoolkit 4.3.3.
Metadata
Metadata
Assignees
Labels
No labels