[Issue 11395] New: link error (struct+opEquals) on separate compilation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 30 19:32:24 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11395
Summary: link error (struct+opEquals) on separate compilation
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: link-failure
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mk at krej.cz
--- Comment #0 from Martin Krejcirik <mk at krej.cz> 2013-10-31 03:32:22 CET ---
----------------
module stru;
struct StruB
{
bool flag;
int[] nums;
bool opEquals(bool b) { return flag == b; }
}
struct StruA
{
int num;
StruB sb;
}
----------------
module main;
import stru;
StruA[] arr;
void main()
{
StruA s;
arr ~= s;
}
-----------------
dmd -c stru.d
dmd -c main.d
dmd main.o stru.o
main.o:(.data._D21TypeInfo_S4stru5StruA6__initZ+0x1c): undefined reference to
`_D4stru5StruA11__xopEqualsFKxS4stru5StruAKxS4stru5StruAZb'
collect2: ld returned 1 exit status
--- errorlevel 1
DMD32 D Compiler v2.064-devel-e5a0c64 Linux
This is a regression against earlier 2.064 or 2.063.2
Adding opEquals to StruA or a single command compilation both solves the
problem, so feel free to downgrade.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list