Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

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

Open
ureishi opened this issue Mar 3, 2021 · 1 comment
Open

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

ureishi opened this issue Mar 3, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@ureishi
Copy link
Contributor

ureishi commented Mar 3, 2021

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;
    }
}
@ureishi ureishi added the bug Something isn't working label Mar 3, 2021
@MerlinVR
Copy link
Owner

MerlinVR commented Mar 4, 2021

Thanks for the report, this is probably going to be held until 1.0 to fix.

@MerlinVR MerlinVR added this to the UdonSharp 1.0 milestone Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants