# Blog post: \`reveal\_type\` in Crystal

**URL:** <https://forum.crystal-lang.org/t/blog-post-reveal-type-in-crystal/5463>\
**Category:** Official\
**Tags:** blog\
**Created:** [March 6, 2023, 9:33pm UTC](https://forum.crystal-lang.org/t/blog-post-reveal-type-in-crystal/5463 "2023-03-06T21:33:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zw963](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/zw963/32/1623_2.png) [@zw963](https://forum.crystal-lang.org/u/zw963)\
**Post date:** [March 7, 2023, 7:52am UTC](https://forum.crystal-lang.org/t/blog-post-reveal-type-in-crystal/5463/2 "2023-03-07T07:52:55Z")

</div>

Following solution can be a supplement to above solution.

## 1. Add a `BlackHole` type for a universal type for any unknown type.

```auto
class BlackHole
  macro method_missing(call)
    raise "BUG: must implement {{call.name}}"
  end
end

```

## 2. for any places compiler complain “can not infer current type”, just use BlackHole as type.

## 3. compile again, compiler will tell you, “should be a String, not BlackHole”, then, you known, the correct type should be `String`.

I use this hack all the days when i porting Ruby gems into Crystal, this solution come from asterite by [this reply](https://forum.crystal-lang.org/t/is-there-exists-a-dart-dynamic-type-equivalent-for-crystal-or-equivalent-usage/5082/8)

---

_[View the full topic](https://forum.crystal-lang.org/t/blog-post-reveal-type-in-crystal/5463)._
