[swift-dev] Advice for implementing "literal values as generic types"

David Sweeris davesweeris at mac.com
Tue Aug 29 13:03:51 CDT 2017


Hi everyone! I'm trying to implement literal values as generic types. So far, I've made `LiteralExpr` inherit from both `Expr` and `GenericTypeDecl` (instead of just `Expr`), and did whatever other changes were necessary to get that compiling (mostly putting several "using Expr::setImplicit;" kind of lines within `LiteralExpr`'s declaration and prepending "(Expr*)" to a bunch of variables in what are now ambiguous function calls).

Anyway, I haven't done any testing yet to see how much I've broken (compiles != works), but before I get neck-deep in everything I thought I'd ask if anyone sees any fundamental issues with this approach, or has any better ideas.

- Dave Sweeris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170829/f2255282/attachment.html>


More information about the swift-dev mailing list