[Bug 311] New: Multiple definition when not overriding everything
gdc-bugzilla at gdcproject.org
gdc-bugzilla at gdcproject.org
Mon Mar 4 02:05:02 UTC 2019
https://bugzilla.gdcproject.org/show_bug.cgi?id=311
Bug ID: 311
Summary: Multiple definition when not overriding everything
Product: GDC
Version: 8,x
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gdc
Assignee: ibuclaw at gdcproject.org
Reporter: alex at sunopti.com
gdc --version = gdc (Debian 8.2.0-21) 8.2.0
Multiple symbols when linking derived class with partial override.
File named a.d:
interface A
{
bool m1();
bool m2();
}
class AA : A
{
override bool m1() { return true; }
override bool m2()
{
return true;
}
}
File named b.d:
import std.stdio;
import a;
class B : AA
{
override bool m2()
{
return true;
}
}
void main()
{
auto b = new B;
writefln("%s",b.m2);
}
Command line :
gdc -c a.d
gdc -c b.d
gdc a.o b.o
/usr/bin/ld: b.o: in function `_DT16_D1a2AA2m1MFZb':
b.d:(.text+0x122): multiple definition of `_DT16_D1a2AA2m1MFZb';
a.o:a.d:(.text+0x71): first defined here
No error if compiled all at once:
gdc a.d b.d
--
You are receiving this mail because:
You are watching all bug changes.
More information about the D.gnu
mailing list