dmd/compiler/test/fail_compilation/ice13459.d
Nick Treleaven d5842945d9 Show TypeFunction.mod in overload candidates
Fix Issue 22216 - Incomplete/incorrect error message for mutability overloads
2023-11-14 17:48:15 +00:00

19 lines
437 B
D

/*
TEST_OUTPUT:
---
fail_compilation/ice13459.d(12): Error: undefined identifier `B`
fail_compilation/ice13459.d(18): Error: none of the overloads of `opSlice` are callable using argument types `(int, int)`
fail_compilation/ice13459.d(11): Candidate is: `ice13459.A.opSlice() const`
---
*/
struct A
{
auto opSlice() const {}
auto opSlice() { return B; }
}
void main()
{
auto df = A();
foreach (fi; df[0..0]) {}
}