Skip to content

gdformat causes compiler error after formatting #374

@HeavyBro1337

Description

@HeavyBro1337

Version 4.3.4

result.layers[layer.name]["lights"] = (
                layer
                . get_children()
                . map(
                    func(c: Node):
                        if c is PointLight2D:
                            return {
                                "color": c.color.to_html(),
                                "position": c.global_position,
                                "rotation": c.global_rotation,
                                "scale": c.global_scale,
                                "texture": c.texture.resource_path,
                                "shadows": c.shadow_enabled,
                                "blend_mode": c.blend_mode
                            }
                        return null # unindent doesn't match the previous indentation level.
                )
                . filter(func(c): return c != null)
            )

It is fixed if I put a parenthesis next to return null. However, I don't think I can really enforce that in a CI/CD environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions