# What are the limitations of extending a trait with constructor?

**URL:** <https://contributors.scala-lang.org/t/what-are-the-limitations-of-extending-a-trait-with-constructor/6979>\
**Category:** Dotty\
**Created:** [January 4, 2025, 10:14pm UTC](https://contributors.scala-lang.org/t/what-are-the-limitations-of-extending-a-trait-with-constructor/6979 "2025-01-04T22:14:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tribbloid](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/tribbloid/32/1629_2.png) [@tribbloid](https://contributors.scala-lang.org/u/tribbloid)\
**Post date:** [January 4, 2025, 10:14pm UTC](https://contributors.scala-lang.org/t/what-are-the-limitations-of-extending-a-trait-with-constructor/6979/1 "2025-01-04T22:14:00Z")

</div>

here is a quick example:

```auto

  trait A(delegate: Any = this) // this won't work in Scala 2.13

  object A1 extends A(A1)

  trait B extends A(A1) // still doensn't work
/*
trait B may not call constructor of trait A
  trait B extends A(A1)
*/

```

- what’s the cause of this limitation? can it be lifted later?
- are there other limitations like this? can we have a list in a document (e.g. [Tools | Scala 3 — Book | Scala Documentation](https://docs.scala-lang.org/scala3/book/domain-modeling-tools.html#traits)) as a reference

---

<div class="post-metadata">

**Author:** ![ragnar](https://contributors.scala-lang.org/letter_avatar_proxy/v4/letter/r/e79b87/32.png) [@ragnar](https://contributors.scala-lang.org/u/ragnar)\
**Post date:** [January 19, 2025, 12:01pm UTC](https://contributors.scala-lang.org/t/what-are-the-limitations-of-extending-a-trait-with-constructor/6979/2 "2025-01-19T12:01:40Z")

</div>

The documentation is here:

[https://docs.scala-lang.org/scala3/reference/other-new-features/trait-parameters.html](https://docs.scala-lang.org/scala3/reference/other-new-features/trait-parameters.html)

And it links to the SIP which has some limitations:

[https://docs.scala-lang.org/sips/trait-parameters.html#restrictions](https://docs.scala-lang.org/sips/trait-parameters.html#restrictions)

Including traits not being able to instantiate trait arguments.  
As for reasoning, my guess is this both simplifies the implementation, but also removes the potential cases where a parameter is specified (which is good given the complexity of figuring out which definition is used in a complex class hierarchy)
