This repository has been 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
Add an @uninferrable
annotation
#17
Labels
Milestone
Comments
I think this is more flexible and useful than #16. |
Closed
Should it be @NonInferrable or @nonInferrable? I prefer the latter because it's more compatible with the sorts of annotations I'm more familiar with, though I agree there's no consistency. |
How about |
Well, there's nothing to stop us using |
Ok, I can't do that. But @puffnfresh can. |
puffnfresh
changed the title
Add a @NonInferrable annotation
Add a @Uninferrable annotation
Sep 5, 2014
puffnfresh
changed the title
Add a @Uninferrable annotation
Add an @Uninferrable annotation
Sep 5, 2014
aloiscochard
pushed a commit
to aloiscochard/scala
that referenced
this issue
Sep 5, 2014
SI-8382 Restore partest.debug
propensive
changed the title
Add an @Uninferrable annotation
Add an Sep 6, 2014
@uninferrable
annotation
folone
pushed a commit
that referenced
this issue
Aug 14, 2015
Calls to synthetic case class apply methods are inlined to the underlying constructor invocation in refchecks. However, this can lead to accessibility errors if the constructor is private. This commit ensures that the constructor is at least as accessible as the apply method before performing this tranform. I've manually checked that other the optimization still works in other cases: scala> class CaseApply { Some(42) } defined class CaseApply scala> :javap -c CaseApply Compiled from "<console>" public class CaseApply { public CaseApply(); Code: 0: aload_0 1: invokespecial #9 // Method java/lang/Object."<init>":()V 4: new #11 // class scala/Some 7: dup 8: bipush 42 10: invokestatic #17 // Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer; 13: invokespecial #20 // Method scala/Some."<init>":(Ljava/lang/Object;)V 16: pop 17: return }
To resurrect this issue, please rework it as an issue/PR against Lightbend Scala (ie. scala/scala). |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I think #14 makes us want to avoid forking scala-library.jar but maybe we can still figure out a way to make this annotation.
The text was updated successfully, but these errors were encountered: