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:
parent
bcfcc5500b
commit
6a92386761
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue