Skip to content

Error with namespace with the same name as the class name #76

@ureishi

Description

@ureishi

Describe the bug in detail:
A U# specific error occurs when the namespace and class name contain the same string.

Provide steps/code to reproduce the bug:

// A.cs
namespace L.A.M
{
    public class A : UdonSharp.UdonSharpBehaviour { }
}
// B.cs
namespace L.M
{
    public class B : UdonSharp.UdonSharpBehaviour
    {
        private A.M.A a;
    }
}

Error statement
B.cs: System.Exception: The type or namespace name 'A.M.A' could not be found (are you missing a using directive?)

Expected behavior:
This code should be compiled successfully like C#.

Additional Information:
By writing the full namespace as follows, no error will occur.

// B.cs
namespace L.M
{
    public class B : UdonSharp.UdonSharpBehaviour
    {
        // A.M.A -> L.A.M.A
        private L.A.M.A a;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions