Method overloading ambiguity not detected for class that implements function type

Description

Given a class Aself implements (Long) => Aself
and given methods of a class
def f(Long, (Long) => Aself)
and
def f(Long, Aself),

the compiler does not report an ambiguity, but instead picks the latter one.

A testcase is included, which demonstrates this problem with both generics and non-generics.

The generic version R is a cut-down example take from Rail (which motivated these methods)

Environment

None

Status

Assignee

VijayV

Reporter

Avi Shinnar

Labels

None

Fix versions

Priority

Medium
Configure