Struct initialization extra comma - should it compile

JN 666total at wp.pl
Sun Apr 25 13:39:54 UTC 2021


         struct Foo
         {
             int x, y, z;
         }

         void main()
         {
              Foo bar = Foo(1,);
         }

This compiles without syntax errors, is this expected?


More information about the Digitalmars-d-learn mailing list