We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed10162 commit eb4bb1dCopy full SHA for eb4bb1d
tests/pos/S5.scala
@@ -0,0 +1,31 @@
1
+/* Original comment:
2
+ * Here's a fragment of a Scala encoding for the Keris module system;
3
+** the compiler claims:
4
+**
5
+** S5.scala:28: value n in class N of type N.this._N.n
6
+** cannot override value n in class M of type M.this._N.n
7
+** val system = new M() with N() {}
8
+** ^
9
+** To me it seems like the code is perfectly fine...
10
+*/
11
+abstract class M() {
12
+ val _N: N;
13
+ val n: _N.n;
14
+ val _M: M = this;
15
+ val m: _M.m = new _M.m();
16
+ class m() {
17
+ // module body of M
18
+ }
19
+}
20
+trait N {
21
+ val _N: N = this;
22
+ val n: _N.n = new _N.n();
23
+ val _M: M;
24
+ val m: _M.m;
25
+ class n() {
26
+ // module body of N
27
28
29
+object O {
30
+ val system = new M() with N {}
31
tests/pending/pos/SI-5788.scala renamed to tests/pos/SI-5788.scala
0 commit comments