[Issue 17968] [REG 2.073] object initializer omitted when it should be included.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 6 04:19:40 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17968
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|object initializer for auto |[REG 2.073] object
|function not included when |initializer omitted when it
|seen through 2 libraries |should be included.
Severity|normal |regression
--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> ---
Used dustmite to reduce, then hand-reduced further. Does not require 2 libs,
but it does require the 2 calls into the lib (both openDev and bufd). openDev
must return auto. Files are as follows:
mod1.d:
module mod1;
struct File
{
}
class IOObject(IO) {
}
/// IFTI construction helper for `IOObject`
IOObject!IO ioObject(IO)()
{
return new IOObject!IO;
}
struct BufferedInputSource(Source)
{
Source dev;
}
BufferedInputSource!Source bufd(Source)(Source s)
{
return BufferedInputSource!Source();
}
auto openDev(int )
{
return ioObject!File();
}
app.d:
import mod1;
void main()
{
openDev(0).bufd;
}
execute these commands:
dmd -lib -ofthelib.a mod1.d
dmd app.d thelib.a
This fails as of 2.073.0. Version 2.072.2 compiles and links.
--
More information about the Digitalmars-d-bugs
mailing list