Skip to content

Generic Fields Break Generated Naming Scheme #3

@Soaryn

Description

@Soaryn

Problem:

PolymorphicStructs that are have generics used as a field, can't compile due to the name generated. Common use case will likely be BlobAssetReferences, but for sake of example, I quickly created a generic struct below. Breaks compilation.

Example

namespace Playground.ExamplePoly {
    [PolymorphicStruct]
    public interface IPoly {
        public void DoThing();
    }
}
namespace Playground.ExamplePoly {
    public partial struct PolyA : IPoly {
        public Example<int> Test;
        public void DoThing() {
        }
    }

    public struct Example<T> where T : unmanaged {
        public T Value;
    }
}

Current Result

public Example<int> Example<int>_0;

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