# Is there any way to store an \`abstract\` value in a Map?

**URL:** <https://community.haxe.org/t/is-there-any-way-to-store-an-abstract-value-in-a-map/3710>\
**Category:** Haxe\
**Tags:** abstract\
**Created:** [October 6, 2022, 12:48pm UTC](https://community.haxe.org/t/is-there-any-way-to-store-an-abstract-value-in-a-map/3710 "2022-10-06T12:48:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirox228](https://community.haxe.org/user_avatar/community.haxe.org/sirox228/32/1994_2.png) [@Sirox228](https://community.haxe.org/u/Sirox228)\
**Post date:** [October 6, 2022, 12:48pm UTC](https://community.haxe.org/t/is-there-any-way-to-store-an-abstract-value-in-a-map/3710/1 "2022-10-06T12:48:29Z")

</div>

i was trying to make a map of classes, but when i try to add here the one that have `abstract` option, it say that i can’t use `abstract` as value, so is there any way to fix it?  
map is created like that:

```haxe
var map:Map<String, Dynamic>;

```

---

<div class="post-metadata">

**Author:** ![Confidant](https://community.haxe.org/user_avatar/community.haxe.org/confidant/32/63_2.png) [@Confidant](https://community.haxe.org/u/Confidant)\
**Post date:** [October 6, 2022, 7:31pm UTC](https://community.haxe.org/t/is-there-any-way-to-store-an-abstract-value-in-a-map/3710/2 "2022-10-06T19:31:57Z")

</div>

Abstract is a compile-time feature and is not available as a class at runtime ([see here](https://haxe.org/manual/types-abstract.html)), so that’s likely the problem. If you post a little more code someone might have a better idea of how to help further.
