Skip to content

Dotty deviation in either implicit search or java wildcards #1044

@DarkDimius

Description

@DarkDimius
???.getClass.getMethods.head.getParameterTypes.mkString(",")

compiles fine with scalac. Does not in Dotty:

error: type mismatch:
 found   : Array[Class[_]]
 required: ?{ mkString: ? }
Note that implicit conversions cannot be applied because they are ambiguous;
 both method wrapRefArray in class LowPriorityImplicits and method genericArrayOps in object Predef$ convert from Array[Class[_]] to ?{ mkString: FunProto(","):? }
    val baz_int_param = ???.getClass.getMethods.head.getParameterTypes.mkString(",")

This is part of test cases of #630, so it used to compile fine back then.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions