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

Action<T> causing error failure #391

Open
Sam7 opened this issue Aug 16, 2013 · 2 comments
Open

Action<T> causing error failure #391

Sam7 opened this issue Aug 16, 2013 · 2 comments

Comments

@Sam7
Copy link

Sam7 commented Aug 16, 2013

Trying to compile this code With ScriptSharp silently fails:

public class TestClass<T>
{
    public Action<T> Action;
}
@andrewharry
Copy link
Contributor

Are generics supported now in ScriptSharp?

@mattjphillips
Copy link
Contributor

Well, more like "yes and no." :-) Yes, you can use standard container generics like List and Action but no, you can't create your own generics as illustrated in the example.

See, eg, http://stackoverflow.com/questions/8883339/using-generics-with-script.

I don't know enough about the compiler to know why it silently fails. It seems to have something to do with the member generic. If I take your example and change the member to just 'public T Action' I get a (admittedly vague) 'unsupported feature' error.

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

3 participants