diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-08-23 00:49:57 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-08-23 00:49:57 -0700 |
commit | 1a1678dac0d4ff7d08efffbe2c80f324c173a69e (patch) | |
tree | e5aa80eadb0c12b94148f5738ba5d07b54602750 /test/files/run | |
parent | cc85db9d403c0210472319c7da5839f2531c6948 (diff) | |
parent | fcf2b29010fd20acb3c27204e4dd9e795eabe00c (diff) | |
download | scala-1a1678dac0d4ff7d08efffbe2c80f324c173a69e.tar.gz scala-1a1678dac0d4ff7d08efffbe2c80f324c173a69e.tar.bz2 scala-1a1678dac0d4ff7d08efffbe2c80f324c173a69e.zip |
Merge pull request #1182 from paulp/issue/1987
Improved fix for SI-1987, overloading in package objects.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t1987b.check | 1 | ||||
-rw-r--r-- | test/files/run/t1987b/PullIteratees.scala | 17 | ||||
-rw-r--r-- | test/files/run/t1987b/a.scala | 6 | ||||
-rw-r--r-- | test/files/run/t1987b/cce_test.scala | 15 | ||||
-rw-r--r-- | test/files/run/t1987b/pkg1.scala | 4 | ||||
-rw-r--r-- | test/files/run/t1987b/pkg2.scala | 3 |
6 files changed, 46 insertions, 0 deletions
diff --git a/test/files/run/t1987b.check b/test/files/run/t1987b.check new file mode 100644 index 0000000000..68d4b10e12 --- /dev/null +++ b/test/files/run/t1987b.check @@ -0,0 +1 @@ +ok! diff --git a/test/files/run/t1987b/PullIteratees.scala b/test/files/run/t1987b/PullIteratees.scala new file mode 100644 index 0000000000..a5a3e65d8f --- /dev/null +++ b/test/files/run/t1987b/PullIteratees.scala @@ -0,0 +1,17 @@ +package scales.xml + +trait PullType +class QName +trait RetUrn[T] + +/** + * Iteratees related to pull parsing + */ +trait PullIteratees { + /** + * Without the overload it doesn't trigger the CCE, even though its + * not used + */ + def iterate(path: List[QName], xml: String): RetUrn[String] = null + def iterate(path: List[QName], xml: Iterator[PullType]): RetUrn[String] = null +} diff --git a/test/files/run/t1987b/a.scala b/test/files/run/t1987b/a.scala new file mode 100644 index 0000000000..c1be5fe3e0 --- /dev/null +++ b/test/files/run/t1987b/a.scala @@ -0,0 +1,6 @@ +object Test { + def main(args: Array[String]): Unit = { + scales.xml.CCE_Test.main(args) + println("ok!") + } +} diff --git a/test/files/run/t1987b/cce_test.scala b/test/files/run/t1987b/cce_test.scala new file mode 100644 index 0000000000..4f9acf0264 --- /dev/null +++ b/test/files/run/t1987b/cce_test.scala @@ -0,0 +1,15 @@ +package scales.xml +//import scales.xml._ // using another pacakge and importing doesn't CCE + +object CCE_Test { + def main(args: Array[String]): Unit = { + // without the import it doesn't trigger the CCE + import scaley.funny._ + + val pull = null.asInstanceOf[Iterator[PullType]] + val LogEntries = null.asInstanceOf[List[QName]] + // fully qualify with scales.xml. and it won't trigger it + iterate(LogEntries, + pull) + } +} diff --git a/test/files/run/t1987b/pkg1.scala b/test/files/run/t1987b/pkg1.scala new file mode 100644 index 0000000000..6e749fc6b3 --- /dev/null +++ b/test/files/run/t1987b/pkg1.scala @@ -0,0 +1,4 @@ +package scaley + +package object funny { +} diff --git a/test/files/run/t1987b/pkg2.scala b/test/files/run/t1987b/pkg2.scala new file mode 100644 index 0000000000..38056a199e --- /dev/null +++ b/test/files/run/t1987b/pkg2.scala @@ -0,0 +1,3 @@ +package scales + +package object xml extends PullIteratees |