This repository was archived by the owner on Sep 1, 2020. It is now read-only.
forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 19
Singleton types should be inferred wherever there is a bound of <: Singleton #27
Labels
Comments
See also #15. |
Closed
Like Jason I've tried and failed to implement this. I forget the details. |
milessabin
pushed a commit
that referenced
this issue
Aug 12, 2016
This corrects an error in the change to the trait encoding in scala#5003: getters in traits should have empty bodies and be emitted as abstract. ``` % ~/scala/2.12.0-M4/bin/scalac sandbox/test.scala && javap -c T Compiled from "test.scala" public interface T { public abstract void T$_setter_$x_$eq(int); public int x(); Code: 0: aload_0 1: invokeinterface #15, 1 // InterfaceMethod x:()I 6: ireturn public int y(); Code: 0: aload_0 1: invokeinterface #20, 1 // InterfaceMethod y:()I 6: ireturn public void y_$eq(int); Code: 0: aload_0 1: iload_1 2: invokeinterface #24, 2 // InterfaceMethod y_$eq:(I)V 7: return public void $init$(); Code: 0: aload_0 1: bipush 42 3: invokeinterface #29, 2 // InterfaceMethod T$_setter_$x_$eq:(I)V 8: aload_0 9: bipush 24 11: invokeinterface #24, 2 // InterfaceMethod y_$eq:(I)V 16: return } % qscalac sandbox/test.scala && javap -c T Compiled from "test.scala" public interface T { public abstract void T$_setter_$x_$eq(int); public abstract int x(); public abstract int y(); public abstract void y_$eq(int); public static void $init$(T); Code: 0: aload_0 1: bipush 42 3: invokeinterface #21, 2 // InterfaceMethod T$_setter_$x_$eq:(I)V 8: aload_0 9: bipush 24 11: invokeinterface #23, 2 // InterfaceMethod y_$eq:(I)V 16: return public void $init$(); Code: 0: aload_0 1: invokestatic #27 // Method $init$:(LT;)V 4: return } ```
This is fixed in the SIP-23 PR which will be included in the 2.12.0-RC1 release. |
I thought SIP-23 was targeted for 2.12.1, not 2.12.0-RC1? |
This is the Typelevel Scala parallel release which hasn't been announced just yet ... watch this space. |
ah, news to me! ok thx |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This would be a fix for SI-5103 which has an incomplete patch by Jason.
The text was updated successfully, but these errors were encountered: