On 05/10/2017 11:50 AM, Adrian Matoga wrote:
On Wednesday, 10 May 2017 at 15:03:19 UTC, Adam D. Ruppe wrote:

lll.d(5): Error: function lll.foo (Color c) is not callable using
argument types (Color)

WTF, right? Well, I have a locally defined `struct Color` and an
imported one. Same name, but different type. The error message doesn't
tell me which one is which.

Yeah, that one was funny. :)

It's not so funny when you're new to that error and don't already know to look for two types from different modules with the same name. :(

Same with assertions. I usually end up adding wrappers like assertEqual,
and the more I use them, the more I feel like switching to something
like [3] or [4], as much as I normally prefer to keep the number of
dependencies low.

[3] https://code.dlang.org/packages/fluent-asserts
[4] http://code.dlang.org/packages/unit-threaded

Unit-threaded rocks my world. First I've heard of fluent-asserts but it looks interesting.

Reply via email to