<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">BoundGenericType::getGenericArgs() is exactly what I was looking for. Thanks Jacob!<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 11, 2016, at 2:34 PM, Jacob Bandes-Storch &lt;<a href="mailto:jtbandes@gmail.com" class="">jtbandes@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">You might find BoundGenericType useful:<div class=""><br class=""></div><div class=""><a href="https://github.com/apple/swift/blob/5aa40dd0aa057591398339c77df91a976ae35c72/include/swift/AST/Types.h#L1438" class="">https://github.com/apple/swift/blob/5aa40dd0aa057591398339c77df91a976ae35c72/include/swift/AST/Types.h#L1438</a><br class=""></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">Jacob Bandes-Storch<br class=""></div></div></div></div>
<br class=""><div class="gmail_quote">On Mon, Jan 11, 2016 at 2:31 PM, Daniel Duan via swift-dev <span dir="ltr" class="">&lt;<a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br class="">
<br class="">
Working on a swiftc crash in the type checker, I’m having a hard time with getting generic type pattern in the AST. For example, say we have parsed:<br class="">
<br class="">
struct Y&lt;T&gt; {}<br class="">
struct X&lt;T, U&gt; {<br class="">
&nbsp; let a: Y&lt;T&gt;<br class="">
&nbsp; let b: Y&lt;U&gt;<br class="">
}<br class="">
<br class="">
<br class="">
In the AST, the type of member “a” would be&nbsp; “Y&lt;T&gt;". But I can’t figure out how to inspect the inner “T” from the TypeDecl instance that represents a’s type.<br class="">
<br class="">
What am I missing here?<br class="">
<br class="">
- Daniel<br class="">
_______________________________________________<br class="">
swift-dev mailing list<br class="">
<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-dev</a><br class="">
</blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></div></body></html>