--
You received this message because you are subscribed to the Google Groups "ceylon-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-users...@googlegroups.com.
To post to this group, send email to ceylon...@googlegroups.com.
Visit this group at http://groups.google.com/group/ceylon-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceylon-users/876c5278-31cb-4fe6-8ae3-7667db6ca37b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I believe, if allowed, ` i > 0 then null else i` would always evaluate to `i`, which would be confusing.
On Jul 6, 2015, at 12:34 PM, Nikolay Rychkov <nikolay...@gmail.com> wrote:
WhyInteger?[] test = [for (i in -3 .. 3) i > 0 then i else null];is ok, otherwiseInteger?[] test = [for (i in -3 .. 3) i > 0 then null else i];causes errors "Operand expression may not be an optional type: null is not assignable to Object" and "Expression must be of optional type: Null is not optional"
--
You received this message because you are subscribed to the Google Groups "ceylon-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-users...@googlegroups.com.
To post to this group, send email to ceylo...@googlegroups.com.
To post to this group, send email to ceylon...@googlegroups.com.
Visit this group at http://groups.google.com/group/ceylon-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceylon-users/5be763ae-3c25-4094-8799-f3e86edafa2a%40googlegroups.com.