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

Regression trouble inferring type of java wildcard in 2.12.10 #11905

Open
frosforever opened this issue Mar 10, 2020 · 0 comments
Open

Regression trouble inferring type of java wildcard in 2.12.10 #11905

frosforever opened this issue Mar 10, 2020 · 0 comments

Comments

@frosforever
Copy link

@frosforever frosforever commented Mar 10, 2020

reproduction steps

Using the dependency: "io.grpc" % "grpc-core" % "1.18.0", the following code fails to compile in 2.12.10 and 2.13.1 but compiles just fine in 2.11.12

import io.grpc.ManagedChannelBuilder

trait Test {
  val grpcChannel = ManagedChannelBuilder
    .forAddress(
      "host",
      1234
    )
    .maxInboundMessageSize(20)
    .usePlaintext()
    .build()
}

problem

Fails with:

 value usePlaintext is not a member of ?0
[error] possible cause: maybe a semicolon is missing before `value usePlaintext'?
[error]     .usePlaintext()
[error]      ^
[error] one error found

expectation

This compiles fine in 2.11.12. It also compiles if Test is an object instead of a trait. From what I can tell, this was also an issue in 2.10 that got fixed in 2.11 but has now come back in 2.12 and 2.13.

See also grpc/grpc-java#2813 (comment) and https://stackoverflow.com/questions/44899041/unable-to-build-grpc-managedchannel-with-scala for historical context.

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.