-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix formatting of lambda participating in dot chain, fixes #334
- Loading branch information
Showing
3 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/formatter/input-output-pairs/bug_334_multiline_lambda.in.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class WeaponSystemBullet extends Node: | ||
pass | ||
func foo(): | ||
var bullet_scene | ||
assert( | ||
(func() -> bool: | ||
var test_instance: Node = bullet_scene.instantiate() | ||
var is_needed_class: bool = test_instance is WeaponSystemBullet | ||
test_instance.free() | ||
return is_needed_class) | ||
.call() | ||
) |
17 changes: 17 additions & 0 deletions
17
tests/formatter/input-output-pairs/bug_334_multiline_lambda.out.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class WeaponSystemBullet: | ||
extends Node | ||
pass | ||
|
||
|
||
func foo(): | ||
var bullet_scene | ||
assert( | ||
( | ||
(func() -> bool: | ||
var test_instance: Node = bullet_scene.instantiate() | ||
var is_needed_class: bool = test_instance is WeaponSystemBullet | ||
test_instance.free() | ||
return is_needed_class) | ||
. call() | ||
) | ||
) |