Say I have these simple classes/objects:

```
trait DT[T<: Tuple]
case class DT1() extends DT[(1,1)]
object DT2 extends DT[(1,1)]
```

Using these in the following way works as expected:

```
val dt1_0: DT[(1,1)] = new DT[(1,1)] {}
val dt1_1 = new DT[(1,1)] {}
def createDT():DT[(1,1)] = DT1()
val dt1_2 = createDT()
```

Now say I want to have a generic signature for the create functions:

```
def createDT[T <: Tuple, R <: DT[T]]():R = DT1()
```

I get the error:

```
error] -- [E007] Type Mismatch Error: /home/VSCodeProjects/pdm_toyadmos/dcase2020/src/examples/djl/autoencoder/SparseEncoder.scala:177:48
[error] 177 | def createDT[T <: Tuple, R <: DT[T]]():R = DT1() // compile error
[error] | ^^^^^
[error] |Found: examples.djl.autoencoder.SparseEncoder.DT1
[error] |Required: R
[error] |
[error] |where: R is a type in method createDT with bounds <: examples.djl.autoencoder.SparseEncoder.DT[T]
[error] one error found
[error] one error found
```

Is this possible? The reason is that I would like to have trait with several methods such the create function. Then I want to extend this trait with specific `DT`

s.

Additionally, this is using OOP style. How would this be done in a more functional style? Maybe this will circumvent the problem above.

TIA