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

make lub take lower bounds on method type params into account

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Type Inference
    • Labels:

      Description

      this should compile since lub(T, U) = S (since T <: S and U <: S)

      abstract class Foo[T] {
        val x: T
        def foo[S >: T]: List[S] = { // T <: S
          def z : U forSome {type U <: S} = ??? // U <: S
          List(x, z)
        }
      }
      

        Activity

        Hide
        Adriaan Moors added a comment -

        Unassigning and rescheduling to M6 as previous deadline was missed.

        Show
        Adriaan Moors added a comment - Unassigning and rescheduling to M6 as previous deadline was missed.

          People

          • Assignee:
            Unassigned
            Reporter:
            Adriaan Moors
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development