Commits

Slava Pestov committed d6ea5d8717d
Sema: Chain all generic parameter lists Previously, methods on DeclContext for getting generic parameters and signatures did not walk up from type contexts to function contexts, or function contexts to function contexts. Presumably this is because SIL doesn't completely support nested generics yet, instead only handling these two special cases: - non-generic local function inside generic function - generic method inside generic type For local functions nested inside generic functions, SIL expects the closure to not have an interface type or generic signature, even if the contextual type signature contains archetypes. This should probably be revisited some day. Recall that these cases are explicitly rejected by Sema diagnostics because they lack SIL support: - generic function inside generic function - generic type inside generic function After the previous patches in this series, it becomes possible to construct types that are the same as before for the supported uses of nested generics, while introducing a more self-consistent conceptual model for the unsupported cases. Some new tests show we generate diagnotics in various cases that used to crash. The conceptual model might still not be completely right, and of course SIL, IRGen and runtime support is still missing.