May 07, 2016
On Monday, 2 May 2016 at 23:41:39 UTC, Steven Schveighoffer wrote:
> On 5/2/16 6:00 PM, sigod wrote:
>> On Monday, 2 May 2016 at 10:15:04 UTC, Marc Schütz wrote:
>>> On Monday, 2 May 2016 at 08:46:31 UTC, Ali Çehreli wrote:
>>>> [...]
>>>
>>> Warning (better: disallowing altogether) about `=>` directly followed
>>> by `{` should be enough to cover all cases. To express that you really
>>> want a lambda returning a lambda, it can be rewritten either as:
>>>
>>>     (x) => () { assert(x); }
>>>
>>> or as:
>>>
>>>     (x) => ({ assert(x); })
>>>
>>> This check can be done purely by looking at the tokens. Should we
>>> someday introduce tuples with `{}`, the check needs to be done after
>>> the node starting with `{` has been parsed to distinguish between
>>> delegate and tuple literals.
>>
>> It's good idea. I myself stumbled into this before.
>
> Agree.
>
> -Steve

https://issues.dlang.org/show_bug.cgi?id=16001
May 08, 2016
On Monday, 2 May 2016 at 10:15:04 UTC, Marc Schütz wrote:
> This check can be done purely by looking at the tokens.

In other words it's trivial for D-Scanner to warn about this.

https://github.com/Hackerpilot/Dscanner/issues/341
1 2
Next ›   Last »