[swift-dev] Why doesn't CaptureListExpr hold a ClosureExpr?

Jacob Bandes-Storch jtbandes at gmail.com
Tue Feb 7 21:30:45 CST 2017

I just learned about CaptureListExpr when working on some diagnostics. Is
there a particular reason that its member "closureBody" is an Expr* and not
a ClosureExpr*? There seems to be only one place it's built
and the body is always a ClosureExpr.

I can see one minor place
where it might be less convenient to have a ClosureExpr, but otherwise
there doesn't seem to be much of a reason to keep it generalized to Expr*.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170207/b68cee53/attachment.html>

More information about the swift-dev mailing list