Details

      Description

      The following appeared in 2.10.0-RC1 in the Akka build (was not present in 2.10.0-M7):

      [warn] /Users/rkuhn/comp/akka/akka-actor/src/main/scala/akka/actor/dungeon/Children.scala:124: fruitless type test: a value of type akka.actor.dungeon.ChildrenContainer.SuspendReason cannot also be a akka.actor.dungeon.ChildrenContainer.WaitingForChildren
      [warn]     case TerminatingChildrenContainer(_, _, w: WaitingForChildren) ⇒ w
      [warn]                                                ^
      

      You can see the full file here: https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/dungeon/Children.scala#L124

      And the traits/classes involved are defined here: https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/dungeon/ChildrenContainer.scala#L45

      My attempts at minimizing it have not been successful: I found that I can sometimes provoke it with the following two files in Eclipse, seeing the warning from the PC (i.e. not the build compiler), and the warning then goes away after a clean build:

      package tester
      
      object PatMatWarning {
      
        sealed trait X
        case object X1 extends X
        case object X2 extends X with Y
      
        trait Y
      
        case class Wrap(x: X)
      
      }
      
      package tester
      
      class PatMatWarning2 {
      
        import PatMatWarning.{ Wrap, Y }
      
        def f(w: Wrap) = w match {
          case Wrap(_: Y) ⇒
        }
      
      }
      

      Having all within the same file never triggered the warning for me.

        Activity

        Hide
        Paul Phillips added a comment -

        Based on that characterization I think it's only going to need a .initialize somewhere. isSealed tells lies if the symbol isn't initialized yet. Or there may be a deeper problem with sealed tracking, such that it is giving me an incomplete set of children. Or, there could just be a regular bug which is actually my fault, but obviously that is the least likely scenario.

        Show
        Paul Phillips added a comment - Based on that characterization I think it's only going to need a .initialize somewhere. isSealed tells lies if the symbol isn't initialized yet. Or there may be a deeper problem with sealed tracking, such that it is giving me an incomplete set of children. Or, there could just be a regular bug which is actually my fault, but obviously that is the least likely scenario.
        Hide
        Paul Phillips added a comment -

        Fix pending.

        Show
        Paul Phillips added a comment - Fix pending.
        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1509
        Hide
        Paul Phillips added a comment -

        6daf9c6

        Show
        Paul Phillips added a comment - 6daf9c6

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Roland Kuhn
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development