Skip to content

Relational expression for dynamic arrays with vector elements fails to compile #2154

Open
@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

Paul Backus reported this on 2024-11-13T22:34:55Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=24859

Description

As of DMD 2.109.1, the following program fails to compile:

---
void main()
{
    __vector(int[4])[] a, b;
    auto result = a < b;
}
---

The error message is:

---
/usr/include/dmd/druntime/import/core/internal/array/comparison.d(77): Error: expression `r` of type `const(__vector(int[4]))` does not have a boolean value
/usr/include/dmd/druntime/import/core/internal/array/comparison.d(77): Error: cannot implicitly convert expression `r` of type `const(__vector(int[4]))` to `int`
bug.d(4): Error: template instance `core.internal.array.comparison.__cmp!(__vector(int[4]))` error instantiating
---

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions