Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not compile Nested Variant with Generics from Parent #54

Open
Gallimathias opened this issue Aug 12, 2022 · 1 comment
Open

Can not compile Nested Variant with Generics from Parent #54

Gallimathias opened this issue Aug 12, 2022 · 1 comment

Comments

@Gallimathias
Copy link

I have following Pattern

[Variant]
public class Parent<TInput, TOutput, TValue, TExternalValue>
{
    static partial void VariantOf(
            Notification<string> notification,
            Parent<TInput, TOutput, TValue, TExternalValue>.ChildA a,
            Parent<TInput, TOutput, TValue, TExternalValue>.ChildB b
        );

    [Variant]
    public partial class ChildA
    {
        static partial void VariantOf(
            string name,
            TInput input,
            TExternalValue value
        );
    }

    [Variant]
    public partial class ChildB
    {
        static partial void VariantOf(
            TOutput output,
            TValue value,
            Action action
        );
    }
}

I get now a build issue that ChildAEx can not Build because it don't know about TExternalValue

@Gallimathias Gallimathias changed the title Can not compile Nested Variant with Generics from Parents Can not compile Nested Variant with Generics from Parent Aug 12, 2022
@mknejp
Copy link
Owner

mknejp commented Aug 12, 2022

Nested variants are currently not supported, see #28.
Biggest complication is correctly handling the visibility of generated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants