On Saturday, 15 May 2021 at 06:12:25 UTC, SealabJaster wrote:
On Saturday, 15 May 2021 at 04:54:15 UTC, Chris Piker wrote:

T_T My eyes burn.

Good, it's not just me. If figured the Deities out there visually parse these messages even hung over.

Seems the final `int function` parameter needs to accept a `Tuple!(int, int)`

I did much the same as you and reformatted the error message to find the bug. As to the larger question of how to automatically process compiler output... got any ideas?

Hey since you're pretty good at this, can you tell me why how a person fixes this error? I've already formatted it, but I haven't changed any of the non-whitespace text.

```
das2/range.d(570,39): Error: incompatible types for (dr_fine) : (dr_coarse):
```
```d
das2.range.PriorityRange!(
  DasRange!(
    Take!(
      ZipShortest!(
cast(Flag)false, Result, Generator!(function () @safe => uniform(0, 128))
      )
    ),
    int function(Tuple!(int, int)) pure nothrow @nogc @safe,
    int function(Tuple!(int, int)) pure nothrow @nogc @safe,
    Tuple!(int, int),
    int
  ),
  int function() pure nothrow @nogc @safe
)

and

das2.range.PriorityRange!(
  DasRange!(
    Take!(
      ZipShortest!(
cast(Flag)false, Result, Generator!(function () @safe => uniform(0, 128))
      )
    ),
    int function(Tuple!(int, int)) pure nothrow @nogc @safe,
    int function(Tuple!(int, int)) pure nothrow @nogc @safe,
    Tuple!(int, int),
    int
  ),
  int function() pure nothrow @nogc @safe
)

```
To get around the problem I used `.array` for a bit of type erasure, so for now this error isn't messing with my unittests, but danged if I can spot the problem, even formatted.

My guess is that the `Result` item is a hint. `Result` probably never equals another `Result` no matter what.

Reply via email to