In the function below, there is a template parameter and a normal parameter both with the same name. However, the function returns the normal parameter. The template parameter is effectively ignored. I was surprised by this behavior.

Is this a bug or intentional? I did not see it documented anywhere.


```
int foo(int val)(int val)
{
        return val;
}

void main()
{
    assert(foo!1(2) == 2);
}
```

Reply via email to