summaryrefslogtreecommitdiff
path: root/test/files/pos/t5932.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t5932.scala')
-rw-r--r--test/files/pos/t5932.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t5932.scala b/test/files/pos/t5932.scala
new file mode 100644
index 0000000000..d824523d5b
--- /dev/null
+++ b/test/files/pos/t5932.scala
@@ -0,0 +1,15 @@
+class A
+
+case object B extends A
+
+object Test {
+ val x1 = (B: A)
+
+ println(x1 == B) // no warning
+ println(B == x1) // no warning
+
+ val x2 = (B: A with Product)
+
+ println(x2 == B) // no warning
+ println(B == x2) // spurious warning: "always returns false"
+}