blob: 75821f69eab64f05bad6d2215250fddcd646fe57 [file] [log] [blame]
Iain Buclaw5fee5ec32019-06-18 20:42:10 +02001// https://issues.dlang.org/show_bug.cgi?id=21849
2// REQUIRED_ARGS: -verrors=context -vcolumns
3/* TEST_OUTPUT:
4---
5fail_compilation/fail21849.d(21,17): Error: cannot implicitly convert expression `1` of type `int` to `string`
6 string ß = 1;
7 ^
8fail_compilation/fail21849.d(25,42): Error: cannot implicitly convert expression `cast(ushort)65535u` of type `ushort` to `byte`
9 string s = "ß☺-oneline"; byte S = ushort.max;
10 ^
11fail_compilation/fail21849.d(30,10): Error: undefined identifier `undefined_identifier`
12ß-utf"; undefined_identifier;
13 ^
14fail_compilation/fail21849.d(35,15): Error: `s[0..9]` has no effect
15☺-smiley"; s[0 .. 9];
16 ^
17---
18*/
19void fail21849a()
20{
21 string ß = 1;
22}
23void fail21849b()
24{
25 string s = "ß☺-oneline"; byte S = ushort.max;
26}
27void fail21849c()
28{
29 string s = "
30ß-utf"; undefined_identifier;
31}
32void fail21849d()
33{
34 string s = "
35☺-smiley"; s[0 .. 9];
36}