public CapnpType ResolveGenericParameter(CapnpGenericParameter parameter) { var genericOpenType = OpenType as CapnpGenericType; var index = genericOpenType == null ? -2 : Array.IndexOf(genericOpenType.TypeParameters, parameter); if (index < 0) { return(ParentScope == null ? null : ParentScope.ResolveGenericParameter(parameter)); } var result = TypeParameters[index]; if (result is CapnpGenericParameter && ParentScope != null) { return(ParentScope.ResolveGenericParameter((CapnpGenericParameter)result)); } return(result); }
protected internal virtual CapnpGenericParameter VisitGenericParameter(CapnpGenericParameter @param) { return(@param); }