smoke: a file that checks may still warn

The compiler now warns about a definition nothing uses, and the sample
file for inferred types defines functions it neither exports nor calls.
"The file checks" asks for no errors.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
Linus Björnstam 2026-10-22 15:06:24 +02:00
parent bcfcc5500b
commit 6a92386761

View file

@ -536,7 +536,9 @@ def inferred(server, tmp):
with open(path, "w") as f:
f.write(INFERRED)
found = server.diagnostics_after("textDocument/didOpen", uri, INFERRED)
expect("inferred: the file checks", found == [], json.dumps(found, indent=1))
# Warnings there are: its functions are not exported, and nothing calls them.
errors = [d for d in found if d["severity"] == 1]
expect("inferred: the file checks", errors == [], json.dumps(errors, indent=1))
def hover(text, needle, offset=1, nth=0):
at = position_of(text, needle, nth, offset)