Warn on erased definitions with ???
See original GitHub issueCompiler version
3.0.0-RC1
Minimized example
erased given CanThrow[Ex1] = ???
Expectation
It should emit a warning suggesting the code
import scala.compiletime.erasedValue
erased given CanThrow[Ex1] = erasedValue
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Return iPhone settings to their defaults - Apple Support (CA)
Go to Settings > General > Transfer or Reset iPhone > Reset. Choose an option: WARNING: If you choose the Erase All Content...
Read more >Common Error Messages · OCaml Tutorials
This error happens often while testing some type definitions using the interactive toplevel. ... Warning: This optional argument cannot be erased.
Read more >unique_ptr with type erased destructor does not quite work ...
This works on all compilers I tried: gcc 4.9, clang 3.5, and msvc VS13 and VS15. But they all generate the following warning:...
Read more >Does the warning in Revelation 22:18-19 apply to the entire ...
The warning is explicit and dire. The plagues of Revelation will be visited upon anyone guilty of tampering in any way with the...
Read more >Instagram will now warn you before your account gets deleted ...
Now the company says it will introduce a new notification process that will warn users if their account is at risk of becoming...
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 Free
Top 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
I have been considering something even more drastic. In this system the RHSs of definitions have no meaning at all, we only put some body as a placeholder. It also does not seem to be important if the definition is abstract or not. My suggestion would be to just not have an implementation. Make all of them look like abstract method. We would just need to define the signature which is all we care about.
Furthermore with the erased classes idea we could just write
The issue with that approach is that
erased
is a soft modifier. This would require changing it to a proper keyword or having some more complex syntactical rules.