-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingplaygroundA playground-specific issueA playground-specific issuetyMulti-file analysis & type inferenceMulti-file analysis & type inference
Milestone
Description
This is something that happened to me a few times. It's always the same situation. I add a return type annotation by typing -> … after a function definition, and then I'm left with a syntax error that shouldn't be there:
How to reproduce:
- Go to https://playknot.ruff.rs/ffc63887-bdf3-4471-a4be-097a2f047e2b
- Add an incorrect return annotation (by typing), for example:
-> str - Observe incorrect syntax error
Expected ':', found '-' (invalid-syntax)
Seems to be related to there being another diagnostic as well. If you type -> int, it works fine. If you do random other changes to that file, the error often goes away. For example, if you select all text, cut it, and paste it back in, the error is gone.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingplaygroundA playground-specific issueA playground-specific issuetyMulti-file analysis & type inferenceMulti-file analysis & type inference
