blob: a37aa042e1f28bef1da0ff0482e93fd472180671 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* REQUIRED_ARGS: -preview=dip1000 -Ifail_compilation/imports
TEST_OUTPUT:
---
fail_compilation/issue21936.d(15): Error: struct `issue21936s.S` variable `field` is not accessible from `@safe` code
fail_compilation/issue21936.d(15): Error: struct `issue21936s.S` variable `field` is not accessible from `@safe` code
fail_compilation/issue21936.d(11): Error: template instance `issue21936.constructImplicit!(S)` error instantiating
fail_compilation/issue21936.d(7): instantiated from here: `registerConstructors!(S)`
fail_compilation/issue21936.d(21): instantiated from here: `registerType!(S)`
---
*/
#line 2
module issue21936;
import issue21936s;
struct Handlers {
void registerType(T)()
{
registerConstructors!T;
}
void registerConstructors(T)()
{
constructImplicit!T;
}
}
auto constructImplicit(T)(typeof(T.init.tupleof) x = T.init.tupleof)
{
}
void registerHandlersDateTime(Handlers handlers)
{
handlers.registerType!(S);
}
|