mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
Fix #20907 - DMD segfaults with static array length parameter derived from left-shifted template parameter property (#20919)
This commit is contained in:
parent
34cf3a9503
commit
3945e81615
1 changed files with 11 additions and 0 deletions
|
@ -240,6 +240,16 @@ void test8()
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|
||||||
|
// https://github.com/dlang/dmd/issues/20907
|
||||||
|
struct Bar { enum bar = 1; }
|
||||||
|
void foo(A)(A[], A[1 << A.bar]) {}
|
||||||
|
void test20907()
|
||||||
|
{
|
||||||
|
foo((Bar[]).init, (Bar[2]).init);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************/
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
test1();
|
test1();
|
||||||
|
@ -250,6 +260,7 @@ int main()
|
||||||
test6();
|
test6();
|
||||||
test7();
|
test7();
|
||||||
test8();
|
test8();
|
||||||
|
test20907();
|
||||||
|
|
||||||
printf("Success\n");
|
printf("Success\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue