Rework SymbolId handling of generics
1. Use ConstructedFrom instead of OriginalDefinition to handle partially constructed types. 2. Always encode type parameter references using `n or ``n, since they can only refer to type parameters within the current symbol being encoded. 3. When *parsing* SymbolIds, *do* set the type parameter context when parsing types. That way we can handle self-constructed types. However, we don't want to reset the context when we're parsing out the type of a parameter/return type/etc, because the signature *can't* refer to the type parameters of *that* simple. So, now we keep track of when the parser has finished parsing the top level type, and only reset the type parameter context while we're at the top level. 4. Add test cases for a bunch of partially constructed symbols. (While I was here, I noticed that a GetMembers() call could be simplified to GetTypeMembers() and a type check/cast elimiated, so I did so. The diff looks better with whitespace ignored because of that).
Showing
想要评论请 注册 或 登录