You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> run
[info] running hello
STRING
BOOLEAN
[error] (run-main-0) java.lang.ClassCastException: SimpleT$$anon$1 cannot be cast to scala.deriving.Mirror$Product
[error] java.lang.ClassCastException: SimpleT$$anon$1 cannot be cast to scala.deriving.Mirror$Product
[error] at SimpleT$.derived$Printable(Main.scala:5)
[error] at Main$package$.hello(Main.scala:11)
[error] at hello.main(Main.scala:7)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 3 s, completed Mar 31, 2021 9:16:29 PM
Expectation
I'd expect this program to produce compilation error about missing Printable[(String, Boolean)] or similar.
Mirror support runs in PostTyper to add new members to mirrors generated
during Typer. But some anonymous mirrors are generated during inlining.
We need to add the missing methods for them as well.
Fixesscala#11542Fixesscala#11961Fixesscala#12052
Mirror support runs in PostTyper to add new members to mirrors generated
during Typer. But some anonymous mirrors are generated during inlining.
We need to add the missing methods for them as well.
Fixesscala#11542Fixesscala#11961Fixesscala#12052
michelou
pushed a commit
to michelou/scala3
that referenced
this issue
Apr 14, 2021
Mirror support runs in PostTyper to add new members to mirrors generated
during Typer. But some anonymous mirrors are generated during inlining.
We need to add the missing methods for them as well.
Fixesscala#11542Fixesscala#11961Fixesscala#12052
Compiler version
3.0.0-RC2
sbt 1.4.9 (GraalVM Community Java 1.8.0_282)
Minimized code
Output
Expectation
I'd expect this program to produce compilation error about missing
Printable[(String, Boolean)]
or similar.Trying to get familiar with type-classes-supporting-automatic-deriving I'm trying to implement typeclass which prints its own type.
Minimized project is available here.
The text was updated successfully, but these errors were encountered: