diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-10-28 10:27:13 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2016-10-31 22:30:16 -0700 |
commit | 4959e9f11c459e1c1eaa6cc168a4b9f2e784ffdf (patch) | |
tree | e070f4a89d557551f73da5c362a689df3e4c87ee /test/files/pos | |
parent | 9e1de6ee81e9eaf9d8ac59446bc97c79b5ff0cb6 (diff) | |
download | scala-4959e9f11c459e1c1eaa6cc168a4b9f2e784ffdf.tar.gz scala-4959e9f11c459e1c1eaa6cc168a4b9f2e784ffdf.tar.bz2 scala-4959e9f11c459e1c1eaa6cc168a4b9f2e784ffdf.zip |
SI-6734 Comment
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6734.scala | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/test/files/pos/t6734.scala b/test/files/pos/t6734.scala index f8fed0a27a..88932cd2cc 100644 --- a/test/files/pos/t6734.scala +++ b/test/files/pos/t6734.scala @@ -1,23 +1,17 @@ -//single file badimp.scala -// adding package object gives not found: type SortedMap -package object badimp +// 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 badimp { - - // move before package object works - import scala.collection.immutable.SortedMap - - case class Nodal private[badimp] (value: String, children: SortedMap[String, Int]) - - // adding target object restores sanity - // but adding it before the import does not - //object Nodal +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.collection.immutable.SortedMap - def f = badimp.Nodal("test", SortedMap[String, Int]()) // ensure Nodal.apply was created + import scala.concurrent.Future + def f = p.C(Future(42)(null)) // ensure synthetics were generated, i.e., p.C.apply } } |