another one case with constructors supported
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
enum Color {
|
||||
WHITE(21)
|
||||
BLACK(22)
|
||||
RED(23)
|
||||
YELLOW(24)
|
||||
BLUE(25)
|
||||
enum Color(c: Int) {
|
||||
WHITE : Color(21)
|
||||
BLACK : Color(22)
|
||||
RED : Color(23)
|
||||
YELLOW : Color(24)
|
||||
BLUE : Color(25)
|
||||
private var code : Int
|
||||
open private (c : Int) {
|
||||
{
|
||||
$code = c
|
||||
}
|
||||
open public fun getCode() : Int {
|
||||
|
||||
Reference in New Issue
Block a user