Skip to content
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

SI-7491 fix typo in scala.App documentation #3338

Merged
merged 1 commit into from Jan 9, 2014

Conversation

gourlaysama
Copy link
Member

This is a really cheap PR, but hey, there was a ticket for it!

@som-snytt
Copy link
Contributor

Since you have undertaken this onerous task, I would suggest stronger language.

For the normal use case, do not override `main`.  The whole class body becomes the "main method."

The other question is whether anyone who knows what they are doing would choose to override main.

@retronym
Copy link
Member

retronym commented Jan 8, 2014

How about:

trait App { 
 ....
  @deprecatedOverriding("main should not be overriden", "2.11.0")
  def main(args: Array[String]) = {

Then we can make if final in 2.12.

@som-snytt
Copy link
Contributor

That's super. Preemptively, s/overriden/overridden/.

I'd forgotten about that deprecated mode. So basically, the upper limit on Scala features is what JZ can keep in his head. There must be a test for that; then, you can plan Scala 3 around the result.

@gourlaysama
Copy link
Member Author

Good point, I don't think anyone ever chose to override main anyway. Here is the new version.

App.main should never be overridden, so let's enforce it.
@ghost ghost assigned retronym Jan 8, 2014
@retronym
Copy link
Member

retronym commented Jan 9, 2014

LGTM

retronym added a commit that referenced this pull request Jan 9, 2014
SI-7491 fix typo in scala.App documentation
@retronym retronym merged commit 9934bae into scala:master Jan 9, 2014
@gourlaysama gourlaysama deleted the t7491 branch January 10, 2014 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants