| [#696] | project: compiler | priority: low | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Sean | Martin | fixed | 2006-08-10 12:47:19.0 | |
| subject | implicit parameter crash | |||
| code |
object TypeUtil0 {
trait Type[+T];
implicit def WithType[S,T](implicit tpeS : Type[S], tpeT : Type[T]) : Type[S with T] = null
as[Any](null);
def as[T](x : Any)(implicit tpe : Type[T]) = null;
}
|
|||
| what happened | |
|||
| what expected | ||||
| [back to overview] | ||||
| Martin edited on 2006-08-20 13:12:45.0 |
We now get:
bug696.scala:3 error: implicit method WithType is not contractive,
because the implicit parameter type TypeUtil0.this.Type[S]
is not strictly contained in the signature TypeUtil0.this.Type[S with T]
implicit def WithType[S,T](implicit tpeS : Type[S], tpeT : Type[T]) : Type[S with T] = null
^
bug696.scala:4 error: no implicit argument matching parameter type TypeUtil0.this.Type[scala.Any] was found.
as[Any](null);
^
two errors found
|