On Wednesday, 5 January 2022 at 08:40:15 UTC, rempas wrote:
I'm trying to use mixins and enums to "expand" code in place
but the results are not what I expected and I'm getting an
weird error. I have created the smallest possible example to
reproduce the error and it is the following:
[...]
Try this:
```d
pragma(msg, type_check!("static if", "i8", "true", "5", "4",
"10", "5"));
```
Result:
```d
static if(is_same!(num, i8)) {
mixin(base_digit!("5", "4", "10", "5"));
static if (true) {
mixin(overflow_check!"i8.min"); }
}
```
is_same - is undefined
i8 - is undefined
overflow_check!"i8.min" - ?
This code with mixins is horrible :)