Skip to content

Nested Structs lose partial keyword #2

@Soaryn

Description

@Soaryn

Problem:

PolymorphicStructs that are created in a nested structs, according to the IDE (Rider), don't have a partial sibling related to it.. This breaks compilation.

Example

namespace Playground.ExamplePoly {
    [PolymorphicStruct]
    public interface IPoly {
        public void DoThing();
    }
}
namespace Playground.ExamplePoly {
    public class NestedExample {
        public partial struct PolyB : IPoly {
            public void DoThing() { }
        }
    }
}

Potential Related Issues

Static or type definition using statements are lost on source generation. Examples below of what is written vs what is generated.

using static Playground.ExamplePoly.NestedExample.PolyB; //This example is not using both at the same time, but the result is the same.
using PolyB = Playground.ExamplePoly.NestedExample.PolyB;

Result:

using Playground.ExamplePoly.NestedExample.PolyB;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions