forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reinterpret
xyz$access$i
when unpickling from Scala 2
Fixes scala#18884
- Loading branch information
1 parent
d9c84b9
commit f857c98
Showing
8 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def test(xs: ::[Int]): List[Int] = | ||
xs.next$access$1 // error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Foo1(1) | ||
Foo2(2, 3) | ||
Foo3(4, 5) | ||
Foo4(6, 7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// scalajs: --skip | ||
|
||
package lib | ||
|
||
case class Foo1(private[lib] var x: Int) {} | ||
case class Foo2(private[lib] var x: Int, private[lib] var y: Int) | ||
case class Foo3(private[lib] var x: Int, var y: Int) | ||
case class Foo4(var x: Int, private[lib] var y: Int) { | ||
val z: Int = x | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import lib.* | ||
|
||
@main def Test: Unit = | ||
test(new Foo1(1)) | ||
test(new Foo2(2, 3)) | ||
test(new Foo3(4, 5)) | ||
test(new Foo4(6, 7)) | ||
|
||
def test(any: Any): Unit = | ||
any match | ||
case Foo1(x) => println(s"Foo1($x)") | ||
case Foo2(x, y) => println(s"Foo2($x, $y)") | ||
case Foo3(x, y) => println(s"Foo3($x, $y)") | ||
case Foo4(x, y) => println(s"Foo4($x, $y)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters