# Infer Abstract class type from constructor

**URL:** https://discuss.kotlinlang.org/t/infer-abstract-class-type-from-constructor/1913
**Category:** Language Design
**Created:** [August 11, 2016, 8:33am UTC](https://discuss.kotlinlang.org/t/infer-abstract-class-type-from-constructor/1913 "2016-08-11T08:33:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fab1an](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/fab1an/32/1934_2.png) [@fab1an](https://discuss.kotlinlang.org/u/fab1an)
#### Post date: [August 11, 2016, 8:33am UTC](https://discuss.kotlinlang.org/t/infer-abstract-class-type-from-constructor/1913/1 "2016-08-11T08:33:10Z")

</div>

Would shorter syntax for Abstract inheritance be feasible?

```
abstract class Abstract<T>(val param: T)

class Test : Abstract("string")           
class Test : Abstract<>("string")

```

Thanks,  
Fabian

---

<div class="post-metadata">

### Author: ![abreslav](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/abreslav/32/8279_2.png) [@abreslav](https://discuss.kotlinlang.org/u/abreslav)
#### Post date: [August 12, 2016, 1:37pm UTC](https://discuss.kotlinlang.org/t/infer-abstract-class-type-from-constructor/1913/2 "2016-08-12T13:37:14Z")

</div>

There are at least two reasons why we don’t have this:

- the compiler and tooling really want to know the supertypes (with type-arguments) without having to look into expressions (`"string"`),
- in cases more complex than this one the users prefer having the same information.

While the second point is somewhat a matter of taste, the first one is rather important for smooth tooling.
