Scala Programming Language
  1. Scala Programming Language
  2. SI-6499

Infinite loop in scala.reflect.internal.Types$TypeVar.isGround(Types.scala:3024)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.0-M7, Scala 2.10.0
    • Component/s: None
    • Labels:
      None

      Description

      The following snippet crashes in Typers with a Stackoverflow:

      object Test {
        trait Matcher[X] {
          val	x: X
          def	foo(): X = { println("foo"); x }
        }
        val m = new Matcher {
          val x = Map():(scala.collection.Map[_, Int] with scala.collection.Map[K,Int] forSome { type K })
        }
        m.foo()
      }
      

      I discovered this while compiling scalatest. The file that crashes the compiler is: http://scalatest.googlecode.com/svn/branches/cmty2.10/src/test/scala/org/scalatest/matchers/ShouldContainValueSpec.scala

        Activity

        Hide
        Eugene Burmako added a comment -

        I'm taking a look, but for now I promote this issue to a blocker. Looks like really serious to me.

        Show
        Eugene Burmako added a comment - I'm taking a look, but for now I promote this issue to a blocker. Looks like really serious to me.
        Hide
        Paul Phillips added a comment -

        Minimized:

        object Test {
          Map(): Map[_, Int] with Map[_, Int]
        }
        
        Show
        Paul Phillips added a comment - Minimized: object Test { Map(): Map[_, Int] with Map[_, Int] }
        Hide
        Eugene Burmako added a comment -

        From Nada's report I understood that's a regression, hence the fuss. If it's not let's demote it

        Show
        Eugene Burmako added a comment - From Nada's report I understood that's a regression, hence the fuss. If it's not let's demote it
        Hide
        Nada Amin added a comment -

        It is a regression, and a recent one. Paul's minimized snippet compiles fine with 2.9.2 AND 2.10.0-M7 but not with 2.10.0-wip.

        Show
        Nada Amin added a comment - It is a regression, and a recent one. Paul's minimized snippet compiles fine with 2.9.2 AND 2.10.0-M7 but not with 2.10.0-wip.
        Show
        Eugene Burmako added a comment - Also see a discussion here: http://groups.google.com/group/scala-internals/browse_thread/thread/f41d34ae889adda9
        Hide
        Josh Suereth added a comment -
        Show
        Josh Suereth added a comment - Paul's commit was merged in https://github.com/scala/scala/commit/ee7f1e8a82

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Nada Amin
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development