You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
registerFailedToInferBinderTypeInfo type binderView.type
216
+
registerFailedToInferBinderTypeInfo type binderView
213
217
if binderView.bi.isInstImplicit && checkBinderAnnotations.get (← getOptions) then
214
218
unless (← isClass? type).isSome do
215
219
throwErrorAt binderView.type "invalid binder annotation, type is not a class instance{indentExpr type}\nuse the command `set_option checkBinderAnnotations false` to disable the check"
331.lean:6:13-6:14: error: failed to infer binder type
1
+
331.lean:6:9-6:10: error: Failed to infer type of binder 'x'
2
2
when the resulting type of a declaration is explicitly provided, all holes (e.g., `_`) in the header are resolved before the declaration body is processed
3
-
331.lean:7:13-7:14: error: failed to infer binder type
3
+
331.lean:7:9-7:10: error: Failed to infer type of binder 'x'
4
4
when the resulting type of a declaration is explicitly provided, all holes (e.g., `_`) in the header are resolved before the declaration body is processed
Copy file name to clipboardExpand all lines: tests/lean/holeErrors.lean.expected.out
+9-9
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@ holeErrors.lean:3:14-3:20: error: don't know how to synthesize implicit argument
2
2
@id ?m
3
3
context:
4
4
⊢ Sort u
5
-
holeErrors.lean:3:11-3:20: error: failed to infer definition type
6
-
holeErrors.lean:5:9-5:10: error: failed to infer definition type
5
+
holeErrors.lean:3:4-3:10: error: Failed to infer type of definition 'f1.{u}'
6
+
holeErrors.lean:5:4-5:6: error: Failed to infer type of definition 'f2'
7
7
when the resulting type of a declaration is explicitly provided, all holes (e.g., `_`) in the header are resolved before the declaration body is processed
8
8
holeErrors.lean:8:9-8:15: error: don't know how to synthesize implicit argument 'α'
9
9
@id ?m
10
10
context:
11
11
⊢ Sort u
12
12
holeErrors.lean:8:4-8:5: error: failed to infer 'let' declaration type
13
-
holeErrors.lean:7:11-9:1: error: failed to infer definition type
14
-
holeErrors.lean:11:11-11:15: error: failed to infer definition type
15
-
holeErrors.lean:11:8-11:9: error: failed to infer binder type
16
-
holeErrors.lean:13:15-13:19: error: failed to infer definition type
17
-
holeErrors.lean:13:12-13:13: error: failed to infer binder type
18
-
holeErrors.lean:16:4-16:5: error: failed to infer binder type
19
-
holeErrors.lean:15:7-16:10: error: failed to infer definition type
13
+
holeErrors.lean:7:4-7:10: error: Failed to infer type of definition 'f3.{u}'
14
+
holeErrors.lean:11:4-11:6: error: Failed to infer type of definition 'f4'
15
+
holeErrors.lean:11:8-11:9: error: Failed to infer type of binder 'x'
16
+
holeErrors.lean:13:4-13:6: error: Failed to infer type of definition 'f5'
17
+
holeErrors.lean:13:8-13:9: error: Failed to infer type of binder 'x'
18
+
holeErrors.lean:16:4-16:5: error: Failed to infer type of binder 'x'
19
+
holeErrors.lean:15:4-15:6: error: Failed to infer type of definition 'f6'
20
20
holeErrors.lean:19:13-19:19: error: don't know how to synthesize implicit argument 'α'
multiConstantError.lean:1:11-1:12: error: failed to infer binder type
1
+
multiConstantError.lean:1:11-1:12: error: Failed to infer type of binder 'c'
2
2
recall that you cannot declare multiple constants in a single declaration. The identifier(s) `b`, `c` are being interpreted as parameters `(b : _)`, `(c : _)`
3
-
multiConstantError.lean:1:9-1:10: error: failed to infer binder type
3
+
multiConstantError.lean:1:9-1:10: error: Failed to infer type of binder 'b'
4
4
recall that you cannot declare multiple constants in a single declaration. The identifier(s) `b`, `c` are being interpreted as parameters `(b : _)`, `(c : _)`
5
-
multiConstantError.lean:3:9-3:10: error: failed to infer binder type
5
+
multiConstantError.lean:3:9-3:10: error: Failed to infer type of binder 'α'
6
6
recall that you cannot declare multiple constants in a single declaration. The identifier(s) `α`, `β` are being interpreted as parameters `(α : _)`, `(β : _)`
/-! Check messages of binder type inference failures. -/
2
+
3
+
/--
4
+
error: Failed to infer type of binder 'y'
5
+
---
6
+
error: Failed to infer type of binder 'x'
7
+
---
8
+
error: Failed to infer type of definition 'l1'
9
+
-/
10
+
#guard_msgs in
11
+
defl1 := fun x y => x
12
+
13
+
/--
14
+
error: Failed to infer binder type
15
+
---
16
+
error: Failed to infer type of definition 'l2'
17
+
-/
18
+
#guard_msgs in
19
+
defl2 := fun _ => 0
20
+
21
+
/--
22
+
error: Failed to infer type of theorem 't'
23
+
when the resulting type of a declaration is explicitly provided, all holes (e.g., `_`) in the header are resolved before the declaration body is processed
24
+
---
25
+
error: type of theorem 't' is not a proposition
26
+
?m.65
27
+
-/
28
+
#guard_msgs in
29
+
theoremt : _ := _
30
+
31
+
/--
32
+
error: Failed to infer type of example
33
+
when the resulting type of a declaration is explicitly provided, all holes (e.g., `_`) in the header are resolved before the declaration body is processed
0 commit comments