2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/enumMapBackIntoItself.ts ===
|
|
|
|
enum TShirtSize {
|
2015-04-16 01:44:20 +02:00
|
|
|
>TShirtSize : TShirtSize
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
Small,
|
2015-04-16 01:44:20 +02:00
|
|
|
>Small : TShirtSize
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
Medium,
|
2015-04-16 01:44:20 +02:00
|
|
|
>Medium : TShirtSize
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
Large
|
2015-04-16 01:44:20 +02:00
|
|
|
>Large : TShirtSize
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
var mySize = TShirtSize.Large;
|
2015-04-16 01:44:20 +02:00
|
|
|
>mySize : TShirtSize
|
|
|
|
>TShirtSize.Large : TShirtSize
|
|
|
|
>TShirtSize : typeof TShirtSize
|
|
|
|
>Large : TShirtSize
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var test = TShirtSize[mySize];
|
2015-04-16 01:44:20 +02:00
|
|
|
>test : string
|
2014-08-15 23:33:16 +02:00
|
|
|
>TShirtSize[mySize] : string
|
2015-04-16 01:44:20 +02:00
|
|
|
>TShirtSize : typeof TShirtSize
|
|
|
|
>mySize : TShirtSize
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
// specifically checking output here, bug was that test used to be undefined at runtime
|
|
|
|
test + ''
|
|
|
|
>test + '' : string
|
2015-04-16 01:44:20 +02:00
|
|
|
>test : string
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|