enum E1 { | |
one(1), | |
two.named(2); | |
final int foo; | |
const E1(this.foo); | |
const E1.named(int value) : foo = value; | |
} | |
enum E2<X, Y> { | |
one<int, String>(1, "one"), | |
two.named("two", 2), | |
three.named("three", "three"); | |
final X foo; | |
final Y bar; | |
const E2(this.foo, this.bar); | |
const E2.named(Y this.bar, X this.foo); | |
} | |
main() {} |