www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21939] New: Duplicate error messages for wrong aggregate in

https://issues.dlang.org/show_bug.cgi?id=21939

          Issue ID: 21939
           Summary: Duplicate error messages for wrong aggregate in
                    'static foreach'
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: boris2.9 gmail.com

test:
---
static foreach (a; Object) {}
---

output:
test.d(1): Error: invalid `foreach` aggregate `Object`, define `opApply()`,
range primitives, or use `.tupleof`
test.d(1): Error: invalid `foreach` aggregate `Object`, define `opApply()`,
range primitives, or use `.tupleof`

--
May 20 2021