Classes can't have an unfulfilled self type with unimplemented methods
See original GitHub issuetrait Bar { def bar: Int }
class Foo { self : Bar => }
2 |class Foo { self : Bar => }
| ^
| class Foo needs to be abstract, since def bar: => Int is not defined
one error found
It is allowed in Scalac
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
inheritance - Abstract methods in Python - Stack Overflow
Classes derived from this class cannot then be instantiated unless all abstract methods have been overridden. If your class is already using a ......
Read more >Easiest explanation of Abstract class and Interface - Medium
An abstract class can have one or multiple number of unimplemented methods. As an abstract class is not proper, or does not have...
Read more >The Practical Difference Between Abstract Classes and Traits ...
An abstract class may or may not have either abstract (unimplemented) or non-abstract (implemented) methods. However, traits also share most ...
Read more >(PDF) Designing information hiding modularity for model ...
At the present time, there exists no module concept for model transformation languages that allows programmers to control information hiding and strictly ...
Read more >Text - H.R.7776 - 117th Congress (2021-2022): James M. Inhofe ...
H.R.7776 - James M. Inhofe National Defense Authorization Act for Fiscal Year 2023117th Congress (2021-2022) | Get alerts ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To clarify: I mean, one could just require that the class is marked abstract and support the same use cases.
FWIW, this compiles without error since #8332, both with and without -language:Scala2.