-
Notifications
You must be signed in to change notification settings - Fork 832
Syntax Tree: fix return type info for let! / and! / use! #19004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
❗ Release notes required
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @DedSec256 .
It seems that the fix in the tree is not enough. Types in the new syntax are not checked. |
@DedSec256 No worries. Im still planning to investigate a fix for #19005. But would be good to wait for this to be merged so I can use your changes. |
be0afee
to
e5b5efd
Compare
@T-Gro, could you please take a look? |
Now there are several ways to annotate the binding:
Tree:
Tree:
However, for annotated
let!
/and!
/use!
bindings theSynBindingReturnInfo
is alwaysNone
. Instead, a typed head pat is always produced as a part of the syntax tree, even if there was no annotated pattern in a source code.This is inconsistent with simple let bindings and can create problems when handling typed
let!
/and!
/use!
bindingin logic that relies on return type info.
This PR brings the syntax tree to a consistent view.