Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make lub take lower bounds on method type params into account #5548

Open
scabug opened this issue Mar 5, 2012 · 1 comment
Open

make lub take lower bounds on method type params into account #5548

scabug opened this issue Mar 5, 2012 · 1 comment
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Mar 5, 2012

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)
  }
}
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Mar 5, 2012

@scabug scabug added infer lub labels Apr 7, 2017
@scabug scabug added this to the Backlog milestone Apr 7, 2017
@scala scala deleted a comment from scabug Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.