-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Don't add constraints for invalid subscript declarations. #389
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
Conversation
|
Adding constraints for the invalid operator decl means constraining to the error type, which fails an assertion later on while binding an overload choice. In all the normal function/method overload choice cases, if the decl is invalid that choice gets skipped (never generated), so this is just another case of the existing way of doing things. |
|
Great catch. I'd suggest returning "Type()" when the decl is known invalid (mirroring the behavior in visitOverloadedMemberRefExpr around line 1312). Also, since the test case is small and should be fast to run, please add it to the non-validation test suite, I'd suggest in test/decl/subscript/subscripting.swift. Thank you for tracking this down and fixing it! |
|
Sure thing! Here's a second commit with your suggestions. If it looks good, let me know, and I'll squash the two. |
This fixes the crash in sr-114. Adding constraints for the invalid operator decl means constraining to the error type, which fails an assertion later on while binding an overload choice. In all the normal function/method overload choice cases, if the decl is invalid that choice gets skipped (never generated), so this is just another case of the existing way of doing things
|
Actually, just went ahead and squashed because hopefully this is the final change needed. |
|
Totally awesome, thank you! |
Don't add constraints for invalid subscript declarations.
|
Also, please do the honors of closing SR-114! :-) |
build: link against swiftOnoneSupport in debug configuration
…d-actions-have-a-configuration-field Don't assume all xfailed actions have a 'configuration' specified
This fixes the crash in sr-114.