<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 23, 2012, at 1:49 AM, Phil King wrote:</div><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt; position: static; z-index: auto; "><div><span>I'm trying to get the return type for the function associated with a ReturnStmt AST node.</span></div><div><br><span></span></div><div><span>The type of the return expression is easy as that's available via getRetValue(), but I can't see an obvious way to get the return type of the function (so I can check the two match).</span></div></div></div></blockquote><div><br></div>The expression in the ReturnStmt will have been implicitly converted to the return type, so unless you're writing an AST verifier, there is nothing to do here.</div><div><br></div><div>You probably want to look past any implicit conversions and see what expression was actually written.</div><div><br></div><div>John.</div></body></html>