summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/bug691.check4
-rwxr-xr-xtest/files/neg/bug691.scala29
-rw-r--r--test/files/neg/bug712.check4
-rw-r--r--test/files/neg/bug712.scala19
4 files changed, 56 insertions, 0 deletions
diff --git a/test/files/neg/bug691.check b/test/files/neg/bug691.check
new file mode 100644
index 0000000000..252ce6b5d3
--- /dev/null
+++ b/test/files/neg/bug691.check
@@ -0,0 +1,4 @@
+bug691.scala:27 error: ambiguous parent class qualifier
+ trait TiC extends super[Arrow].Ti2 with super[AssignArrow].Ti1;
+ ^
+one error found
diff --git a/test/files/neg/bug691.scala b/test/files/neg/bug691.scala
new file mode 100755
index 0000000000..233476f658
--- /dev/null
+++ b/test/files/neg/bug691.scala
@@ -0,0 +1,29 @@
+trait Base {
+ trait AssignArrow {
+ type T <: Ti0;
+ trait Ti0;
+ }
+ abstract class Arrow extends AssignArrow;
+ val arrow : Arrow;
+}
+
+trait Ext0 extends Base {
+ trait AssignArrow extends super.AssignArrow {
+ type T <: Ti1;
+ trait Ti1 extends super.Ti0;
+ }
+}
+trait Ext1 extends Base {
+ trait Arrow extends super.Arrow {
+ type T <: Ti2;
+ trait Ti2 extends super.Ti0;
+ trait TiXX extends Ti2;
+ }
+ val arrow : Arrow;
+}
+trait Composition extends Ext0 with Ext1 {
+ object arrow0 extends Arrow with AssignArrow {
+ type T = TiC
+ trait TiC extends super[Arrow].Ti2 with super[AssignArrow].Ti1;
+ }
+}
diff --git a/test/files/neg/bug712.check b/test/files/neg/bug712.check
new file mode 100644
index 0000000000..277aaf6be5
--- /dev/null
+++ b/test/files/neg/bug712.check
@@ -0,0 +1,4 @@
+bug712.scala:10 error: value self is not a member of B.this.ParentImpl
+ implicit def coerce(p : ParentImpl) = p.self;
+ ^
+one error found
diff --git a/test/files/neg/bug712.scala b/test/files/neg/bug712.scala
new file mode 100644
index 0000000000..0887810c85
--- /dev/null
+++ b/test/files/neg/bug712.scala
@@ -0,0 +1,19 @@
+trait A {
+ type Node <: NodeImpl;
+ implicit def coerce(n : NodeImpl) = n.self;
+ trait NodeImpl {
+ def self : Node;
+ }
+}
+trait B extends A {
+ type Parent <: ParentImpl;
+ implicit def coerce(p : ParentImpl) = p.self;
+ trait ParentImpl;
+ type Symbol;
+ trait SymbolImpl {
+ def scope : Int;
+ }
+ implicit def coerceSym(sym : Symbol) : SymbolImpl;
+ var s : Symbol = null;
+ val s_scope = s.scope;
+}