mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +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()
|
||||
{
|
||||
test1();
|
||||
|
@ -250,6 +260,7 @@ int main()
|
|||
test6();
|
||||
test7();
|
||||
test8();
|
||||
test20907();
|
||||
|
||||
printf("Success\n");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue