mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
48 lines
758 B
D
48 lines
758 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/ice10016.d(33): Error: undefined identifier `unknownIdentifier`
|
|
fail_compilation/ice10016.d(47): Error: template instance `ice10016.RefCounted!(S)` error instantiating
|
|
---
|
|
*/
|
|
|
|
struct RefCounted(T)
|
|
{
|
|
struct RefCountedStore
|
|
{
|
|
struct Impl
|
|
{
|
|
T _payload;
|
|
}
|
|
Impl* _store;
|
|
}
|
|
RefCountedStore _refCounted;
|
|
|
|
void opAssign(typeof(this)) { }
|
|
void opAssign(T) { }
|
|
|
|
@property refCountedPayload()
|
|
{
|
|
return _refCounted._store._payload;
|
|
}
|
|
alias refCountedPayload this;
|
|
}
|
|
|
|
struct S
|
|
{
|
|
int i = unknownIdentifier;
|
|
}
|
|
|
|
class C {}
|
|
|
|
class N
|
|
{
|
|
this(C) {}
|
|
C c() { return null; }
|
|
}
|
|
|
|
class D : N
|
|
{
|
|
this() { super(c); }
|
|
RefCounted!S _s;
|
|
}
|