<div dir="ltr">You might find BoundGenericType useful:<div><br></div><div><a href="https://github.com/apple/swift/blob/5aa40dd0aa057591398339c77df91a976ae35c72/include/swift/AST/Types.h#L1438">https://github.com/apple/swift/blob/5aa40dd0aa057591398339c77df91a976ae35c72/include/swift/AST/Types.h#L1438</a><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob Bandes-Storch<br></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jan 11, 2016 at 2:31 PM, Daniel Duan via swift-dev <span dir="ltr">&lt;<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
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>
<br>
struct Y&lt;T&gt; {}<br>
struct X&lt;T, U&gt; {<br>
  let a: Y&lt;T&gt;<br>
  let b: Y&lt;U&gt;<br>
}<br>
<br>
<br>
In the AST, the type of member “a” would be  “Y&lt;T&gt;&quot;. But I can’t figure out how to inspect the inner “T” from the TypeDecl instance that represents a’s type.<br>
<br>
What am I missing here?<br>
<br>
- Daniel<br>
_______________________________________________<br>
swift-dev mailing list<br>
<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a><br>
</blockquote></div><br></div></div>