Question: Given the following object:

```
scala> object P2pClient {
     |   type Num = Double
     |   type Weights = Array[Array[Num]]
     | }
defined object P2pClient

```

and the following import:

```
import P2pClient._

```

The `Weights` type *seems* to be properly understood: 

```
val w: Weights = new Weights(3)
w: P2pClient.Weights = Array(null, null, null)

```

But then why is it *not* working in the following construct:

```
case class SendWeightsReq(W: Weights) extends P2pReq[Weights] {
     |   override def value() = W
     | }
<console>:12: error: not found: type Weights
       case class SendWeightsReq(W: Weights) extends P2pReq[Weights] {
                                                            ^
<console>:12: error: not found: type Weights
       case class SendWeightsReq(W: Weights) extends P2pReq[Weights] {
                                    ^

```

Any ideas on what were happening here (/workaround) ?

**Update** There appear to be significant limitations on wildcard imports int he REPL. Here is another simpler illustration:

```
scala> import reflect.runtime.universe._
import reflect.runtime.universe._

scala> trait TT {  def x[T <: java.io.Serializable : TypeTag]: T }
<console>:10: error: not found: type TypeTag
       trait TT {  def x[T <: java.io.Serializable : TypeTag]: T }
                                                     ^

```

So we see that the wildcard import did *not* work. Here is the same code with the explicit package:

```
scala> trait TT {  def x[T <: java.io.Serializable : reflect.runtime.universe.TypeTag]: T }
defined trait TT

```

Answer: 
I see the issue is due to my using the **Spark** REPL `spark-shell`. The issue is not happening in the normal Scala REPL.
Good news: your code works! Bad news: I have no idea why it doesn't work for you.

Here is my REPL session; I was going to build up to your example and see what broke, but nothing did.

```
scala> object P2pClient { type Num = Int; type Weights = Array[Array[Num]] }
defined object P2pClient

scala> import P2pClient._
import P2pClient._

scala> val x = new Weights(3)
x: Array[Array[P2pClient.Num]] = Array(null, null, null)

scala> case class SendWeights(W: Weights)
defined class SendWeights

scala> val s = new SendWeights(new Weights(3))
s: SendWeights = SendWeights([[I@1cab0bfb)

```

Hmmm. Trivial example works.

```
scala> case class SendWeights2(w: Weights) { def dubs = w }
defined class SendWeights2

```

Works when it has a body.

```
scala> trait P2pReq[+T] { def value(): Unit }
defined trait P2pReq

scala> case class SendWeights3(W: Weights) extends P2pReq[Weights] {
override def value() = W }
defined class SendWeights3

scala> val foo = new SendWeights3(new Weights(3))
foo: SendWeights3 = SendWeights3([[I@51dcb805)
res2: P2pClient.Weights = Array(null, null, null)

```

Aaaaand works when it extends a polymorphic trait and overrides one of its members. The only thing that may be different is your definition of `P2pReq`, but I don't see how that could cause one of your types to go unrecognized by the interpreter.