ufcpp / StringLiteralGenerator

C# Source Generator for UTF-8 binary literal
MIT License
132 stars 3 forks source link

global namespace #1

Closed ufcpp closed 4 years ago

ufcpp commented 4 years ago

repro:

partial class Literal
{
    [StringLiteral.Utf8Attribute("a")]
    public static partial System.ReadOnlySpan<byte> M1();
}

expected:

partial class Literal
{
    public static partial System.ReadOnlySpan<byte> M1() => new byte[] { 97 };
}

actual:

namespace <global namespace>
{
    partial class Literal
    {
        public static partial System.ReadOnlySpan<byte> M1() => new byte[] { 97 };
    }
}