question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warn on erased definitions with ???

See original GitHub issue

Compiler 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:open
  • Created 3 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
nicolasstuckicommented, Mar 16, 2021

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.

erased given CanThrow[Ex1]

Furthermore with the erased classes idea we could just write

given CanThrow[Ex1]
0reactions
nicolasstuckicommented, Mar 18, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found