Skip to content

Commit 9e4aea4

Browse files
authored
simplify trees that appear in tastycheck test (#21274)
unfortunately it seems changing the classpath means representation of TASTy is not stable (but is semantically equivalent) i.e. some SHAREDtype might be replaced by equivalent types. This breaks the tastycheck test in #21214 with scala 2 library tasty. By changing to ordinary classes instead of enum cases, we limit generated code and avoid these specific examples of instability in the test. Manually, I confirmed that reverting the change to namer in #21214 still breaks the new test [test_scala2_library_tasty]
2 parents dec395b + d28bd52 commit 9e4aea4

File tree

2 files changed

+241
-1324
lines changed

2 files changed

+241
-1324
lines changed

tests/pos/i21154/Z.scala

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// in the original issue https://github.com/scala/scala3/issues/21154, the non-deterministic tasty
44
// depends on the order of compilation of files, the use-site (A.scala) has to come first,
55
// and the file defining the enum has to come second (Z.scala), A.scala in namer will force Z to complete.
6-
enum Z:
7-
case AOptions()
8-
case BOptions()
9-
case COptions()
6+
sealed trait Z
7+
8+
object Z:
9+
class AOptions() extends Z
10+
class BOptions() extends Z
11+
class COptions() extends Z

0 commit comments

Comments
 (0)