-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Regression related to forward reference and nested classes #18988
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
Comments
A possible quick fix may be to reduce precedence of global forward reference (although this may further complicate precedence rules for forward references). I can make a PR later today and check what is the fallout (likely there will be none, so it is more a question of documenting this clearly at some point). |
Line 6 in your example produces a runtime |
There could also be a string literal forward reference in a non-stub file. The main thing is maintaining backward compatibility. |
Yeah, I am going to go now with a minimal change to preserve backwards compatibility in this case. If there will be further complains from real code, we can further adjust the rules (and sorry for a delay, was distracted by unrelated things). |
Here is a possible fix #19000 |
Fixes #18988 This should be a minimal change to restore backwards compatibility for an edge case with forward references.
This example started generating a false positive about an undefined name (simplified from a real-world generated protobuf stubs):
This was a side effect of #18625.
There may be some confusion between
R.Action
andAction
classes.This looks like a release blocker. This is happening in generated protobuf stubs code which can't be edited easily.
If this is non-trivial to fix, we could temporarily revert the original PR until a fix is available.
cc @ilevkivskyi as the author of the above PR
The text was updated successfully, but these errors were encountered: