diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-11-10 16:43:42 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-10 16:43:42 +1000 |
commit | e0a0d3d974429531ef2d5283b8468ff8d8290f09 (patch) | |
tree | 82f40828237621028c17eaef5e27a21aeb3fb41a /test/files/pos | |
parent | 9ca14a56fc4fb84ef6e760ce75e45f21352d3a18 (diff) | |
parent | 4959e9f11c459e1c1eaa6cc168a4b9f2e784ffdf (diff) | |
download | scala-e0a0d3d974429531ef2d5283b8468ff8d8290f09.tar.gz scala-e0a0d3d974429531ef2d5283b8468ff8d8290f09.tar.bz2 scala-e0a0d3d974429531ef2d5283b8468ff8d8290f09.zip |
Merge pull request #5486 from som-snytt/issue/6734-synths
SI-6734 Synthesize companion near case class
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6734.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/t6734.scala b/test/files/pos/t6734.scala new file mode 100644 index 0000000000..88932cd2cc --- /dev/null +++ b/test/files/pos/t6734.scala @@ -0,0 +1,17 @@ + +// desugars to package p { object `package` } +// previously, synthetic p.C was incorrectly added to this tree +// This only matters because synthetics are not hygienic +package object p + +package p { + import scala.concurrent.Future + case class C private[p] (value: Future[Int]) // private to avoid rewriting C.apply to new C +} + +package client { + trait X { + import scala.concurrent.Future + def f = p.C(Future(42)(null)) // ensure synthetics were generated, i.e., p.C.apply + } +} |