BetterC Bug? Intended Behavior? Asking Here As Unsure

kinke noone at nowhere.com
Mon Jul 6 21:09:57 UTC 2020


On Monday, 6 July 2020 at 20:25:11 UTC, Kayomn wrote:
> Though, admittedly I'm kind of used to seeing this error 
> message since it appears any time you try and do something that 
> relies on type info in betterC, intentionally or not. A notable 
> example is forgetting to supply an arrange length when 
> declaring a stack array, or it'll try to create a 
> runtime-allocated array.

Similar case here; the 'varargs' end up in a GC-allocated array. 
I've recently changed `scope` slice params, so that array literal 
arguments are allocated on the caller's stack instead; so adding 
`scope` for these variadics *should* probably do the same:

void tester(Test test, scope Test[] tests...);


More information about the Digitalmars-d-learn mailing list