https://issues.dlang.org/show_bug.cgi?id=10378

Kenji Hara <k.hara...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|nob...@puremagic.com        |k.hara...@gmail.com

--- Comment #14 from Kenji Hara <k.hara...@gmail.com> ---
We can resolve the issue by applying some rewriting rule.

void test()
{
    import a, b;
    import c;

    stmt1;

    improt d;

    stmt2;
}

To:

void test()
{
    struct __ImportScope1 {     // internal namespace
        import a, b;
        import c;
    }
    with (__ImportScope1) {
        stmt1;

        struct __ImportScope2 {     // internal namespace
            improt d;
        }
        with (__ImportScope2) {
            stmt2;
        }
    }
}

After that, we can reuse the symbol shadowing check mechanism on WithStatement.

--

Reply via email to