summaryrefslogtreecommitdiff
path: root/test/files/neg/any-vs-anyref.check
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-10-14 00:12:51 +0200
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-10-14 00:12:51 +0200
commitb126e5c31b2bc57df5d0d5cf3508babe1dd7a759 (patch)
treee1c71882fe860ac0bdd1f79b0ec45757a7c888be /test/files/neg/any-vs-anyref.check
parent71d4e285064e9d3475a0badecf283ea95166df6d (diff)
parent392d1ddb1588d69c2e8ae10a2b3e902c7229b772 (diff)
downloadscala-b126e5c31b2bc57df5d0d5cf3508babe1dd7a759.tar.gz
scala-b126e5c31b2bc57df5d0d5cf3508babe1dd7a759.tar.bz2
scala-b126e5c31b2bc57df5d0d5cf3508babe1dd7a759.zip
Merge remote-tracking branch 'scala/master' into fix-merge-3018
Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
Diffstat (limited to 'test/files/neg/any-vs-anyref.check')
-rw-r--r--test/files/neg/any-vs-anyref.check18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/files/neg/any-vs-anyref.check b/test/files/neg/any-vs-anyref.check
index 63c4853130..7378f0495f 100644
--- a/test/files/neg/any-vs-anyref.check
+++ b/test/files/neg/any-vs-anyref.check
@@ -36,12 +36,28 @@ Such types can participate in value classes, but instances
cannot appear in singleton types or in reference comparisons.
def foo5(x: Quux with Product) = (x eq "abc") && ("abc" eq x)
^
+any-vs-anyref.scala:10: error: type mismatch;
+ found : Quux with Product
+ required: AnyRef
+Note that the parents of this type (Quux, Product) extend Any, not AnyRef.
+Such types can participate in value classes, but instances
+cannot appear in singleton types or in reference comparisons.
+ def foo5(x: Quux with Product) = (x eq "abc") && ("abc" eq x)
+ ^
any-vs-anyref.scala:11: error: value eq is not a member of Quux with Product{def f: Int}
Note that the parents of this type (Quux, Product) extend Any, not AnyRef.
Such types can participate in value classes, but instances
cannot appear in singleton types or in reference comparisons.
def foo6(x: Quux with Product { def f: Int }) = (x eq "abc") && ("abc" eq x)
^
+any-vs-anyref.scala:11: error: type mismatch;
+ found : Quux with Product{def f: Int}
+ required: AnyRef
+Note that the parents of this type (Quux, Product) extend Any, not AnyRef.
+Such types can participate in value classes, but instances
+cannot appear in singleton types or in reference comparisons.
+ def foo6(x: Quux with Product { def f: Int }) = (x eq "abc") && ("abc" eq x)
+ ^
any-vs-anyref.scala:12: error: type mismatch;
found : Quux with Product{def eq(other: String): Boolean}
required: AnyRef
@@ -61,4 +77,4 @@ any-vs-anyref.scala:27: error: type mismatch;
required: Quux{def g(x: Int): Int}
f(new Quux { def g(x: String) = x })
^
-9 errors found
+11 errors found