On Tuesday, 6 November 2018 at 21:03:01 UTC, Stanislav Blinov wrote:
It's not a bug, just the way name resolution works. Better have collision than silent overloads. Possible solutions:

```
void reserve(ref Bob system, in size_t capacity) {
     // explicitly disambiguate
     object.reserve(system._data, capacity);
}
```

or:

// pull in the runtime 'reserve' into this module's scope
alias reserve = object.reserve;

void reserve(ref Bob system, in size_t capacity) {
     // call reserve as usual
     system._data.reserve(capacity);
}

Given your second example that makes me think that, because object functions are provided by the runtime without me explicitly importing it, this is likely only an issue for object functions? Or can this behaviour happen with any free functions with the same name but completely different parameter types?

Reply via email to