A strange DMD error
Tejas
notrealemail at gmail.com
Tue Nov 1 16:19:43 UTC 2022
On Tuesday, 1 November 2022 at 15:49:54 UTC, Keivan Shah wrote:
> On Tuesday, 1 November 2022 at 15:42:43 UTC, Imperatorn wrote:
>> On Tuesday, 1 November 2022 at 15:40:04 UTC, Keivan Shah wrote:
>>> Hello,
>>>
>>> Today I came across a strange bug while using D with `dmd`. I
>>> have still not been able to figure out under what conditions
>>> does it happen but it seems to be a DMD related bug to me.
>>> Here is a reproducible snippet of the code
>>>
>>> [...]
>>
>> Could be there's some restriction in DMD on number of
>> arguments.
>>
>> May I ask if this was just an experiment? I hope you're not
>> having code like that in the wild 🙏
>
> Possible, but I think I have had code with more arguments than
> this and it has worked 😅
>
> Unfortunately, not an experiment. Although have replaced the
> types so seems silly now, this is part of my constructor for a
> huge co-coordinator class that takes too many configurable
> start time parameters and so need to pass these many arguments.
>
> Keivan
Regarding the too many configurable parameters, the general
advice is to group all of the params into a `struct` and pass
that instead as argument to constructor
Pretty wild bug though, definitely a backend thing
More information about the Digitalmars-d-learn
mailing list