[swift-dev] SR-3423 Enum RawValue Tuple of Literals
spestov at apple.com
Sun Nov 12 19:38:09 CST 2017
> On Nov 12, 2017, at 5:37 PM, Mohammed Ennabah via swift-dev <swift-dev at swift.org> wrote:
> Hi All,
> I’m working on SR-3423, the issue basically is Swift does not allow using literals when they are represented as tuples. Now when I went through the codebase, I found that (AFAIK) it can be fixed by either
> a) giving tuples of literals a LiteralExpr, so there will be something like TupleLiteralExpr when they hold literal values.
> Or b) changing the condition “The raw value must be syntactically a simple literal” which stated in lib/Parse/ParseDecl.cpp::5223 to comprise a case where the raw value is tuples of literal.
> I think that the second case (b) is more specific about the issue, but will it have downsides in the future?
I think b) is the way to go.
> swift-dev mailing list
> swift-dev at swift.org
More information about the swift-dev