lean4-htt/tests/lean/1021.lean.expected.out
Robert J. Simmons 3bd1dd633f
feat: identifier suggestions on some autobinding failures (#11621)
This PR causes Lean to search through `@[suggest_for]` annotations on
certain errors that look like unknown identifiers that got incorrectly
autobound. This will correctly identify that a declaration of type
`Maybe String` should be `Option String` instead.

## Example

```
example : Except String Unit := return .ok ()
```

```
Function expected at
  Result
but this term has type
  ?m.1

Note: Expected a function because this term is being applied to the argument
  String

Hint: The identifier `Result` is unknown, and Lean's `autoImplicit` option causes an unknown identifier to be treated as an implicitly bound variable with an unknown type. However, the unknown type cannot be a function, and a function is what Lean expects here. This is often the result of a typo or a missing `import` or `open` statement.

Perhaps you meant `Except` in place of `Result`?
```

The last line is added by this PR.
2025-12-11 21:40:16 +00:00

8 lines
311 B
Text

some
{
range :=
{ pos := { line := 213, column := 0 }, charUtf16 := 0, endPos := { line := 218, column := 31 },
endCharUtf16 := 31 },
selectionRange :=
{ pos := { line := 213, column := 46 }, charUtf16 := 46, endPos := { line := 213, column := 58 },
endCharUtf16 := 58 } }