# Inheritance of parameterized typed classes

**URL:** <https://racket.discourse.group/t/inheritance-of-parameterized-typed-classes/1217>\
**Category:** Questions & Answers\
**Tags:** typed-racket\
**Created:** [August 8, 2022, 6:40pm UTC](https://racket.discourse.group/t/inheritance-of-parameterized-typed-classes/1217 "2022-08-08T18:40:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scolobb](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/scolobb/32/108_2.png) [@scolobb](https://racket.discourse.group/u/scolobb)\
**Post date:** [August 8, 2022, 6:40pm UTC](https://racket.discourse.group/t/inheritance-of-parameterized-typed-classes/1217/1 "2022-08-08T18:40:40Z")

</div>

Hi,

Suppose I have the following typed class:

```scheme
(define parent%
  (class object%
    #:forall (a)
    (super-new)

    (: show-me (-> a Void))
    (define/public (show-me x) (displayln x))))

```

What is the best way to say that a class with the type variable `a` is the subclass of `(inst parent% a)`?

The following complains that `a` is unbound:

```scheme
(define child%
  (class (inst parent% a)
    #:forall (a)
    (super-new)))

```

The following typechecks:

```scheme
(define child%
  (class (inst parent%)
    (super-new)))

```

but since `(inst parent%)` is the same thing as `(inst parent% Any)`, it's not exactly what I am looking for. I think I can live with it for now, but I wonder whether there is a better way to achieve parameterized inheritance.
