[Issue 18267] array comparison broken in 2.078.3

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 22 15:51:56 UTC 2018


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

John Colvin <john.loughran.colvin at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |industry
            Summary|Linker errors compiling     |array comparison broken in
                   |std_data_json dub package   |2.078.3
                   |with dmd 2.078.0            |

--- Comment #3 from John Colvin <john.loughran.colvin at gmail.com> ---
Here is a standalone file that demonstrates what I think is a symptom of the
same bug:

% cat oops.d
struct JSONValue
{
    TaggedAlgebraic payload;
    alias payload this;
}

struct TaggedAlgebraic
{
    auto opEquals(T)(T other) const
    {
        static assert(is(typeof(performOp!(JSONValue[], T))));
        return const(JSONValue[]).init == other;
    }
}

bool performOp(T, A)(T value, A arg)
{
    return value == arg;
}

% dmd oops.d
Undefined symbols for architecture x86_64:
  "_D6object__T8__equalsTxS4oops9JSONValueTxQsZQBgFNbAxQBdQfZb", referenced
from:
      _D4oops15TaggedAlgebraic__T8opEqualsTAxSQBm9JSONValueZQBbMxFQxZb in
oops.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

--


More information about the Digitalmars-d-bugs mailing list