Skip to content

F-bounds of existential types aren't inferred #8198

Open
@scabug

Description

@scabug

Existential type bounds aren't inferred, a la #1786, when a bound is an F-bound. A modification of the example from #1786 which demonstrates:

abstract class SomeClass2[T] {def tValue: T}
class MyClass2[T <: SomeClass2[T]](val myValue:T)

def myMethod(i:MyClass2[_]) {
  i.myValue.tValue      // << error: value tValue is not a member of _$1
}

def myMethodT[T <: SomeClass2[T]](i:MyClass2[T]) {
  i.myValue.tValue      // << works
}

(I used to think this was part of #6169, but I do not think that now.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions