Skip to content

update indentation.md: fix flags - prefix #12437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2021

Conversation

unkarjedy
Copy link
Contributor

Also, looks like -language:Scala2 doesn't disable indentation-based-syntax.
For example, this is compiled fine and prints 123123123:

@main
def main1(): Unit = {
  def foo() =
    println(1)
    println(2)
    println(3)

  foo()
  foo()
  foo()
}

@som-snytt
Copy link
Contributor

Do you wish to add the clarification about -old-syntax? I already joked that it should be -mature-syntax.

@unkarjedy
Copy link
Contributor Author

I initially wanted to add the clarification for -old-syntax in
https://scalacenter.github.io/scala-3-migration-guide/docs/compiler-options/new-compiler-options.html
(Currently, the description is quite poor. It doesn't mention all other new control syntax, and bracelets syntax)

But I decided not to do that because I can't tell that my clarification will be entirely valid.
That's taking into account that inconsistency between spec, impl (and also expectations) is quite frequent in Scala.
To completely understand what the flag is intended for you have to dive into the compiler and see all its usages.
So the best would be if the author would review it and fix the description.

@unkarjedy
Copy link
Contributor Author

Anyway, if a valid description existed, I think it would be nice to collect complete descriptions in a single table
(E.g. https://scalacenter.github.io/scala-3-migration-guide/docs/compiler-options/new-compiler-options.html ?)
and add cross-references between the the table and mentions in feature descriptions at http://dotty.epfl.ch/docs/

@nicolasstucki nicolasstucki merged commit 32dd422 into scala:master May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants