Hello I'm in need to have my enumerated objects to have type parameters. It should expose this parameters to satisfied interface. Example:--
shared interface IFace<Gen> {}
shared abstract class Enum<Gen>() of genEnum satisfies IFace<Gen> {}
shared object genEnum extends Enum<String>() {}
This dosn't compile with error:Case type must be a subtype of enumerated type for every type argument of the generic enumerated type: genEnum is not assignable to Enum<Gen>Err why ? I don't understand.Thank YouVoitech
You received this message because you are subscribed to the Google Groups "ceylon-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-users+unsubscribe@googlegroups.com.
To post to this group, send email to ceylon...@googlegroups.com.
Visit this group at https://groups.google.com/group/ceylon-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceylon-users/a626d4fa-d2d9-4547-bf77-a3d0f1aaaf80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You can also get it to compile by moving the type argument up by one level:
shared interface IFace<Gen> {}
shared abstract class Enum() of genEnum satisfies
IFace<String> {}
shared object genEnum extends Enum() {}