Skip to content

[C#] Tuples, Qualified-Types, and Multiline-Strings #4468

@Nieb

Description

@Nieb

What happened?

Tuple aliases are very broken.
Qualified types are inconsistently highlighted depending on context.
Tuple assignments have issues with custom types.

using F2 = (float x, float y);
using F3 = (float x, float y, float z);
using F4 = (float x, float y, float z, float w); // <- tuple aliases are all kinds of wonky

static class BLARG {
    Some.Thing SomeThing = new(); // <- perhaps this is intentional...

    void blarg() {
        Some.Thing SomeThing = new(); // <- ...

        (int a, float b) = blarg();
        (vec2 a, vec3 b) = blarg();         // <- 
        (vec2 a, vec3 b, vec4 c) = blarg(); // <- last type isn't highlighted.
    }

    //  MultiLine strings support triple curly-brace for interpolation:
    private static string GLSL__BlargVertex = $$$"""
    #version 460 core
    #line {{{LINE_NUMBER()+1}}}

        layout(location = 0) in vec4 VertPos; //  Position XYZW

        void main() {
            gl_Position = VertPos;
        }

    """;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions