Skip to content

u8 literals should support literal concatenation #60896

@stephentoub

Description

@stephentoub

Version Used:
32a81dd

Steps to Reproduce:

using System;
public class C {
    public ReadOnlySpan<byte> M() => "abc"u8 + "def"u8;
}

Expected Behavior:
Produces a result equivalent to:

using System;
public class C {
    public ReadOnlySpan<byte> M() => "abcdef"u8;
}

This is valuable for very long UTF-8 literals such that you want to split them across lines.

Actual Behavior:
Fails to compile.

Relates to test plan #58848

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions