You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Always use adapted type in withDenotation (#16901)
When creating a NamedType with a given overloaded denotation, make sure
that the type has a Name as designator. This prevents accidentally
overwriting a more precise symbolic TermRef that refers to one specific
alternative of the denotation.
This might be enough to fix#16884.
EDIT: It wasn't enough but the second commit
[46e82dd](46e82dd)
should fix it. The second commit never overwrites in `withDenot`. It can
do that because we fix `infoDependsOnPrefix` to work correctly for
abstract types that are refined in a self type. It turned out that
previously we needed some TypeRefs to keep their Name designators
because that way we would recompute their info with a `member`
operation. If these TypeRefs had a symbol designator they would be
recomputed wrongly by `symd.current` in `fromDesignator` because the
preceding `infoDependsOnPrefix` test was faulty.
It would be great if we could maintain the general invariant that
NamedTypes with overloaded denotations always have names as designators.
But that looks very hard when we take into account that we need to
update named types to new runs. A type might have a single denotation in
one round and an overloaded one in the next.
0 commit comments