-
Notifications
You must be signed in to change notification settings - Fork 21
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
Deprecate and disallow abstract methods without result type in traits and abstract classes #7523
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7523?orig=1 |
@soc said: |
@JamesIry said: |
@soc said: |
@retronym said: |
@soc said: |
@adriaanm said: |
@adriaanm said: |
@adriaanm said: |
@soc said: |
@adriaanm said: |
@adriaanm said (edited on Feb 16, 2014 12:15:46 AM UTC): I think these warnings are really important, so I just want to make sure we don't forget about them / include them properly in the release notes. |
@soc said: |
@gkossakowski said: |
@retronym said: |
Subsumed by the linked ticket and also implemented. |
Judging from the lack of strong reactions against getting rid of this item in https://groups.google.com/d/topic/scala-internals/q1YX7NC1geM/discussion I think we can create an issue to track it.
The fact that this is accepted by the compiler is incredibly surprising, because it goes against the intuition that the compiler needs either a body to infer the type or an explicit type annotation.
Adding to the unintuitiveness is that in most cases where a type is missing the compiler infers Nothing (for better or worse), but doesn't do it here.
The suggestion is to deprecate the syntax for 2.11 and start requiring a type in 2.12:
The behaviour is described in chapter 4.6.3 of the spec. Getting rid of this special-cased behaviour would allow getting rid of the whole chapter.
The text was updated successfully, but these errors were encountered: