aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-19 18:58:56 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-19 18:59:40 +0100
commitaad036c4720aac43a41ab8d994d51d71d233031d (patch)
tree29de864037fb135981c61176e3f2614dabc4c4d6 /tests
parent7dafb2ac6d5fd41cfc0a94f2a72b881987890abf (diff)
downloaddotty-aad036c4720aac43a41ab8d994d51d71d233031d.tar.gz
dotty-aad036c4720aac43a41ab8d994d51d71d233031d.tar.bz2
dotty-aad036c4720aac43a41ab8d994d51d71d233031d.zip
Don't flag override errors for synthetic companion objects.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/t6335.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pos/t6335.scala b/tests/pos/t6335.scala
new file mode 100644
index 000000000..eb052db19
--- /dev/null
+++ b/tests/pos/t6335.scala
@@ -0,0 +1,25 @@
+object E extends Z {
+ def X = 3
+ implicit class X(val i: Int) {
+ def xx = i
+ }
+
+ def Y(a: Any) = 0
+ object Y
+ implicit class Y(val i: String) { def yy = i }
+
+ implicit class Z(val i: Boolean) { def zz = i }
+}
+
+trait Z {
+ def Z = 0
+}
+
+object Test {
+ import E._
+ 0.xx
+
+ "".yy
+
+ true.zz
+}