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

Information about type bounds is lost for class members #16105

Closed
WojciechMazur opened this issue Sep 26, 2022 · 0 comments · Fixed by #16112
Closed

Information about type bounds is lost for class members #16105

WojciechMazur opened this issue Sep 26, 2022 · 0 comments · Fixed by #16112
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore
Milestone

Comments

@WojciechMazur
Copy link
Contributor

Regression found in Open CB #271 for scalikejdbc/scalikejdbc

Compiler version

Works in 3.2.1-RC1
Fails in 3.2.1-RC2
Fails in 3.2.2-RC1-bin-20220925-562ab85-NIGHTLY

Bisect points to 57f53d0

Minimized code

trait SQLSyntaxSupport[A]

trait ResultNameSQLSyntaxProvider[S <: SQLSyntaxSupport[A], A]
trait QuerySQLSyntaxProvider[S <: SQLSyntaxSupport[A], A]{
  def resultName: ResultNameSQLSyntaxProvider[S, A] = ???
}

def include(syntaxProviders: QuerySQLSyntaxProvider[_, _]*) = {
  syntax(syntaxProviders.map(_.resultName): _*)
}

def syntax(resultNames: ResultNameSQLSyntaxProvider[_, _]*) = ???

Output

[error] ./test.scala:9:30: Found:    ResultNameSQLSyntaxProvider[_$1.S, _$1.A]
[error] Required: ResultNameSQLSyntaxProvider[? <: SQLSyntaxSupport[A], ?]
[error]   syntax(syntaxProviders.map(_.resultName): _*)
[error]       

Expectation

Should compile

@WojciechMazur WojciechMazur added itype:bug area:typer regression This worked in a previous version but doesn't anymore labels Sep 26, 2022
@Kordyjan Kordyjan added this to the 3.2.2 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants