Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5801

spurious errors when searching an implicit arg for methods that have erroneous signature

    Details

      Description

      import scala.sth
       
      object Test extends App {
        def foo(a: Int)(implicit b: sth.Sth): Unit = {}
        foo(2)
      }
      

      gives:

      ambiguity2.scala:1: error: object sth is not a member of package scala
      import scala.sth
             ^
      ambiguity2.scala:4: error: not found: value sth
        def foo(a: Int)(implicit b: sth.Sth): Unit = {}
                                    ^
      ambiguity2.scala:5: error: ambiguous implicit values:
       both value StringCanBuildFrom in object Predef of type => scala.collection.generic.CanBuildFrom[String,Char,String]
       and method conforms in object Predef of type [A]=> <:<[A,A]
       match expected type <error>
        foo(2)
           ^
      three errors found
      

      It shouldn't report the last one.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                plocinic Hubert Plociniczak
                Reporter:
                plocinic Hubert Plociniczak
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: