On 09/21/2014 03:53 PM, H. S. Teoh via Digitalmars-d wrote:
I.e., this should work:

        string foo(string text) {
                import std.conv; // includes std.conv.text
                return "";    // but `text` is never referenced
        }

but this should emit an error:

        string foo(string text) {
                import std.conv; // includes std.conv.text
                return text;    // error: parameter `text` conflicts with 
std.conv.text
        }

Why? That's inconsistent with how imports work at module scope. In the second example, 'text' should refer to the parameter.

Reply via email to