Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 8889 - [2.061 beta][64-bit] Assertion Failure argtypes.c
- Loading branch information
1 parent
2c09f6f
commit 61b5435
Showing
3 changed files
with
50 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
template Test(T){ alias Type = T; } | ||
|
||
alias X1 = int; | ||
static assert(is(X1 == int)); | ||
|
||
alias X2 = immutable(long)[], X3 = shared const double[int]; | ||
static assert(is(X2 == immutable(long)[])); | ||
static assert(is(X3 == shared const double[int])); | ||
|
||
alias X4 = void delegate() const, X5 = Test!int; | ||
static assert(is(X4 == void delegate() const)); | ||
static assert(is(X5.Type == int)); | ||
|
||
void main() | ||
{ | ||
alias Y1 = int; | ||
static assert(is(Y1 == int)); | ||
|
||
alias Y2 = immutable(long)[], Y3 = shared const double[int]; | ||
static assert(is(Y2 == immutable(long)[])); | ||
static assert(is(Y3 == shared const double[int])); | ||
|
||
alias Y4 = void delegate() const, Y5 = Test!int; | ||
static assert(is(Y4 == void delegate() const)); | ||
static assert(is(Y5.Type == int)); | ||
|
||
struct S | ||
{ | ||
int value; | ||
alias this = value; | ||
} | ||
auto s = S(10); | ||
int n = s; | ||
assert(n == 10); | ||
} | ||
template Test(T){ alias Type = T; } | ||
|
||
alias X1 = int; | ||
static assert(is(X1 == int)); | ||
|
||
alias X2 = immutable(long)[], X3 = shared const double[int]; | ||
static assert(is(X2 == immutable(long)[])); | ||
static assert(is(X3 == shared const double[int])); | ||
|
||
alias X4 = void delegate() const, X5 = Test!int; | ||
static assert(is(X4 == void delegate() const)); | ||
static assert(is(X5.Type == int)); | ||
|
||
void main() | ||
{ | ||
alias Y1 = int; | ||
static assert(is(Y1 == int)); | ||
|
||
alias Y2 = immutable(long)[], Y3 = shared const double[int]; | ||
static assert(is(Y2 == immutable(long)[])); | ||
static assert(is(Y3 == shared const double[int])); | ||
|
||
alias Y4 = void delegate() const, Y5 = Test!int; | ||
static assert(is(Y4 == void delegate() const)); | ||
static assert(is(Y5.Type == int)); | ||
|
||
struct S | ||
{ | ||
int value; | ||
alias this = value; | ||
} | ||
auto s = S(10); | ||
int n = s; | ||
assert(n == 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters