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

The usable stubs extended help doesn't do this.type #11301

Closed
som-snytt opened this issue Dec 10, 2018 · 1 comment
Closed

The usable stubs extended help doesn't do this.type #11301

som-snytt opened this issue Dec 10, 2018 · 1 comment
Assignees

Comments

@som-snytt
Copy link

The usable stubs extended help doesn't do this.type.

scala 2.13.0-M5> trait T { def f: this.type }
defined trait T

scala 2.13.0-M5> class C extends T
                       ^
                 error: class C needs to be abstract, since method f in trait T of type => C.this.type is not defined

scala 2.13.0-M5> trait T { def f: this.type ; def g: Int ; def h: String }
defined trait T

scala 2.13.0-M5> class C extends T
                       ^
                 error: class C needs to be abstract, since:
                 it has 3 unimplemented members.
                 /** As seen from class C, the missing signatures are as follows.
                  *  For convenience, these are usable as stub implementations.
                  */
                   def f: C = ???
                   def g: Int = ???
                   def h: String = ???
@SethTisue SethTisue added this to the Backlog milestone Jan 8, 2019
hrhino added a commit to hrhino/scala that referenced this issue Feb 29, 2020
Like it asks for on the ticket. Presumably there's a lot more advice
that doesn't compile, such as scala/bug#11301, but here's a step forward.

Fixes scala/bug#9908.
hrhino added a commit to hrhino/scala that referenced this issue Feb 29, 2020
Like it asks for on the ticket. Presumably there's a lot more advice
that doesn't compile, such as scala/bug#11301, but here's a step forward.

Fixes scala/bug#9908.
hrhino added a commit to hrhino/scala that referenced this issue Mar 1, 2020
Like it asks for on the ticket. Presumably there's a lot more advice
that doesn't compile, such as scala/bug#11301, but here's a step forward.

Fixes scala/bug#9908.

Tweaked, reformatted, and generally
Co-Authored-By: "Som Snytt" <som.snytt@gmail.com
hrhino added a commit to hrhino/scala that referenced this issue Mar 1, 2020
Like it asks for on the ticket. Presumably there's a lot more advice
that doesn't compile, such as scala/bug#11301, but here's a step forward.

Fixes scala/bug#9908.

Tweaked, reformatted, and generally

Co-Authored-By: "Som Snytt" <som.snytt@gmail.com
hrhino added a commit to hrhino/scala that referenced this issue Mar 1, 2020
Like it asks for on the ticket. Presumably there's a lot more advice
that doesn't compile, such as scala/bug#11301, but here's a step forward.

Fixes scala/bug#9908.

Tweaked, reformatted, and generally
Co-Authored-By: "Som Snytt" <som.snytt@gmail.com>
hrhino added a commit to hrhino/scala that referenced this issue Mar 1, 2020
Like it asks for on the ticket. Presumably there's a lot more advice
that doesn't compile, such as scala/bug#11301, but here's a step forward.

Fixes scala/bug#9908.

Tweaked, reformatted, and generally

Co-Authored-By: "Som Snytt" <som.snytt@gmail.com>
@som-snytt
Copy link
Author

Woo-hoo @hrhino why is it hrhino and not woohoono? See linked ticket.

Welcome to Scala 2.13.4 (OpenJDK 64-Bit Server VM, Java 15).
Type in expressions for evaluation. Or try :help.

scala> trait T { def f: this.type }
trait T

scala> class C extends T
             ^
       error: class C needs to be abstract. Missing implementation for:
         def f: C.this.type // inherited from trait T

@SethTisue SethTisue removed this from the Backlog milestone Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants