@@ -24,43 +24,21 @@ module M with {
24
24
25
25
:e
26
26
fun f1(module m)
27
- //│ FAILURE: Unexpected exception
28
- //│ /!!!\ Uncaught error: scala.MatchError: TypeDef(Mod,Ident(m),None,None) (of class hkmc2.syntax.Tree$TypeDef)
29
- //│ at: hkmc2.semantics.Elaborator.param(Elaborator.scala:610)
30
- //│ at: hkmc2.semantics.Elaborator.$anonfun$19(Elaborator.scala:614)
31
- //│ at: scala.collection.immutable.List.flatMap(List.scala:294)
32
- //│ at: hkmc2.semantics.Elaborator.params(Elaborator.scala:614)
33
- //│ at: hkmc2.semantics.Elaborator.$anonfun$10(Elaborator.scala:484)
34
- //│ at: scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
35
- //│ at: scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
36
- //│ at: scala.collection.immutable.List.foldLeft(List.scala:79)
37
- //│ at: hkmc2.semantics.Elaborator.go$2(Elaborator.scala:483)
38
- //│ at: hkmc2.semantics.Elaborator.block$$anonfun$3(Elaborator.scala:597)
27
+ //│ FAILURE: Unexpected lack of type error
39
28
40
29
:e
41
30
fun f2[T](module m: T)
42
- //│ FAILURE: Unexpected exception
43
- //│ /!!!\ Uncaught error: scala.MatchError: TypeDef(Mod,InfixApp(Ident(m),keyword ':',Ident(T)),None,None) (of class hkmc2.syntax.Tree$TypeDef)
44
- //│ at: hkmc2.semantics.Elaborator.param(Elaborator.scala:610)
45
- //│ at: hkmc2.semantics.Elaborator.$anonfun$19(Elaborator.scala:614)
46
- //│ at: scala.collection.immutable.List.flatMap(List.scala:294)
47
- //│ at: hkmc2.semantics.Elaborator.params(Elaborator.scala:614)
48
- //│ at: hkmc2.semantics.Elaborator.$anonfun$10(Elaborator.scala:484)
49
- //│ at: scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
50
- //│ at: scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
51
- //│ at: scala.collection.immutable.List.foldLeft(List.scala:79)
52
- //│ at: hkmc2.semantics.Elaborator.go$2(Elaborator.scala:483)
53
- //│ at: hkmc2.semantics.Elaborator.block$$anonfun$3(Elaborator.scala:597)
31
+ //│ FAILURE: Unexpected lack of type error
54
32
55
33
:e
56
34
module N with {
57
35
fun f3(): M = M
58
36
}
59
37
//│ ╔══[ERROR] Name not found: M
60
- //│ ║ l.57 : fun f3(): M = M
38
+ //│ ║ l.35 : fun f3(): M = M
61
39
//│ ╙── ^
62
40
//│ ╔══[ERROR] Name not found: M
63
- //│ ║ l.57 : fun f3(): M = M
41
+ //│ ║ l.35 : fun f3(): M = M
64
42
//│ ╙── ^
65
43
66
44
:e
@@ -85,30 +63,30 @@ module N with {
85
63
fun f5(): M = M
86
64
}
87
65
//│ ╔══[ERROR] Name not found: M
88
- //│ ║ l.85 : fun f5(): M = M
66
+ //│ ║ l.63 : fun f5(): M = M
89
67
//│ ╙── ^
90
68
//│ ╔══[ERROR] Name not found: M
91
- //│ ║ l.85 : fun f5(): M = M
69
+ //│ ║ l.63 : fun f5(): M = M
92
70
//│ ╙── ^
93
71
94
72
95
73
fun f6(m: M)
96
74
//│ FAILURE: Unexpected type error
97
75
//│ ╔══[ERROR] Name not found: M
98
- //│ ║ l.95 : fun f6(m: M)
76
+ //│ ║ l.73 : fun f6(m: M)
99
77
//│ ╙── ^
100
78
101
79
:e
102
80
f6(M)
103
81
//│ ╔══[ERROR] Name not found: M
104
- //│ ║ l.102 : f6(M)
105
- //│ ╙── ^
82
+ //│ ║ l.80 : f6(M)
83
+ //│ ╙── ^
106
84
107
85
:e
108
86
f6(M.self())
109
87
//│ ╔══[ERROR] Name not found: M
110
- //│ ║ l.108 : f6(M.self())
111
- //│ ╙── ^
88
+ //│ ║ l.86 : f6(M.self())
89
+ //│ ╙── ^
112
90
113
91
:e
114
92
fun f7(): module M
@@ -127,18 +105,10 @@ fun f7(): module M
127
105
128
106
129
107
fun ok1(module m: M)
130
- //│ FAILURE: Unexpected exception
131
- //│ /!!!\ Uncaught error: scala.MatchError: TypeDef(Mod,InfixApp(Ident(m),keyword ':',Ident(M)),None,None) (of class hkmc2.syntax.Tree$TypeDef)
132
- //│ at: hkmc2.semantics.Elaborator.param(Elaborator.scala:610)
133
- //│ at: hkmc2.semantics.Elaborator.$anonfun$19(Elaborator.scala:614)
134
- //│ at: scala.collection.immutable.List.flatMap(List.scala:294)
135
- //│ at: hkmc2.semantics.Elaborator.params(Elaborator.scala:614)
136
- //│ at: hkmc2.semantics.Elaborator.$anonfun$10(Elaborator.scala:484)
137
- //│ at: scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
138
- //│ at: scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
139
- //│ at: scala.collection.immutable.List.foldLeft(List.scala:79)
140
- //│ at: hkmc2.semantics.Elaborator.go$2(Elaborator.scala:483)
141
- //│ at: hkmc2.semantics.Elaborator.block$$anonfun$3(Elaborator.scala:597)
108
+ //│ FAILURE: Unexpected type error
109
+ //│ ╔══[ERROR] Name not found: M
110
+ //│ ║ l.107: fun ok1(module m: M)
111
+ //│ ╙── ^
142
112
143
113
module N with {
144
114
fun ok2(): module M = M
@@ -158,20 +128,12 @@ module N with {
158
128
159
129
ok1(M)
160
130
//│ FAILURE: Unexpected type error
161
- //│ ╔══[ERROR] Name not found: ok1
162
- //│ ║ l.159: ok1(M)
163
- //│ ╙── ^^^
164
- //│ FAILURE: Unexpected type error
165
131
//│ ╔══[ERROR] Name not found: M
166
- //│ ║ l.159 : ok1(M)
132
+ //│ ║ l.129 : ok1(M)
167
133
//│ ╙── ^
168
134
169
135
ok1(M.self())
170
136
//│ FAILURE: Unexpected type error
171
- //│ ╔══[ERROR] Name not found: ok1
172
- //│ ║ l.169: ok1(M.self())
173
- //│ ╙── ^^^
174
- //│ FAILURE: Unexpected type error
175
137
//│ ╔══[ERROR] Name not found: M
176
- //│ ║ l.169 : ok1(M.self())
138
+ //│ ║ l.135 : ok1(M.self())
177
139
//│ ╙── ^
0 commit comments