diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-03-15 10:23:12 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-03-15 10:23:12 +1000 |
commit | 798462e739f23bb498b72675a57e4cc331404945 (patch) | |
tree | 9e6b3cb8b3a8bbc56af05faa23e8b3905e2f48f2 /test/files/run | |
parent | 5ebae12875be19ddc98520b21d98af19b7c7b2da (diff) | |
parent | 827b6f3b1d3e96bf838ed70fdb839c6c57672758 (diff) | |
download | scala-798462e739f23bb498b72675a57e4cc331404945.tar.gz scala-798462e739f23bb498b72675a57e4cc331404945.tar.bz2 scala-798462e739f23bb498b72675a57e4cc331404945.zip |
Merge pull request #5040 from adriaanm/rebase-5031
Merge 2.11.x into 2.12.x [ci: last-only]
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t9546.scala | 13 | ||||
-rw-r--r-- | test/files/run/t9546b.scala | 13 | ||||
-rw-r--r-- | test/files/run/t9546c.scala | 13 | ||||
-rw-r--r-- | test/files/run/t9546d.scala | 16 | ||||
-rw-r--r-- | test/files/run/t9546e.scala | 15 |
5 files changed, 70 insertions, 0 deletions
diff --git a/test/files/run/t9546.scala b/test/files/run/t9546.scala new file mode 100644 index 0000000000..7016881084 --- /dev/null +++ b/test/files/run/t9546.scala @@ -0,0 +1,13 @@ +package foo { + case class Opt[A] private[foo](val get: A) extends AnyVal + object Opt { + def mkOpt = Opt("") + } +} + +object Test { + def main(args: Array[String]): Unit = { + foo.Opt.mkOpt + } +} + diff --git a/test/files/run/t9546b.scala b/test/files/run/t9546b.scala new file mode 100644 index 0000000000..0b4d2d3fe5 --- /dev/null +++ b/test/files/run/t9546b.scala @@ -0,0 +1,13 @@ +package foo { + case class Opt[A](val get: A) extends AnyVal { + } + object Opt { + def mkOpt = Opt("") + } +} + +object Test { + def main(args: Array[String]): Unit = { + foo.Opt.mkOpt + } +} diff --git a/test/files/run/t9546c.scala b/test/files/run/t9546c.scala new file mode 100644 index 0000000000..ea6a5a36b4 --- /dev/null +++ b/test/files/run/t9546c.scala @@ -0,0 +1,13 @@ +package foo { + case class Opt[A] private[foo](val get: A) + object Opt { + def mkOpt = Opt("") + } +} + +object Test { + def main(args: Array[String]): Unit = { + foo.Opt.mkOpt + } +} + diff --git a/test/files/run/t9546d.scala b/test/files/run/t9546d.scala new file mode 100644 index 0000000000..00bf37dc18 --- /dev/null +++ b/test/files/run/t9546d.scala @@ -0,0 +1,16 @@ +class X { + def test: Any = { + object Opt { + def mkOpt = Opt("") + } + case class Opt[A] private[X](val get: A) + Opt.mkOpt + } +} + +object Test { + def main(args: Array[String]): Unit = { + new X().test + } +} + diff --git a/test/files/run/t9546e.scala b/test/files/run/t9546e.scala new file mode 100644 index 0000000000..b19d0871aa --- /dev/null +++ b/test/files/run/t9546e.scala @@ -0,0 +1,15 @@ +case class A private (x: Int) +case class B private (x: Int)(y: Int) + +class C { + def f = A(1) + def g = B(1)(2) // was: constructor B in class B cannot be accessed in class C +} + +object Test { + def main(args: Array[String]): Unit = { + new C().f + new C().g + } + +} |