Skip to content

parameter type inference with type paramers broken #1803

@scabug

Description

@scabug

the type infered for parameters of an overriding method do not refer to the right type parameter symbol (skolemized / deSkolemized).

lamppc26:~ luc$$ workspace/scala/build/quick/bin/scala -Xexperimental -uniqid
Welcome to Scala version (unknown) (Java HotSpot(TM) Client VM, Java 1.5.0_16).
Type in expressions to have them evaluated.
Type :help for more information.

scala> class A { def foo[A](a: A) = a }
defined class A

scala> class B extends A { override def foo[A](b) = b }
<console>:5: error: type mismatch;
 found   : ASI-10818
 required: ASI-10819
       class B extends A { override def foo[A](b) = b }
                                                    ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions