blob: 6b758e5d78d71c0d4e5c0a3e4caeec7970c7d8ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/*
TEST_OUTPUT:
---
fail_compilation/diag9961.d(11): Error: cannot implicitly convert expression `""` of type `string` to `int`
fail_compilation/diag9961.d(14): Error: template instance diag9961.foo!int error instantiating
fail_compilation/diag9961.d(11): Error: cannot implicitly convert expression `""` of type `string` to `int`
fail_compilation/diag9961.d(15): Error: template instance diag9961.foo!char error instantiating
---
*/
void foo(T)(T) { int x = ""; }
void main()
{
100.foo();
'a'.foo;
}
|