Ticket #254 (closed defect: wontfix)
all expression on empty list returns true
Reported by: | nevdelap | Owned by: | nevdelap |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
class P def main is shared a = List<of int>() print all for b in a get b == 6
true
Is this a bug?
Currently it's like saying... "Are all the apples in the empty basket red?"
Neither Yes nor No is really correct. But...
The answer "No" makes sense because it can be qualified with "Because there are no apples."
The answer "Yes." can't be the right answer in any sense.
So I'm thinking all on an empty list should return false.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.