Skip to content

Commit

Permalink
simplify trees that appear in tastycheck test (#21274)
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
hamzaremmal authored Jul 25, 2024
2 parents dec395b + d28bd52 commit 9e4aea4
Show file tree
Hide file tree
Showing 2 changed files with 241 additions and 1,324 deletions.
10 changes: 6 additions & 4 deletions tests/pos/i21154/Z.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
// in the original issue https://github.com/scala/scala3/issues/21154, the non-deterministic tasty
// depends on the order of compilation of files, the use-site (A.scala) has to come first,
// and the file defining the enum has to come second (Z.scala), A.scala in namer will force Z to complete.
enum Z:
case AOptions()
case BOptions()
case COptions()
sealed trait Z

object Z:
class AOptions() extends Z
class BOptions() extends Z
class COptions() extends Z
Loading

0 comments on commit 9e4aea4

Please sign in to comment.