Bug 16124 – Object.factory fails for static libs

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-06-05T08:46:01Z
Last change time
2024-12-13T18:48:19Z
Assigned to
No Owner
Creator
Andre
Moved to GitHub: dmd#19139 →

Comments

Comment #0 by andre — 2016-06-05T08:46:01Z
In this example all 3 assertions fails. Class Base and Child are imported via static libraries. The issue occus on linux and windows with recent dmd compiler. file main.d ------------------------------------------------------------------- import base, child; void main() { import std.traits: fullyQualifiedName; assert( Object.factory(fullyQualifiedName!Child) !is null); assert( createObject(fullyQualifiedName!Base) !is null); assert( createObject(fullyQualifiedName!Child) !is null); } file base.d ------------------------------------------------------------------- module base; class Base { } Object createObject(string name) { return Object.factory(name); } file child.d -------------------------------------------------------------------- module child; import base; class Child: Base { } The application is compiled via dmd base -lib dmd child -lib base.lib dmd main base.lib child.lib main PAUSE
Comment #1 by robert.schadek — 2024-12-13T18:48:19Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19139 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB