summaryrefslogtreecommitdiff
path: root/test/files/neg/t5452.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-13 23:09:39 -0800
committerPaul Phillips <paulp@improving.org>2012-02-13 23:19:57 -0800
commit2b731911e97a281e324060099631e2374b2144ec (patch)
treeb8cba303e6855f879f6cce0704c208ec162fd140 /test/files/neg/t5452.scala
parenteb8556ca663de9bf77514eab6e63f0a2f7599413 (diff)
downloadscala-2b731911e97a281e324060099631e2374b2144ec.tar.gz
scala-2b731911e97a281e324060099631e2374b2144ec.tar.bz2
scala-2b731911e97a281e324060099631e2374b2144ec.zip
Fix for SI-5452.
Why is calling the error function not enough to register the error, why does "setError(tree)" have to be called as well? That was the cause of this particular stackoverflow. In ContextErrors I see lots of methods which call setError and lots more which do not, and frankly it's all pretty terrifying. There is zero documentation attached to setError. Maybe there's an explanation somewhere I'm not seeing. Review by @hubertp.
Diffstat (limited to 'test/files/neg/t5452.scala')
-rw-r--r--test/files/neg/t5452.scala29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/files/neg/t5452.scala b/test/files/neg/t5452.scala
new file mode 100644
index 0000000000..1032db7a4b
--- /dev/null
+++ b/test/files/neg/t5452.scala
@@ -0,0 +1,29 @@
+// /scala/trac/5452/a.scala
+// Mon Feb 13 22:52:36 PST 2012
+
+// import scala.reflect.mirror._
+
+trait Tree
+
+object Bip {
+ def ??? = sys.error("")
+}
+import Bip._
+
+case class Queryable[T]() {
+ def treeFilter( t:Tree ) : Queryable[T] = ???
+}
+
+object Queryable {
+ def apply[T:Manifest] = ???
+ def apply[T:Manifest]( t:Tree ) = ???
+}
+
+trait CoffeesTable{
+ def sales : Int
+}
+
+object Test extends App{
+ val q = new Queryable[CoffeesTable]
+ Queryable[CoffeesTable]( q.treeFilter(null) )
+}