added constructors for enums

This commit is contained in:
Sergey Ignatov
2011-11-16 13:23:18 +04:00
parent fb6ac8e4b6
commit 7d6513f49f
4 changed files with 24 additions and 19 deletions
@@ -0,0 +1,10 @@
enum Color {
private int code;
private Color(int c) {
code = c;
}
public int getCode() {
return code;
}
@@ -0,0 +1,9 @@
enum Color(c : Int) {
private var code : Int
open public fun getCode() : Int {
return code
}
{
$code = c
}
}