Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0
    • Component/s: Compiler (Misc)
    • Labels:
      None

      Description

      The following two programs should both give ambiguity errors, but only the first one does:

      package object foo {
        implicit val x: Bippy = new Bippy("x")
      }
      package foo {
        class Bippy(override val toString: String) { }
        class Dingus {
          implicit val z: Bippy = new Bippy("z")
          def f1 = implicitly[Bippy]
        }
      }
      

      This one compiles without error, but shouldn't:

      package object foo {
        implicit val x: Bippy = new Bippy("x")
      }
      package foo {
        class Bippy(override val toString: String){ }
        class Dingus {
          def f1 = {
            implicit val z: Bippy = new Bippy("z")
            implicitly[Bippy]
          }
        }
      

        Attachments

          Activity

            People

            • Assignee:
              odersky Martin Odersky
              Reporter:
              odersky Martin Odersky
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: