Instantiation expression inside nested classes produces unexpected circular reference error #52892
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
Bug Report
π Search Terms
instantiation expression nested class
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Shows an error
'child' is referenced directly or indirectly in its own type annotation.
.However, when uncommenting
// static {...}
it will work only in playground.In VSCode it still shows the error above.
π Expected behavior
a.child.parent.value
isnumber
Workaround
A workaround is remove the default type for
class B<T>
. The code below works well, also, only in playground. In my VSCode(5.0.0-dev.20230216) it still breaks unfortunately.The text was updated successfully, but these errors were encountered: