Skip to content

Report warning for exported generic types or methods #298

Description

I'm splitting this out from #289. This issue will be about improving how the unsupported generic types and methods are handled by the build. #289 will be about adding (partial) support for exporting generic types and methods to JS from a .NET module.

The following are examples of unsupported generic exports:

[JSExport]
public class GenericClass<T> { ... }
public static class ClassWithGenericMethod
{
    [JSExport]
    public static void GenericMethod<T>();    
}

As requested, it may be better to report a warning rather than an error, so that the rest of the build is not blocked. And if generic types are referenced as parameters in other non-generic APIs, they would be marshalled as external/unknown so at least the values could be round-tripped through JS back to .NET.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingbuild

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions