Hello, I have got 2 enums. How to inherit one enum from another?
enum Key : string { K1 = "qwerty", K2 = "asdfgh" }enum ExtendedKey : Key { E1 = "q1", E2 = "w2", E3 = "e3" }
Result:
onlineapp.d(27): Error: cannot implicitly convert expression "q1" of type string to Key onlineapp.d(28): Error: cannot implicitly convert expression "w2" of type string to Key onlineapp.d(29): Error: cannot implicitly convert expression "e3" of type string to Key
How to understand this?