[Issue 15592] Template specializations don't work in nested scope
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 27 13:34:35 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=15592
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |WONTFIX
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
Specializations have nothing to do with this. The spec clearly states that
nested functions cannot be overloaded (point 3 of [1]). This codes compiles:
```
void main(){
void foo(T : int)() {
}
struct S(T : int) {
}
}
```
It has been argued in the past that this limitation should be lifted, however,
Walter opposes it (I don't remember the reason). So closing this as WONTFIX.
[1] https://dlang.org/spec/function.html#nested-declaration-order
--
More information about the Digitalmars-d-bugs
mailing list