# Enum reference

**URL:** <https://discuss.kotlinlang.org/t/enum-reference/976>\
**Category:** Uncategorized\
**Created:** [December 18, 2012, 1:59am UTC](https://discuss.kotlinlang.org/t/enum-reference/976 "2012-12-18T01:59:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steamstreet](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/steamstreet/32/1529_2.png) [@steamstreet](https://discuss.kotlinlang.org/u/steamstreet)\
**Post date:** [December 18, 2012, 1:59am UTC](https://discuss.kotlinlang.org/t/enum-reference/976/1 "2012-12-18T01:59:27Z")

</div>

Are enumerations broken? I'm trying to reference an enum in a different file, and in the source editor it appears to work fine, but compilation fails with:

> Kotlin: Unresolved reference: GET

There seem to be lots of other problems with enums, so I’m wondering if I should even be bothering right now.

---

<div class="post-metadata">

**Author:** ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Post date:** [December 18, 2012, 6:17am UTC](https://discuss.kotlinlang.org/t/enum-reference/976/2 "2012-12-18T06:17:48Z")

</div>

Can you show sources? Which versions of the plugin and IDEA are you using?

---

<div class="post-metadata">

**Author:** ![steamstreet](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/steamstreet/32/1529_2.png) [@steamstreet](https://discuss.kotlinlang.org/u/steamstreet)\
**Post date:** [December 18, 2012, 7:24am UTC](https://discuss.kotlinlang.org/t/enum-reference/976/3 "2012-12-18T07:24:18Z")

</div>

I'm trying to reduce this down to an easy to reproduce case, but it connected with annotations. I'm trying to include an enum as a parameter to an annotation, and there seem to be some issues. That said, trying to reproduce with a test case is proving difficult.

Inside IDEA, the files are shown as fine, with no errors indicated.

> package com.a
> 
> enum class Bar {  
> ONE  
> TWO  
> THREE  
> }

> package com.b
> 
> annotation class foo(val method: Bar)

> package com.c
> 
> foo(Bar.ONE) fun doit() {  
> }

That’s the idea, but as I said, when trying to reproduce with a simple case like this, I’m not seeing the error. It’s not an easy one to figure out.

---

<div class="post-metadata">

**Author:** ![dodyg](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/dodyg/32/1451_2.png) [@dodyg](https://discuss.kotlinlang.org/u/dodyg)\
**Post date:** [December 18, 2012, 8:42am UTC](https://discuss.kotlinlang.org/t/enum-reference/976/4 "2012-12-18T08:42:10Z")

</div>

I suspect this has more to do with problem with annotation than enum. If you check on youtrack, you will see plenty of cases in relation to annotation.

---

<div class="post-metadata">

**Author:** ![steamstreet](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/steamstreet/32/1529_2.png) [@steamstreet](https://discuss.kotlinlang.org/u/steamstreet)\
**Post date:** [December 18, 2012, 7:04pm UTC](https://discuss.kotlinlang.org/t/enum-reference/976/5 "2012-12-18T19:04:31Z")

</div>

Yeah, I started to come to that conclusion as I'm running into other issues with annotations. I guess for now String constants will have to do.

---

<div class="post-metadata">

**Author:** ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Post date:** [December 18, 2012, 10:56pm UTC](https://discuss.kotlinlang.org/t/enum-reference/976/6 "2012-12-18T22:56:08Z")

</div>

Yes, it's bug of annotations. Can you submit bug to [tracker](http://youtrack.jetbrains.com/issues/KT) ? Thanks!
