Skip to content

Indented function params rules #12554

Closed
@tgodzik

Description

@tgodzik

Compiler version

3.0.0

Minimized code

This one compiles:

def f(s: String)(t: String) = s"$t: $s"

def g =
  f("Foo")
    ("Bar")

but:

def f(s: String)(t: String) = s"$t: $s"

def g =
  f("Foo")
  ("Bar")

does not.

This looks like a feature/bug connected to optional braces and I am not sure if the exact rule is mentioned anywhere. It's not mentioned here https://dotty.epfl.ch/docs/reference/other-new-features/indentation.html as far as I can tell.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions