summaryrefslogtreecommitdiff
path: root/test/files/run/t9546c.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-03-02 20:51:49 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-03-02 22:11:55 +1000
commit1a59c55ed5c6a0d53acd0259090cf57328748451 (patch)
treef61cf8d36e1341bba2f3d4131945b3c02b37a0db /test/files/run/t9546c.scala
parent861e4766da5a2271ae66d5d5fd054f6fe01ac7b9 (diff)
downloadscala-1a59c55ed5c6a0d53acd0259090cf57328748451.tar.gz
scala-1a59c55ed5c6a0d53acd0259090cf57328748451.tar.bz2
scala-1a59c55ed5c6a0d53acd0259090cf57328748451.zip
Refactor transform of case apply in refchecks
I've identified a dead call to `transformCaseApply` that seems to date back to Scala 2.6 vintages, in which case factory methods were a fictional companion method, rather than a real apply method in a companion module. This commit adds an abort in that code path to aide code review (if our test suite still passes, we know that I've removed dead code, rather than silently changing behaviour.) The following commit will remove it altogether I then inlined a slightly clunky abstraction in the two remaining calls to `transformCaseApply`. It was getting in the way of a clean fix to SI-9546, the topic of the next commit.
Diffstat (limited to 'test/files/run/t9546c.scala')
-rw-r--r--test/files/run/t9546c.scala13
1 files changed, 13 insertions, 0 deletions
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
+ }
+}
+