<div dir="ltr">Hi Doug, thanks for the response!<div class="gmail_extra">
<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><div>There’s a path through TypeChecker::handleSILGenericParams() that you need to consider, which is triggered when parsing SIL. It’s an odd case because you get all of the generic parameter lists up front. I suspect you would just always allow type parameters to be equated with concrete types from here.</div></div></div></div></blockquote><div><br></div><div>Yeah, sounds reasonable. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><span><div>You may need to make the AllowConcreteRequirements flag indicate the depth at which generic parameters are allowed to be made equivalent to concrete types.</div></span></div></div></div></blockquote><div><br></div><div>I guess that makes sense to me, although I'm not convinced it's actually going to be necessary. I'm going to try to get an initial version working first, then consider using depth instead of just a bool.</div><div><br></div><div>The problem I'm running into now is that the PotentialArchetype's getType(ArchetypeBuilder&) is returning the concrete type it was constrained to, so castToArchetype fails (inside getAllArchetypes, during finalizeGenericParamList). I tried simply skipping these archetypes, but a lot of stuff downstream seems to depend on the number of archetypes matching the number of generic params (such as ConsraintSystem::openGeneric, BoundGenericType, etc.). Do you think I should be modifying <span class="">ArchetypeBuilder</span><span class="">::</span><span class="">PotentialArchetype</span><span class="">::getType() to return a valid archetype in this case, and just let the constraint solver deal with the same-type requirement later on?</span></div>
<div><br></div><div>Thanks,</div><div>Jacob</div></div></div></div>