mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-28 00:16:10 +08:00
d: Synchronize testsuite with upstream dmd
Adds TEST_OUTPUT directives and reduces the verbosity of many tests. Reviewed-on: https://github.com/dlang/dmd/pull/12112 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd cb1106ad5.
This commit is contained in:
parent
7a103daef7
commit
7da827c99c
@ -1,4 +1,4 @@
|
||||
9bba772fa67c6864e551bc87097402f691d947d4
|
||||
cb1106ad5bea4293cd302b0ba1f3ce08905d40fe
|
||||
|
||||
The first line of this file holds the git revision number of the last
|
||||
merge done from the dlang/dmd repository.
|
||||
|
@ -2,7 +2,7 @@
|
||||
// http://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html
|
||||
// http://www.99-bottles-of-beer.net/language-d-1212.html
|
||||
|
||||
// Displays the "99 bottles of beer" song at compile time,
|
||||
// Generates the "99 bottles of beer" song at compile time,
|
||||
// using the template metaprograming facilities of D.
|
||||
// No executable is generated. No libraries are used.
|
||||
// Illustrates template default values, template string value parameters,
|
||||
@ -49,4 +49,505 @@ template beer(int maxbeers, int n = maxbeers)
|
||||
~ showHowMany!( maxbeers, " on the wall.");
|
||||
}
|
||||
|
||||
pragma(msg, beer!(99));
|
||||
enum expected = `99 bottles of beer on the wall,
|
||||
99 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
98 bottles of beer on the wall.
|
||||
|
||||
98 bottles of beer on the wall,
|
||||
98 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
97 bottles of beer on the wall.
|
||||
|
||||
97 bottles of beer on the wall,
|
||||
97 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
96 bottles of beer on the wall.
|
||||
|
||||
96 bottles of beer on the wall,
|
||||
96 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
95 bottles of beer on the wall.
|
||||
|
||||
95 bottles of beer on the wall,
|
||||
95 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
94 bottles of beer on the wall.
|
||||
|
||||
94 bottles of beer on the wall,
|
||||
94 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
93 bottles of beer on the wall.
|
||||
|
||||
93 bottles of beer on the wall,
|
||||
93 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
92 bottles of beer on the wall.
|
||||
|
||||
92 bottles of beer on the wall,
|
||||
92 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
91 bottles of beer on the wall.
|
||||
|
||||
91 bottles of beer on the wall,
|
||||
91 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
90 bottles of beer on the wall.
|
||||
|
||||
90 bottles of beer on the wall,
|
||||
90 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
89 bottles of beer on the wall.
|
||||
|
||||
89 bottles of beer on the wall,
|
||||
89 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
88 bottles of beer on the wall.
|
||||
|
||||
88 bottles of beer on the wall,
|
||||
88 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
87 bottles of beer on the wall.
|
||||
|
||||
87 bottles of beer on the wall,
|
||||
87 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
86 bottles of beer on the wall.
|
||||
|
||||
86 bottles of beer on the wall,
|
||||
86 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
85 bottles of beer on the wall.
|
||||
|
||||
85 bottles of beer on the wall,
|
||||
85 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
84 bottles of beer on the wall.
|
||||
|
||||
84 bottles of beer on the wall,
|
||||
84 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
83 bottles of beer on the wall.
|
||||
|
||||
83 bottles of beer on the wall,
|
||||
83 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
82 bottles of beer on the wall.
|
||||
|
||||
82 bottles of beer on the wall,
|
||||
82 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
81 bottles of beer on the wall.
|
||||
|
||||
81 bottles of beer on the wall,
|
||||
81 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
80 bottles of beer on the wall.
|
||||
|
||||
80 bottles of beer on the wall,
|
||||
80 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
79 bottles of beer on the wall.
|
||||
|
||||
79 bottles of beer on the wall,
|
||||
79 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
78 bottles of beer on the wall.
|
||||
|
||||
78 bottles of beer on the wall,
|
||||
78 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
77 bottles of beer on the wall.
|
||||
|
||||
77 bottles of beer on the wall,
|
||||
77 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
76 bottles of beer on the wall.
|
||||
|
||||
76 bottles of beer on the wall,
|
||||
76 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
75 bottles of beer on the wall.
|
||||
|
||||
75 bottles of beer on the wall,
|
||||
75 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
74 bottles of beer on the wall.
|
||||
|
||||
74 bottles of beer on the wall,
|
||||
74 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
73 bottles of beer on the wall.
|
||||
|
||||
73 bottles of beer on the wall,
|
||||
73 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
72 bottles of beer on the wall.
|
||||
|
||||
72 bottles of beer on the wall,
|
||||
72 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
71 bottles of beer on the wall.
|
||||
|
||||
71 bottles of beer on the wall,
|
||||
71 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
70 bottles of beer on the wall.
|
||||
|
||||
70 bottles of beer on the wall,
|
||||
70 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
69 bottles of beer on the wall.
|
||||
|
||||
69 bottles of beer on the wall,
|
||||
69 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
68 bottles of beer on the wall.
|
||||
|
||||
68 bottles of beer on the wall,
|
||||
68 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
67 bottles of beer on the wall.
|
||||
|
||||
67 bottles of beer on the wall,
|
||||
67 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
66 bottles of beer on the wall.
|
||||
|
||||
66 bottles of beer on the wall,
|
||||
66 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
65 bottles of beer on the wall.
|
||||
|
||||
65 bottles of beer on the wall,
|
||||
65 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
64 bottles of beer on the wall.
|
||||
|
||||
64 bottles of beer on the wall,
|
||||
64 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
63 bottles of beer on the wall.
|
||||
|
||||
63 bottles of beer on the wall,
|
||||
63 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
62 bottles of beer on the wall.
|
||||
|
||||
62 bottles of beer on the wall,
|
||||
62 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
61 bottles of beer on the wall.
|
||||
|
||||
61 bottles of beer on the wall,
|
||||
61 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
60 bottles of beer on the wall.
|
||||
|
||||
60 bottles of beer on the wall,
|
||||
60 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
59 bottles of beer on the wall.
|
||||
|
||||
59 bottles of beer on the wall,
|
||||
59 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
58 bottles of beer on the wall.
|
||||
|
||||
58 bottles of beer on the wall,
|
||||
58 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
57 bottles of beer on the wall.
|
||||
|
||||
57 bottles of beer on the wall,
|
||||
57 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
56 bottles of beer on the wall.
|
||||
|
||||
56 bottles of beer on the wall,
|
||||
56 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
55 bottles of beer on the wall.
|
||||
|
||||
55 bottles of beer on the wall,
|
||||
55 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
54 bottles of beer on the wall.
|
||||
|
||||
54 bottles of beer on the wall,
|
||||
54 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
53 bottles of beer on the wall.
|
||||
|
||||
53 bottles of beer on the wall,
|
||||
53 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
52 bottles of beer on the wall.
|
||||
|
||||
52 bottles of beer on the wall,
|
||||
52 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
51 bottles of beer on the wall.
|
||||
|
||||
51 bottles of beer on the wall,
|
||||
51 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
50 bottles of beer on the wall.
|
||||
|
||||
50 bottles of beer on the wall,
|
||||
50 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
49 bottles of beer on the wall.
|
||||
|
||||
49 bottles of beer on the wall,
|
||||
49 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
48 bottles of beer on the wall.
|
||||
|
||||
48 bottles of beer on the wall,
|
||||
48 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
47 bottles of beer on the wall.
|
||||
|
||||
47 bottles of beer on the wall,
|
||||
47 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
46 bottles of beer on the wall.
|
||||
|
||||
46 bottles of beer on the wall,
|
||||
46 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
45 bottles of beer on the wall.
|
||||
|
||||
45 bottles of beer on the wall,
|
||||
45 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
44 bottles of beer on the wall.
|
||||
|
||||
44 bottles of beer on the wall,
|
||||
44 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
43 bottles of beer on the wall.
|
||||
|
||||
43 bottles of beer on the wall,
|
||||
43 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
42 bottles of beer on the wall.
|
||||
|
||||
42 bottles of beer on the wall,
|
||||
42 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
41 bottles of beer on the wall.
|
||||
|
||||
41 bottles of beer on the wall,
|
||||
41 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
40 bottles of beer on the wall.
|
||||
|
||||
40 bottles of beer on the wall,
|
||||
40 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
39 bottles of beer on the wall.
|
||||
|
||||
39 bottles of beer on the wall,
|
||||
39 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
38 bottles of beer on the wall.
|
||||
|
||||
38 bottles of beer on the wall,
|
||||
38 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
37 bottles of beer on the wall.
|
||||
|
||||
37 bottles of beer on the wall,
|
||||
37 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
36 bottles of beer on the wall.
|
||||
|
||||
36 bottles of beer on the wall,
|
||||
36 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
35 bottles of beer on the wall.
|
||||
|
||||
35 bottles of beer on the wall,
|
||||
35 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
34 bottles of beer on the wall.
|
||||
|
||||
34 bottles of beer on the wall,
|
||||
34 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
33 bottles of beer on the wall.
|
||||
|
||||
33 bottles of beer on the wall,
|
||||
33 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
32 bottles of beer on the wall.
|
||||
|
||||
32 bottles of beer on the wall,
|
||||
32 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
31 bottles of beer on the wall.
|
||||
|
||||
31 bottles of beer on the wall,
|
||||
31 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
30 bottles of beer on the wall.
|
||||
|
||||
30 bottles of beer on the wall,
|
||||
30 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
29 bottles of beer on the wall.
|
||||
|
||||
29 bottles of beer on the wall,
|
||||
29 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
28 bottles of beer on the wall.
|
||||
|
||||
28 bottles of beer on the wall,
|
||||
28 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
27 bottles of beer on the wall.
|
||||
|
||||
27 bottles of beer on the wall,
|
||||
27 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
26 bottles of beer on the wall.
|
||||
|
||||
26 bottles of beer on the wall,
|
||||
26 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
25 bottles of beer on the wall.
|
||||
|
||||
25 bottles of beer on the wall,
|
||||
25 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
24 bottles of beer on the wall.
|
||||
|
||||
24 bottles of beer on the wall,
|
||||
24 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
23 bottles of beer on the wall.
|
||||
|
||||
23 bottles of beer on the wall,
|
||||
23 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
22 bottles of beer on the wall.
|
||||
|
||||
22 bottles of beer on the wall,
|
||||
22 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
21 bottles of beer on the wall.
|
||||
|
||||
21 bottles of beer on the wall,
|
||||
21 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
20 bottles of beer on the wall.
|
||||
|
||||
20 bottles of beer on the wall,
|
||||
20 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
19 bottles of beer on the wall.
|
||||
|
||||
19 bottles of beer on the wall,
|
||||
19 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
18 bottles of beer on the wall.
|
||||
|
||||
18 bottles of beer on the wall,
|
||||
18 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
17 bottles of beer on the wall.
|
||||
|
||||
17 bottles of beer on the wall,
|
||||
17 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
16 bottles of beer on the wall.
|
||||
|
||||
16 bottles of beer on the wall,
|
||||
16 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
15 bottles of beer on the wall.
|
||||
|
||||
15 bottles of beer on the wall,
|
||||
15 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
14 bottles of beer on the wall.
|
||||
|
||||
14 bottles of beer on the wall,
|
||||
14 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
13 bottles of beer on the wall.
|
||||
|
||||
13 bottles of beer on the wall,
|
||||
13 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
12 bottles of beer on the wall.
|
||||
|
||||
12 bottles of beer on the wall,
|
||||
12 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
11 bottles of beer on the wall.
|
||||
|
||||
11 bottles of beer on the wall,
|
||||
11 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
10 bottles of beer on the wall.
|
||||
|
||||
10 bottles of beer on the wall,
|
||||
10 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
9 bottles of beer on the wall.
|
||||
|
||||
9 bottles of beer on the wall,
|
||||
9 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
8 bottles of beer on the wall.
|
||||
|
||||
8 bottles of beer on the wall,
|
||||
8 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
7 bottles of beer on the wall.
|
||||
|
||||
7 bottles of beer on the wall,
|
||||
7 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
6 bottles of beer on the wall.
|
||||
|
||||
6 bottles of beer on the wall,
|
||||
6 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
5 bottles of beer on the wall.
|
||||
|
||||
5 bottles of beer on the wall,
|
||||
5 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
4 bottles of beer on the wall.
|
||||
|
||||
4 bottles of beer on the wall,
|
||||
4 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
3 bottles of beer on the wall.
|
||||
|
||||
3 bottles of beer on the wall,
|
||||
3 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
2 bottles of beer on the wall.
|
||||
|
||||
2 bottles of beer on the wall,
|
||||
2 bottles of beer.
|
||||
Take one down and pass it around,
|
||||
1 bottle of beer on the wall.
|
||||
|
||||
1 bottle of beer on the wall,
|
||||
1 bottle of beer.
|
||||
Take one down and pass it around,
|
||||
no more bottles of beer on the wall.
|
||||
|
||||
No more bottles of beer on the wall,
|
||||
no more bottles of beer.
|
||||
Go to the store and buy some more,
|
||||
99 bottles of beer on the wall.
|
||||
`;
|
||||
|
||||
static assert(beer!(99) == expected);
|
||||
|
@ -1,4 +1,10 @@
|
||||
// REQUIRED_ARGS: -c
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
&this
|
||||
---
|
||||
*/
|
||||
struct S0 {
|
||||
void foo() {
|
||||
pragma(msg, &this);
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
compilable/b17111.d(16): Deprecation: `case` variables have to be `const` or `immutable`
|
||||
compilable/b17111.d(17): Deprecation: `case` variables have to be `const` or `immutable`
|
||||
---
|
||||
*/
|
||||
alias TestType = ubyte;
|
||||
|
||||
void test()
|
||||
|
@ -15,9 +15,9 @@ static assert(C1748!int.stringof == "C1748!int");
|
||||
**************************************************/
|
||||
|
||||
version(all)
|
||||
pragma(msg, "true");
|
||||
pragma(inline, true);
|
||||
else
|
||||
pragma(msg, "false");
|
||||
pragma(inline, false);
|
||||
|
||||
/**************************************************
|
||||
2438
|
||||
@ -78,7 +78,7 @@ template ice8982(T)
|
||||
void bug8982(ref const int v = 7){}
|
||||
|
||||
static if (is(typeof(bug8982) P == __parameters)) {
|
||||
pragma(msg, ((P[0..1] g) => g[0])());
|
||||
enum eval8982 = ((P[0..1] g) => g[0])();
|
||||
}
|
||||
}
|
||||
|
||||
@ -275,7 +275,7 @@ void main()
|
||||
try
|
||||
{
|
||||
}
|
||||
catch
|
||||
catch(.object.Throwable)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -298,7 +298,7 @@ void test11939()
|
||||
**************************************************/
|
||||
|
||||
template A(B) {
|
||||
pragma(msg, "missing ;")
|
||||
pragma(lib, "missing ;")
|
||||
enum X = 0;
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ struct A12799
|
||||
/***************************************************/
|
||||
// 13236
|
||||
|
||||
pragma(msg, is(typeof({ struct S { S x; } })));
|
||||
enum bug13286 = is(typeof({ struct S { S x; } }));
|
||||
|
||||
/***************************************************/
|
||||
// 13280
|
||||
@ -857,14 +857,15 @@ X14166[int] makeAA14166() { return aa14166; }
|
||||
struct Tup14166(T...) { T field; alias field this; }
|
||||
Tup14166!(int, int) tup14166;
|
||||
Tup14166!(int, int) makeTup14166() { return tup14166; }
|
||||
alias TT14166(T...) = T;
|
||||
|
||||
pragma(msg, typeof((s14166.x += 1) = 2)); // ok <- error
|
||||
pragma(msg, typeof(s14166.a.length += 2)); // ok <- error
|
||||
pragma(msg, typeof(s14166++)); // ok <- error
|
||||
pragma(msg, typeof(s14166.x ^^ 2)); // ok <- error
|
||||
pragma(msg, typeof(s14166.y ^^= 2.5)); // ok <- error
|
||||
pragma(msg, typeof(makeAA14166()[0] = 1)); // ok <- error
|
||||
pragma(msg, typeof(tup14166.field = makeTup14166())); // ok <- error
|
||||
static assert(is(typeof((s14166.x += 1) = 2) == int)); // ok <- error
|
||||
static assert(is(typeof(s14166.a.length += 2) == size_t)); // ok <- error
|
||||
static assert(is(typeof(s14166++) == S14166)); // ok <- error
|
||||
static assert(is(typeof(s14166.x ^^ 2) == int)); // ok <- error
|
||||
static assert(is(typeof(s14166.y ^^= 2.5) == double)); // ok <- error
|
||||
static assert(is(typeof(makeAA14166()[0] = 1) == X14166)); // ok <- error
|
||||
static assert(is(typeof(tup14166.field = makeTup14166()) == TT14166!(int, int))); // ok <- error
|
||||
|
||||
/***************************************************/
|
||||
// 14388
|
||||
|
@ -1,7 +1,7 @@
|
||||
// EXTRA_SOURCES: extra-files/ddoc3.ddoc
|
||||
// PERMUTE_ARGS:
|
||||
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
|
||||
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 3
|
||||
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
|
||||
|
||||
/**
|
||||
* Summary
|
||||
|
@ -1,9 +0,0 @@
|
||||
module imports.test15117a;
|
||||
|
||||
struct AssertResult {}
|
||||
|
||||
auto test_usr_1()
|
||||
{
|
||||
// 2. generate TyepInfoStructDeclaration
|
||||
auto x = typeid(AssertResult);
|
||||
}
|
@ -1,4 +1,11 @@
|
||||
// PERMUTE_ARGS: -inline
|
||||
// PERMUTE_ARGS: -inline
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
compilable/interpret3.d(2914): Deprecation: `case` variables have to be `const` or `immutable`
|
||||
compilable/interpret3.d(6351): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference
|
||||
---
|
||||
*/
|
||||
|
||||
template compiles(int T)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ import imports.test11563std_traits;
|
||||
interface J : I {} // comment out to let compilation succeed
|
||||
|
||||
struct A { }
|
||||
pragma(msg, moduleName!A);
|
||||
static assert(moduleName!A == "b");
|
||||
|
||||
|
||||
interface I {}
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
@system:
|
||||
alias Fun = void function() @safe;
|
||||
pragma (msg, Fun.stringof);
|
||||
static assert(Fun.stringof == "void function() @safe");
|
||||
alias Del = void delegate() @safe;
|
||||
pragma (msg, Del.stringof);
|
||||
static assert(Del.stringof == "void delegate() @safe");
|
||||
|
||||
|
@ -42,15 +42,15 @@ alias mat4x4 mat4;
|
||||
string definePostfixAliases(string type)
|
||||
{
|
||||
return "alias " ~ type ~ "!byte " ~ type ~ "b;\n"
|
||||
"alias " ~ type ~ "!ubyte " ~ type ~ "ub;\n"
|
||||
"alias " ~ type ~ "!short " ~ type ~ "s;\n"
|
||||
"alias " ~ type ~ "!ushort " ~ type ~ "us;\n"
|
||||
"alias " ~ type ~ "!int " ~ type ~ "i;\n"
|
||||
"alias " ~ type ~ "!uint " ~ type ~ "ui;\n"
|
||||
"alias " ~ type ~ "!long " ~ type ~ "l;\n"
|
||||
"alias " ~ type ~ "!ulong " ~ type ~ "ul;\n"
|
||||
"alias " ~ type ~ "!float " ~ type ~ "f;\n"
|
||||
"alias " ~ type ~ "!double " ~ type ~ "d;\n";
|
||||
~ "alias " ~ type ~ "!ubyte " ~ type ~ "ub;\n"
|
||||
~ "alias " ~ type ~ "!short " ~ type ~ "s;\n"
|
||||
~ "alias " ~ type ~ "!ushort " ~ type ~ "us;\n"
|
||||
~ "alias " ~ type ~ "!int " ~ type ~ "i;\n"
|
||||
~ "alias " ~ type ~ "!uint " ~ type ~ "ui;\n"
|
||||
~ "alias " ~ type ~ "!long " ~ type ~ "l;\n"
|
||||
~ "alias " ~ type ~ "!ulong " ~ type ~ "ul;\n"
|
||||
~ "alias " ~ type ~ "!float " ~ type ~ "f;\n"
|
||||
~ "alias " ~ type ~ "!double " ~ type ~ "d;\n";
|
||||
}
|
||||
|
||||
// define a lot of type names
|
||||
|
@ -1,23 +0,0 @@
|
||||
// REQUIRED_ARGS: -o-
|
||||
// PERMUTE_ARGS:
|
||||
// EXTRA_SOURCES: imports/test15117a.d
|
||||
|
||||
import users = imports.test15117a;
|
||||
|
||||
void RunApiTest(T...)()
|
||||
{
|
||||
foreach (name; __traits(allMembers, users))
|
||||
{
|
||||
// 3. list the name of TyepInfoStructDeclaration,
|
||||
// but it's just internal symbol and invisible.
|
||||
mixin("alias func = users . " ~ name ~ ";");
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// 1. run semantic3 of users.test_usr_1
|
||||
users.test_usr_1();
|
||||
|
||||
RunApiTest!();
|
||||
}
|
@ -5,19 +5,19 @@ private struct _NestedSym_
|
||||
{
|
||||
static if ((void*).sizeof == 8)
|
||||
{
|
||||
pragma(msg, "64");
|
||||
int pointersize = 64;
|
||||
}
|
||||
else
|
||||
{
|
||||
pragma(msg, "32");
|
||||
int pointersize = 32;
|
||||
}
|
||||
|
||||
version (X86_64)
|
||||
{
|
||||
pragma(msg, "X86_64");
|
||||
string arch = "X86_64";
|
||||
}
|
||||
else
|
||||
{
|
||||
pragma(msg, "Not 64");
|
||||
string arch = "Not 64";
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ extern(C++) struct CPP
|
||||
|
||||
void test()
|
||||
{
|
||||
pragma(msg, templ!(D.memvar));
|
||||
pragma(msg, templ!(CPP.memvar));
|
||||
// root cause, C++ member variables have no mangling
|
||||
pragma(msg, CPP.memvar.mangleof);
|
||||
static assert(templ!(D.memvar) == 1234);
|
||||
static assert(templ!(CPP.memvar) == 1234);
|
||||
// ICE: root cause, C++ member variables have no mangling
|
||||
enum CPPmemvar = CPP.memvar.mangleof;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import std.typecons : tuple;
|
||||
enum foo = tuple(1, 2).expand;
|
||||
pragma(msg, typeof(foo).stringof);
|
||||
pragma(msg, foo.stringof);
|
||||
static assert(typeof(foo).stringof == "(int, int)");
|
||||
static assert(foo.stringof == "tuple(1, 2)");
|
||||
|
@ -34,7 +34,6 @@ void test7()
|
||||
static import pkgDIP37.datetime;
|
||||
static assert(!__traits(compiles, def()));
|
||||
pkgDIP37.datetime.def();
|
||||
pkgDIP37.datetime.common.def();
|
||||
}
|
||||
|
||||
// https://issues.dlang.org/show_bug.cgi?id=17629
|
||||
|
@ -653,7 +653,7 @@ void foo10296()()
|
||||
|
||||
void bar()() { a[1] = 2; }
|
||||
bar();
|
||||
pragma(msg, typeof(bar!())); // nothrow @safe void()
|
||||
static assert(typeof(bar!()).stringof == "pure nothrow @nogc @safe void()"); // nothrow @safe void()
|
||||
}
|
||||
pure void test10296()
|
||||
{
|
||||
@ -811,7 +811,7 @@ void test13840() nothrow
|
||||
func13840(); // throwable function call
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch(Throwable)
|
||||
{}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,12 @@
|
||||
// EXTRA_SOURCES: extra-files/header1.d
|
||||
// REQUIRED_ARGS: -o- -unittest -H -Hf${RESULTS_DIR}/compilable/header1.di
|
||||
// PERMUTE_ARGS: -d -dw
|
||||
// POST_SCRIPT: compilable/extra-files/header-postscript.sh header1
|
||||
// POST_SCRIPT: compilable/extra-files/header-postscript.sh
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
Hello World
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {}
|
||||
|
@ -1,6 +1,12 @@
|
||||
// EXTRA_SOURCES: extra-files/header1.d
|
||||
// REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/header1i.di -inline
|
||||
// PERMUTE_ARGS: -d -dw
|
||||
// POST_SCRIPT: compilable/extra-files/header-postscript.sh header1i
|
||||
// POST_SCRIPT: compilable/extra-files/header-postscript.sh
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
Hello World
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {}
|
||||
|
@ -4,7 +4,7 @@
|
||||
/***************************************************/
|
||||
// 6719
|
||||
|
||||
pragma(msg, __traits(compiles, mixin("(const(A))[0..0]")));
|
||||
static assert(__traits(compiles, mixin("(const(A))[0..0]")) == false);
|
||||
|
||||
/***************************************************/
|
||||
// 9232
|
||||
|
@ -1,4 +1,9 @@
|
||||
// REQUIRED_ARGS:
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/bug5.d(8): Error: function `bug5.test1` no `return exp;` or `assert(0);` at end of function
|
||||
---
|
||||
*/
|
||||
|
||||
int test1()
|
||||
{
|
||||
|
@ -1,4 +1,9 @@
|
||||
// REQUIRED_ARGS:
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/bug5b.d(8): Error: function `bug5b.test1` has no `return` statement, but is expected to return a value of type `int`
|
||||
---
|
||||
*/
|
||||
|
||||
int test1()
|
||||
{
|
||||
|
@ -1,4 +1,11 @@
|
||||
// Bugzilla 8150: nothrow check doesn't work for constructor
|
||||
// https://issues.dlang.org/show_bug.cgi?id=8150: nothrow check doesn't work for constructor
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/bug8150a.d(14): Error: `object.Exception` is thrown but not caught
|
||||
fail_compilation/bug8150a.d(12): Error: `nothrow` constructor `bug8150a.Foo.this` may throw
|
||||
---
|
||||
*/
|
||||
|
||||
struct Foo
|
||||
{
|
||||
|
@ -1,4 +1,12 @@
|
||||
// Bugzilla 8150: nothrow check doesn't work for constructor
|
||||
// https://issues.dlang.org/show_bug.cgi?id=8150: nothrow check doesn't work for constructor
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/bug8150b.d(15): Error: `object.Exception` is thrown but not caught
|
||||
fail_compilation/bug8150b.d(13): Error: `nothrow` constructor `bug8150b.Foo.__ctor!().this` may throw
|
||||
fail_compilation/bug8150b.d(20): Error: template instance `bug8150b.Foo.__ctor!()` error instantiating
|
||||
---
|
||||
*/
|
||||
|
||||
struct Foo
|
||||
{
|
||||
|
@ -1 +1,11 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/diag10327.d(11): Error: module `test10327` is in file 'imports/test10327.d' which cannot be read
|
||||
import path[0] = fail_compilation
|
||||
import path[1] = $p:druntime/import$
|
||||
import path[2] = $p:phobos$
|
||||
---
|
||||
*/
|
||||
|
||||
import imports.test10327; // package.d missing
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/diag15713.d(18): Error: no property 'widthSign' for type 'Data'
|
||||
fail_compilation/diag15713.d(38): Error: template instance test.conwritefImpl!("parse-int", "width", "\x0a", Data()) error instantiating
|
||||
|
@ -1,6 +1,14 @@
|
||||
// Issue 76 - Using a non-template struct as a template
|
||||
// Compiling leads to "Assertion failure: 's->parent' on line 1694 in file
|
||||
// 'template.c'"
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail104.d(26): Error: template instance `P!()` `P` is not a template declaration, it is a alias
|
||||
fail_compilation/fail104.d(26): Error: mixin `fail104.C!(S).C.T!()` is not defined
|
||||
fail_compilation/fail104.d(31): Error: template instance `fail104.C!(S)` error instantiating
|
||||
---
|
||||
*/
|
||||
|
||||
struct S
|
||||
{
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail10905.d(20): Error: incompatible types for `(this.x) == (cast(const(__vector(long[2])))cast(__vector(long[2]))1L)`: both operands are of type `const(__vector(long[2]))`
|
||||
---
|
||||
*/
|
||||
|
||||
struct Foo
|
||||
{
|
||||
|
@ -1,4 +1,11 @@
|
||||
// Issue 402 - compiler crash with mixin and forward reference
|
||||
// https://issues.dlang.org/show_bug.cgi?id=402
|
||||
// compiler crash with mixin and forward reference
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail115.d(17): Error: mixin `Foo!y` cannot resolve forward reference
|
||||
---
|
||||
*/
|
||||
|
||||
template Foo(alias b)
|
||||
{
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail11503a.d(24): Error: cannot implicitly convert expression `makes()` of type `immutable(S)*` to `S*`
|
||||
---
|
||||
*/
|
||||
struct S
|
||||
{
|
||||
immutable(S)* s;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail11503b.d(17): Error: cannot implicitly convert expression `makes()` of type `immutable(int[])` to `int[]`
|
||||
---
|
||||
*/
|
||||
immutable int[] x = [1, 2, 3];
|
||||
|
||||
auto makes() pure
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail11503c.d(19): Error: cannot implicitly convert expression `d.filename()` of type `const(char)[]` to `string`
|
||||
---
|
||||
*/
|
||||
struct Data
|
||||
{
|
||||
char[256] buffer;
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail11503d.d(26): Error: cannot implicitly convert expression `filename(d)` of type `const(char)[]` to `string`
|
||||
fail_compilation/fail11503d.d(27): Error: cannot implicitly convert expression `filename2(& d)` of type `const(char)[]` to `string`
|
||||
---
|
||||
*/
|
||||
struct Data2
|
||||
{
|
||||
char buffer;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail12.d(17): Error: function `fail12.main.Foo!(y).abc` at fail_compilation/fail12.d(9) conflicts with function `fail12.main.Foo!(y).abc` at fail_compilation/fail12.d(9)
|
||||
---
|
||||
*/
|
||||
template Foo(alias b)
|
||||
{
|
||||
int abc() { return b; }
|
||||
|
@ -1,5 +1,12 @@
|
||||
// PERMUTE_ARGS: -d -dw
|
||||
// segfault on DMD0.150, never failed if use typeid() instead.
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail121.d(23): Error: no property `typeinfo` for type `fail121.myobject`
|
||||
fail_compilation/fail121.d(23): Error: no property `typeinfo` for type `int`
|
||||
---
|
||||
*/
|
||||
|
||||
struct myobject
|
||||
{
|
||||
|
@ -1,12 +0,0 @@
|
||||
void dorecursive()
|
||||
{
|
||||
recursive!"ratherLongSymbolNameToHitTheMaximumSymbolLengthEarlierThanTheTemplateRecursionLimit_";
|
||||
}
|
||||
|
||||
void recursive(string name)()
|
||||
{
|
||||
struct S {} // define type to kick off mangler
|
||||
static if (name.length <= (4 << 20))
|
||||
recursive!(name ~ name);
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
// 751 Compiler segfault on template expansion
|
||||
|
||||
template TypeTuple( TList... )
|
||||
{
|
||||
alias TList TypeTuple;
|
||||
}
|
||||
|
||||
template IndexOf( T, TList... )
|
||||
{
|
||||
static if( TList.length == 0 )
|
||||
const size_t IndexOf = 1;
|
||||
else static if( is( T == typeof( TList[0] ) ) )
|
||||
const size_t IndexOf = 0;
|
||||
else
|
||||
const size_t IndexOf = 1 + IndexOf!( T, (TList[1 .. $]) );
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
TypeTuple!(int, long) T;
|
||||
printf( "%u\n", IndexOf!(long, T) );
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail14.d(10): Error: template instance `fail14.A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!int))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))` recursive expansion exceeded allowed nesting limit
|
||||
---
|
||||
*/
|
||||
|
||||
class A(T)
|
||||
{
|
||||
|
@ -1,5 +1,44 @@
|
||||
// REQUIRED_ARGS: -o-
|
||||
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail14486.d(56): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(56): Error: `delete c0` is not `@safe` but is used in `@safe` function `test1a`
|
||||
fail_compilation/fail14486.d(57): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(57): Error: `pure` function `fail14486.test1a` cannot call impure destructor `fail14486.C1a.~this`
|
||||
fail_compilation/fail14486.d(57): Error: `@safe` function `fail14486.test1a` cannot call `@system` destructor `fail14486.C1a.~this`
|
||||
fail_compilation/fail14486.d(43): `fail14486.C1a.~this` is declared here
|
||||
fail_compilation/fail14486.d(57): Error: `@nogc` function `fail14486.test1a` cannot call non-@nogc destructor `fail14486.C1a.~this`
|
||||
fail_compilation/fail14486.d(62): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(63): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(63): Error: destructor `fail14486.C1b.~this` is not `nothrow`
|
||||
fail_compilation/fail14486.d(60): Error: `nothrow` function `fail14486.test1b` may throw
|
||||
fail_compilation/fail14486.d(68): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(68): Error: `delete s0` is not `@safe` but is used in `@safe` function `test2a`
|
||||
fail_compilation/fail14486.d(69): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(69): Error: `pure` function `fail14486.test2a` cannot call impure destructor `fail14486.S1a.~this`
|
||||
fail_compilation/fail14486.d(69): Error: `@safe` function `fail14486.test2a` cannot call `@system` destructor `fail14486.S1a.~this`
|
||||
fail_compilation/fail14486.d(49): `fail14486.S1a.~this` is declared here
|
||||
fail_compilation/fail14486.d(69): Error: `@nogc` function `fail14486.test2a` cannot call non-@nogc destructor `fail14486.S1a.~this`
|
||||
fail_compilation/fail14486.d(74): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(75): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(75): Error: destructor `fail14486.S1b.~this` is not `nothrow`
|
||||
fail_compilation/fail14486.d(72): Error: `nothrow` function `fail14486.test2b` may throw
|
||||
fail_compilation/fail14486.d(80): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(80): Error: `delete a0` is not `@safe` but is used in `@safe` function `test3a`
|
||||
fail_compilation/fail14486.d(81): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(81): Error: `pure` function `fail14486.test3a` cannot call impure destructor `fail14486.S1a.~this`
|
||||
fail_compilation/fail14486.d(81): Error: `@safe` function `fail14486.test3a` cannot call `@system` destructor `fail14486.S1a.~this`
|
||||
fail_compilation/fail14486.d(49): `fail14486.S1a.~this` is declared here
|
||||
fail_compilation/fail14486.d(81): Error: `@nogc` function `fail14486.test3a` cannot call non-@nogc destructor `fail14486.S1a.~this`
|
||||
fail_compilation/fail14486.d(86): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(87): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
|
||||
fail_compilation/fail14486.d(87): Error: destructor `fail14486.S1b.~this` is not `nothrow`
|
||||
fail_compilation/fail14486.d(84): Error: `nothrow` function `fail14486.test3b` may throw
|
||||
---
|
||||
*/
|
||||
|
||||
class C0a { }
|
||||
class C1a { ~this() {} }
|
||||
class C2a { ~this() {} @nogc pure @safe delete(void* p) {} }
|
||||
|
@ -1,4 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail15.d(24): Error: cannot use `[]` operator on expression of type `void`
|
||||
---
|
||||
*/
|
||||
/*
|
||||
Segfault on DMD 0.095
|
||||
http://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
REQUIRED_ARGS: -v
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail15616b.d(43): Error: none of the overloads of 'foo' are callable using argument types (double), candidates are:
|
||||
fail_compilation/fail15616b.d(16): fail15616b.foo(int a)
|
||||
|
@ -1,4 +1,11 @@
|
||||
// ICE(template.c) in DMD0.080
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail16.d(19): Error: function declaration without return type. (Note that constructors are always named `this`)
|
||||
fail_compilation/fail16.d(19): Error: no identifier for declarator `bar!(typeof(X))(X)`
|
||||
---
|
||||
*/
|
||||
|
||||
int i;
|
||||
|
||||
|
@ -1,3 +1,11 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail17.d(11): Error: undefined identifier `B`
|
||||
fail_compilation/fail17.d(11): Error: mixin `fail17.A!int.A.B!(T, A!T)` is not defined
|
||||
fail_compilation/fail17.d(14): Error: template instance `fail17.A!int` error instantiating
|
||||
---
|
||||
*/
|
||||
struct A(T)
|
||||
{
|
||||
mixin B!(T, A!(T));
|
||||
|
@ -1,3 +1,25 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail196.d(26): Error: delimited string must end in )"
|
||||
fail_compilation/fail196.d(26): Error: Implicit string concatenation is error-prone and disallowed in D
|
||||
fail_compilation/fail196.d(26): Use the explicit syntax instead (concatenating literals is `@nogc`): "foo(xxx)" ~ ";\x0a assert(s == "
|
||||
fail_compilation/fail196.d(27): Error: semicolon expected, not `foo`
|
||||
fail_compilation/fail196.d(27): Error: found `");\x0a\x0a s = q"` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(29): Error: found `";\x0a assert(s == "` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(30): Error: found `");\x0a\x0a s = q"` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(32): Error: found `{` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(32): Error: found `}` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(33): Error: found `foo` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(33): Error: found `}` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(35): Error: found `<` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(36): Error: found `foo` when expecting `;` following statement
|
||||
fail_compilation/fail196.d(36): Error: found `<` instead of statement
|
||||
fail_compilation/fail196.d(42): Error: unterminated string constant starting at fail_compilation/fail196.d(42)
|
||||
fail_compilation/fail196.d(44): Error: found `End of File` when expecting `}` following compound statement
|
||||
fail_compilation/fail196.d(44): Error: found `End of File` when expecting `}` following compound statement
|
||||
---
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
// PERMUTE_ARGS:
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail19890a.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array
|
||||
---
|
||||
|
@ -1,5 +1,6 @@
|
||||
// PERMUTE_ARGS:
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail19890b.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array
|
||||
---
|
||||
|
@ -1,4 +1,11 @@
|
||||
// REQUIRED_ARGS: -de
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail199.d(20): Deprecation: class `fail199.DepClass` is deprecated
|
||||
fail_compilation/fail199.d(20): Deprecation: class `fail199.DepClass` is deprecated
|
||||
---
|
||||
*/
|
||||
|
||||
//import std.stdio;
|
||||
|
||||
|
@ -1,4 +1,11 @@
|
||||
// REQUIRED_ARGS: -de
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail200.d(17): Deprecation: interface `fail200.DepClass` is deprecated
|
||||
fail_compilation/fail200.d(17): Deprecation: interface `fail200.DepClass` is deprecated
|
||||
---
|
||||
*/
|
||||
|
||||
//import std.stdio;
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail201.d(10): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail201.d(10): Error: shift by 33 is outside the range `0..31`
|
||||
---
|
||||
*/
|
||||
void main() {
|
||||
int c;
|
||||
c = c >>> 33;
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail202.d(10): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail202.d(10): Error: shift by 33 is outside the range `0..31`
|
||||
---
|
||||
*/
|
||||
void main() {
|
||||
int c;
|
||||
c = c >> 33;
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail203.d(10): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail203.d(10): Error: shift by 33 is outside the range `0..31`
|
||||
---
|
||||
*/
|
||||
void main() {
|
||||
int c;
|
||||
c = c << 33;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail204.d(9): Error: shift assign by 65 is outside the range `0..63`
|
||||
---
|
||||
*/
|
||||
void main() {
|
||||
long c;
|
||||
c >>= 65;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail205.d(9): Error: shift assign by 65 is outside the range `0..63`
|
||||
---
|
||||
*/
|
||||
void main() {
|
||||
long c;
|
||||
c <<= 65;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail206.d(9): Error: shift assign by 65 is outside the range `0..63`
|
||||
---
|
||||
*/
|
||||
void main() {
|
||||
long c;
|
||||
c >>>= 65;
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail217.d(22): Error: mutable method `fail217.Message.this` is not callable using a `immutable` object
|
||||
fail_compilation/fail217.d(13): Consider adding `const` or `inout` here
|
||||
---
|
||||
*/
|
||||
|
||||
class Message
|
||||
{
|
||||
|
@ -1,3 +1,13 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail220.d(12): Error: identifier expected for template value parameter
|
||||
fail_compilation/fail220.d(12): Error: found `==` when expecting `)`
|
||||
fail_compilation/fail220.d(12): Error: found `class` when expecting `)`
|
||||
fail_compilation/fail220.d(12): Error: declaration expected, not `)`
|
||||
fail_compilation/fail220.d(16): Error: unrecognized declaration
|
||||
---
|
||||
*/
|
||||
template types (T) {
|
||||
static if (is (T V : V[K], K == class)) {
|
||||
static assert (false, "assoc");
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail225.d(15): Error: cannot implicitly convert expression `1` of type `int` to `immutable(char*)`
|
||||
fail_compilation/fail225.d(15): Error: cannot implicitly convert expression `& ch` of type `char*` to `immutable(char*)`
|
||||
---
|
||||
*/
|
||||
struct Struct {
|
||||
char* chptr;
|
||||
}
|
||||
|
@ -1,3 +1,14 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail232.d(15): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail232.d(15): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail232.d(16): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail232.d(16): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail232.d(17): Error: shift by 33 is outside the range `0..31`
|
||||
fail_compilation/fail232.d(17): Error: shift by 33 is outside the range `0..31`
|
||||
---
|
||||
*/
|
||||
void bug1601() {
|
||||
int i;
|
||||
|
||||
|
@ -1,2 +1,8 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail239.d(8): Error: type `F` is not an expression
|
||||
---
|
||||
*/
|
||||
class F { int x; }
|
||||
alias typeof(F).x b;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail252.d(13): Error: cannot implicitly override base class method `fail252.Timer.Task.run` with `fail252.Timer.__anonclass1.run`; add `override` attribute
|
||||
---
|
||||
*/
|
||||
class Timer {
|
||||
abstract class Task {
|
||||
public abstract void run();
|
||||
|
@ -1 +1,8 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail257.d(8): Error: incompatible types for `("foo"d) == ("bar"c)`: `dstring` and `string`
|
||||
fail_compilation/fail257.d(8): while evaluating `pragma(msg, "foo"d == "bar"c ? "A" : "B")`
|
||||
---
|
||||
*/
|
||||
pragma(msg, "foo"d == "bar"c ? "A" : "B");
|
||||
|
@ -1,3 +1,13 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail258.d(11): Error: delimiter cannot be whitespace
|
||||
fail_compilation/fail258.d(11): Error: delimited string must end in
|
||||
"
|
||||
fail_compilation/fail258.d(11): Error: declaration expected, not `"X"`
|
||||
fail_compilation/fail258.d(14): Error: unterminated string constant starting at fail_compilation/fail258.d(14)
|
||||
---
|
||||
*/
|
||||
q"
|
||||
X
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail2740.d(17): Error: class `fail2740.Foo` ambiguous virtual function `foo`
|
||||
---
|
||||
*/
|
||||
interface IFoo
|
||||
{
|
||||
int foo();
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail276.d(19): Error: `this` has no effect
|
||||
fail_compilation/fail276.d(15): Error: `this` is only defined in non-static member functions, not `__anonclass2`
|
||||
---
|
||||
*/
|
||||
|
||||
class C
|
||||
{
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,12 @@
|
||||
// Issue 2920 - recursive templates blow compiler stack
|
||||
// https://issues.dlang.org/show_bug.cgi?id=2920
|
||||
// recursive templates blow compiler stack
|
||||
// template_17_A.
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail280.d(13): Error: template instance `fail280.t!500` recursive expansion exceeded allowed nesting limit
|
||||
---
|
||||
*/
|
||||
|
||||
template t(int i)
|
||||
{
|
||||
|
@ -1,5 +1,12 @@
|
||||
// Issue 2920 - recursive templates blow compiler stack
|
||||
// https://issues.dlang.org/show_bug.cgi?id=2920
|
||||
// recursive templates blow compiler stack
|
||||
// template_29_B.
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail281.d(15): Error: template instance `fail281.foo!4294966795u` recursive expansion exceeded allowed nesting limit
|
||||
---
|
||||
*/
|
||||
|
||||
template foo(uint i)
|
||||
{
|
||||
|
@ -1,4 +1,10 @@
|
||||
// REQUIRED_ARGS: -unittest
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail308.d(18): Error: template instance `object.RTInfo!(TestType)` recursive expansion
|
||||
---
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -1,4 +1,10 @@
|
||||
// REQUIRED_ARGS: -de
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3150.d(10): Error: cannot cast expression `[1, 2]` of type `int[]` to `ulong`
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
ulong u = cast(ulong)[1,2];
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail316.d(17): Error: mixin `fail316.foo.BadImpl!(uint, Mix1)` cannot resolve forward reference
|
||||
---
|
||||
*/
|
||||
template BadImpl(T, alias thename)
|
||||
{
|
||||
void a_bad_idea(T t)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
test_output:
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail324.d(16): Error: template instance doStuff!((i){ return i; }) cannot use local '__lambda1' as parameter to non-global template doStuff(alias fun)()
|
||||
---
|
||||
|
@ -1,4 +1,10 @@
|
||||
// 3290
|
||||
// https://issues.dlang.org/show_bug.cgi?id=3290
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3290.d(12): Error: argument type mismatch, `const(int)` to `ref int`
|
||||
---
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -1,4 +1,16 @@
|
||||
// 3737
|
||||
// https://issues.dlang.org/show_bug.cgi?id=3737
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail344.d(20): Error: undefined identifier `Q`
|
||||
fail_compilation/fail344.d(20): Error: undefined identifier `Q`
|
||||
fail_compilation/fail344.d(20): Error: undefined identifier `V`
|
||||
fail_compilation/fail344.d(23): while evaluating: `static assert(Alike!(SIB!(crayon)))`
|
||||
fail_compilation/fail344.d(23): Error: template instance `fail344.SIB!(crayon).SIB.Alike!(SIB!(crayon))` error instantiating
|
||||
fail_compilation/fail344.d(23): while evaluating: `static assert(Alike!(SIB!(crayon)))`
|
||||
fail_compilation/fail344.d(28): Error: template instance `fail344.SIB!(crayon).SIB.opDispatch!"E"` error instantiating
|
||||
---
|
||||
*/
|
||||
|
||||
int crayon;
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail346.d(15): Error: undefined identifier `P`
|
||||
fail_compilation/fail346.d(15): Error: variable `fail346.S.T!0.T` cannot use template to add field to aggregate `S`
|
||||
fail_compilation/fail346.d(20): Error: template instance `fail346.S.T!0` error instantiating
|
||||
fail_compilation/fail346.d(23): instantiated from here: `V!(S, 0)`
|
||||
---
|
||||
*/
|
||||
|
||||
struct S {
|
||||
int x;
|
||||
|
@ -1,2 +1,9 @@
|
||||
/*
|
||||
EXTRA_FILES: imports/fail356.d
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail356a.d(9): Error: variable `fail356a.imports` conflicts with import `fail356a.imports` at fail_compilation/fail356a.d(8)
|
||||
---
|
||||
*/
|
||||
import imports.fail356;
|
||||
int imports; // collides with package name
|
||||
|
@ -1,2 +1,9 @@
|
||||
/*
|
||||
EXTRA_FILES: imports/fail356.d
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail356b.d(9): Error: variable `fail356b.bar` conflicts with alias `fail356b.bar` at fail_compilation/fail356b.d(8)
|
||||
---
|
||||
*/
|
||||
import imports.fail356 : bar;
|
||||
int bar; // collides with selective import
|
||||
|
@ -1,2 +1,9 @@
|
||||
/*
|
||||
EXTRA_FILES: imports/fail356.d
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail356c.d(9): Error: variable `fail356c.foo` conflicts with import `fail356c.foo` at fail_compilation/fail356c.d(8)
|
||||
---
|
||||
*/
|
||||
import foo = imports.fail356;
|
||||
int foo; // collides with renamed import
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3581a.d(9): Error: function `fail3581a.B.f` cannot override a non-virtual function
|
||||
---
|
||||
*/
|
||||
|
||||
class A { void f() {} }
|
||||
class B : A { static override void f() {}; }
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3581b.d(9): Error: function `fail3581b.B.f` `private` method is not virtual and cannot override
|
||||
---
|
||||
*/
|
||||
|
||||
class A { void f() {} }
|
||||
class B : A { private override void f() {}; }
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail359.d(8): Error: #line integer ["filespec"]\n expected
|
||||
fail_compilation/fail359.d(9): Error: no identifier for declarator `_BOOM`
|
||||
---
|
||||
*/
|
||||
#line 5 _BOOM
|
||||
void main() { }
|
||||
|
||||
|
@ -1,2 +1,8 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3673a.d(8): Error: template constraints only allowed for templates
|
||||
---
|
||||
*/
|
||||
class A {}
|
||||
class B : A if(false) { }
|
||||
|
@ -1,2 +1,12 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3673b.d(12): Error: basic type expected, not `if`
|
||||
fail_compilation/fail3673b.d(12): Error: template constraints only allowed for templates
|
||||
fail_compilation/fail3673b.d(12): Error: { } expected following `class` declaration
|
||||
fail_compilation/fail3673b.d(12): Error: no identifier for declarator `A`
|
||||
fail_compilation/fail3673b.d(12): Error: declaration expected, not `{`
|
||||
---
|
||||
*/
|
||||
class A {}
|
||||
class B : if(false) A { }
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3731.d(13): Error: cannot implicitly convert expression `x` of type `immutable(D)` to `fail3731.main.C`
|
||||
---
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
Error: cannot mix core.std.stdlib.alloca() and exception handling in _Dmain()
|
||||
---
|
||||
|
@ -1,9 +1,14 @@
|
||||
import std.stdio;
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail3895.d(12): Error: cannot append type `double[]` to type `float[]`
|
||||
---
|
||||
*/
|
||||
|
||||
|
||||
void main() {
|
||||
double[] stuff = [1.,2.,3.,4.,5.];
|
||||
float[] otherStuff;
|
||||
otherStuff ~= stuff;
|
||||
writeln(otherStuff);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4206.d(9): Error: initializer must be an expression, not `s`
|
||||
---
|
||||
*/
|
||||
|
||||
struct s {}
|
||||
enum var = s;
|
||||
|
@ -1,3 +1,11 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4269a.d(12): Error: undefined identifier `B`
|
||||
fail_compilation/fail4269a.d(12): Error: variable `fail4269a.A.blah` field not allowed in interface
|
||||
fail_compilation/fail4269a.d(13): Error: undefined identifier `B`
|
||||
---
|
||||
*/
|
||||
enum bool WWW = is(typeof(A.x));
|
||||
|
||||
interface A {
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4269b.d(11): Error: undefined identifier `B`
|
||||
fail_compilation/fail4269b.d(12): Error: undefined identifier `B`
|
||||
---
|
||||
*/
|
||||
enum bool WWW = is(typeof(A.x));
|
||||
|
||||
struct A {
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4269c.d(11): Error: undefined identifier `B`
|
||||
fail_compilation/fail4269c.d(12): Error: undefined identifier `B`
|
||||
---
|
||||
*/
|
||||
enum bool WWW = is(typeof(A.x));
|
||||
|
||||
class A {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4269d.d(9): Error: undefined identifier `Y`
|
||||
---
|
||||
*/
|
||||
|
||||
static if(is(typeof(X6.init))) {}
|
||||
alias Y X6;
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4269e.d(10): Error: semicolon expected, not `X5`
|
||||
fail_compilation/fail4269e.d(10): Error: no identifier for declarator `X5`
|
||||
---
|
||||
*/
|
||||
|
||||
static if(is(typeof(X5.init))) {}
|
||||
typedef Y X5;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4269f.d(9): Error: `alias X16 = X16;` cannot alias itself, use a qualified name to create an overload set
|
||||
---
|
||||
*/
|
||||
|
||||
static if(is(typeof(X16))) {}
|
||||
alias X16 X16;
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4269g.d(10): Error: alias `fail4269g.Xg` cannot alias an expression `d[1]`
|
||||
---
|
||||
*/
|
||||
|
||||
int[2] d;
|
||||
static if(is(typeof(Xg.init))) {}
|
||||
|
@ -1,5 +1,11 @@
|
||||
// REQUIRED_ARGS: -w
|
||||
// 4375: Dangling else
|
||||
// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4375a.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375a.d(11)
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
if (true)
|
||||
|
@ -1,5 +1,11 @@
|
||||
// REQUIRED_ARGS: -w
|
||||
// 4375: Dangling else
|
||||
// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4375b.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375b.d(12)
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
// disallowed
|
||||
|
@ -1,5 +1,11 @@
|
||||
// REQUIRED_ARGS: -w
|
||||
// 4375: Dangling else
|
||||
// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4375c.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375c.d(11)
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
if (true)
|
||||
|
@ -1,5 +1,11 @@
|
||||
// REQUIRED_ARGS: -w
|
||||
// 4375: Dangling else
|
||||
// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4375d.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375d.d(11)
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
if (true)
|
||||
|
@ -1,5 +1,11 @@
|
||||
// REQUIRED_ARGS: -w
|
||||
// 4375: Dangling else
|
||||
// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4375e.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375e.d(11)
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
version (A)
|
||||
|
@ -1,5 +1,11 @@
|
||||
// REQUIRED_ARGS: -w
|
||||
// 4375: Dangling else
|
||||
// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4375f.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375f.d(11)
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
version (A)
|
||||
|
@ -1,5 +1,11 @@
|
||||
// REQUIRED_ARGS: -w
|
||||
// 4375: Dangling else
|
||||
// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
|
||||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail4375g.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375g.d(11)
|
||||
---
|
||||
*/
|
||||
|
||||
void main() {
|
||||
static if (true)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user