@@ -6,130 +6,133 @@ class Bar[B]
6
6
class Baz
7
7
8
8
9
- fun foo[A](using Foo[A], A)
9
+ fun foo[A](using Foo[A], A) = 42
10
10
11
11
use Foo[Baz] = new Foo
12
12
13
13
14
14
// FIXME: error message refers to `A`
15
+
15
16
:e
16
- :fixme // Internal Error should never reach users
17
+ :re
17
18
foo[Baz]
18
19
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
19
- //│ ║ l.17 : foo[Baz]
20
+ //│ ║ l.18 : foo[Baz]
20
21
//│ ║ ^^^^^^^
21
22
//│ ╟── Required by contextual parameter declaration:
22
- //│ ║ l.9: fun foo[A](using Foo[A], A)
23
+ //│ ║ l.9: fun foo[A](using Foo[A], A) = 42
23
24
//│ ║ ^
24
25
//│ ╙── Expected: A; Available: (Foo[Baz])
25
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
26
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 2 arguments but got 1
26
27
27
28
:e
28
- :fixme // Internal Error should never reach users
29
+ :re
29
30
foo
30
31
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
31
- //│ ║ l.29 : foo
32
+ //│ ║ l.30 : foo
32
33
//│ ║ ^^^
33
34
//│ ╟── Required by contextual parameter declaration:
34
- //│ ║ l.9: fun foo[A](using Foo[A], A)
35
+ //│ ║ l.9: fun foo[A](using Foo[A], A) = 42
35
36
//│ ║ ^
36
37
//│ ╙── Expected: A; Available: (Foo[Baz])
37
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
38
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 2 arguments but got 1
38
39
39
40
40
41
use Baz = new Baz
41
42
42
43
:todo
43
44
foo
44
45
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
45
- //│ ║ l.43 : foo
46
+ //│ ║ l.44 : foo
46
47
//│ ║ ^^^
47
48
//│ ╟── Required by contextual parameter declaration:
48
- //│ ║ l.9: fun foo[A](using Foo[A], A)
49
+ //│ ║ l.9: fun foo[A](using Foo[A], A) = 42
49
50
//│ ║ ^
50
51
//│ ╙── Expected: A; Available: (Foo[Baz], Baz)
51
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
52
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 2 arguments but got 1
52
53
53
54
54
- fun foo[A](using Foo[A])(using A)
55
+ fun foo[A](using Foo[A])(using A) = 42
55
56
56
57
:todo
57
58
foo
58
59
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
59
- //│ ║ l.57 : foo
60
+ //│ ║ l.58 : foo
60
61
//│ ║ ^^^
61
62
//│ ╟── Required by contextual parameter declaration:
62
- //│ ║ l.54 : fun foo[A](using Foo[A])(using A)
63
+ //│ ║ l.55 : fun foo[A](using Foo[A])(using A) = 42
63
64
//│ ║ ^
64
65
//│ ╙── Expected: A; Available: (Foo[Baz], Baz)
65
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
66
+ //│ ═══[RUNTIME ERROR] Error: Function expected 1 argument but got 0
66
67
67
68
68
- fun foo[A](using A)(using Foo[A])
69
+ fun foo[A](using A)(using Foo[A]) = 42
69
70
70
71
:todo
71
72
foo
72
73
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
73
- //│ ║ l.71 : foo
74
+ //│ ║ l.72 : foo
74
75
//│ ║ ^^^
75
76
//│ ╟── Required by contextual parameter declaration:
76
- //│ ║ l.68 : fun foo[A](using A)(using Foo[A])
77
+ //│ ║ l.69 : fun foo[A](using A)(using Foo[A]) = 42
77
78
//│ ║ ^
78
79
//│ ╙── Expected: A; Available: (Foo[Baz], Baz)
79
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
80
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 1 argument but got 0
80
81
81
82
82
83
use Foo[Bar[Baz]] = new Foo
83
84
84
- :fixme // Internal Error should never reach users
85
85
:e
86
+ :re
86
87
foo
87
88
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
88
- //│ ║ l.86 : foo
89
+ //│ ║ l.87 : foo
89
90
//│ ║ ^^^
90
91
//│ ╟── Required by contextual parameter declaration:
91
- //│ ║ l.68 : fun foo[A](using A)(using Foo[A])
92
+ //│ ║ l.69 : fun foo[A](using A)(using Foo[A]) = 42
92
93
//│ ║ ^
93
94
//│ ╙── Expected: A; Available: (Foo[Bar[Baz]], Foo[Baz], Baz)
94
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
95
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 1 argument but got 0
95
96
96
97
use Bar[Baz] = new Bar
97
98
98
- :fixme
99
+ :e
100
+ :re
99
101
foo
100
102
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
101
- //│ ║ l.99 : foo
102
- //│ ║ ^^^
103
+ //│ ║ l.101 : foo
104
+ //│ ║ ^^^
103
105
//│ ╟── Required by contextual parameter declaration:
104
- //│ ║ l.68 : fun foo[A](using A)(using Foo[A])
106
+ //│ ║ l.69 : fun foo[A](using A)(using Foo[A]) = 42
105
107
//│ ║ ^
106
108
//│ ╙── Expected: A; Available: (Foo[Bar[Baz]], Foo[Baz], Baz, Bar[Baz])
107
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
109
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 1 argument but got 0
108
110
109
111
use Bar[Int] = new Bar
110
112
111
- :fixme
113
+ :e
114
+ :re
112
115
foo
113
116
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
114
- //│ ║ l.112 : foo
117
+ //│ ║ l.115 : foo
115
118
//│ ║ ^^^
116
119
//│ ╟── Required by contextual parameter declaration:
117
- //│ ║ l.68 : fun foo[A](using A)(using Foo[A])
120
+ //│ ║ l.69 : fun foo[A](using A)(using Foo[A]) = 42
118
121
//│ ║ ^
119
122
//│ ╙── Expected: A; Available: (Foo[Bar[Baz]], Foo[Baz], Baz, Bar[Int], Bar[Baz])
120
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
123
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 1 argument but got 0
121
124
122
125
use Bar[Baz] = new Bar
123
126
124
127
:todo
125
128
foo
126
129
//│ ╔══[ERROR] Missing instance for contextual parameter of type `A` in this call
127
- //│ ║ l.125 : foo
130
+ //│ ║ l.128 : foo
128
131
//│ ║ ^^^
129
132
//│ ╟── Required by contextual parameter declaration:
130
- //│ ║ l.68 : fun foo[A](using A)(using Foo[A])
133
+ //│ ║ l.69 : fun foo[A](using A)(using Foo[A]) = 42
131
134
//│ ║ ^
132
135
//│ ╙── Expected: A; Available: (Foo[Bar[Baz]], Foo[Baz], Baz, Bar[Baz], Bar[Int], Bar[Baz])
133
- //│ /!!!\ Uncaught error: hkmc2.InternalError: Not in scope: member:foo (class hkmc2.semantics.BlockMemberSymbol)
136
+ //│ ═══[RUNTIME ERROR] Error: Function 'foo' expected 1 argument but got 0
134
137
135
138
0 commit comments