[Issue 24763] Can't initialize a struct with a static array
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Sep 12 12:49:57 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24763
RazvanN <razvan.nitu1305 at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
A reduction of the test case:
struct Test
{
    int test;
}
void func(Test t) {}
void main()
{
    Test a = {test: 1}; 
    func({test: 1});                                                            
}
It seems that struct initializers only work when they are the rhs of an assign
expression.
--
    
    
More information about the Digitalmars-d-bugs
mailing list