-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cons next leaks through next$access$1
#18884
Labels
Comments
nicolasstucki
added
itype:bug
stat:needs triage
Every issue needs to have an "area" and "itype" label
compat:scala2
and removed
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Nov 9, 2023
Note that this accessor exists becase the next case parameter is final case class :: [+A](override val head: A, private[scala] var next: List[A @uncheckedVariance]) // sound because `next` is used only locally
extends List[A] { // scala 2 after typer
final case class ::[+A] extends List[A] with Product with Serializable {
<caseaccessor> <paramaccessor> private[this] val head: A = _;
override <stable> <caseaccessor> <accessor> <paramaccessor> def head: A = ::.this.head;
<caseaccessor> <paramaccessor> private[this] var next: List[A] = _;
<caseaccessor> <accessor> <paramaccessor> def next: List[A] = ::.this.next;
<accessor> <paramaccessor> def next_=(x$1: List[A]): Unit = ::.this.next = x$1;
def <init>(head: A, next: List[A]): Playground.::[A] = {
::.super.<init>();
()
};
...
}
|
This also leaks in mirrors (see |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 16, 2023
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 16, 2023
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 16, 2023
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 17, 2023
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.3
Minimized code
The following code compiles but should not
Other manifestation
This method also apears in autocompletion
Expectation
This code should not compile.
The text was updated successfully, but these errors were encountered: