Suspicious symbol structure is created around tuple fields #43597
Labels
Area-Compilers
Concept-Design Debt
Engineering Debt, Design Debt, or poor product code quality
Feature - Tuples
Tuples
Milestone
The following unit-test succeeds today:
Observed:
For 'Item1' definition (and other fields declared within a tuple type) we have two field symbols. Both are reachable. The SourceFieldSymbol one is dangling, i.e. it is not in GetMembers for the type. TupleFieldSymbol is in GetMembers and points to the SourceFieldSymbol through TupleUnderlyingField.
SourceFieldSymbol.TupleUnderlyingField
returns itself.This complicated shape is unexpected, it is not clear what is the motivation for it and what benefits we are getting from duplicating symbols like that. I think more sound design would be:
I assume PE symbols have similar issues.
I also believe that this issue is the root cause of #43524. If we didn't have this symbol shape, we wouldn't crash.
The text was updated successfully, but these errors were encountered: