Skip to content

Wrong type signature in method chaining #16779

Open
@cagritepebasili

Description

@cagritepebasili

Compiler version

Scala Version: 3.2.1

Minimized code

dependencies:

Maven dependencies:

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-bom</artifactId>
                <version>2020.0.6</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
</dependencyManagement>

<dependency>
            <groupId>io.projectreactor.netty</groupId>
            <artifactId>reactor-netty-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.projectreactor.netty</groupId>
            <artifactId>reactor-netty-http</artifactId>
</dependency>
HttpClient.create().get().uri("").responseContent().aggregate().asString()

Output

value responseContent is not a member of reactor.netty.http.client.HttpClient#ResponseReceiver'

Expectation

This code doesn't compile due to 'value responseContent is not a member of reactor.netty.http.client.HttpClient#ResponseReceiver'. Same code compiles in Java. What am I missing ?

Interesting note that, I got error highlights for this piece of code in Intellij IDEA but it was worked in Scala 2.13.x anyway. I upgraded Scala version to 3 and this code no longer compiles.

Also i get same errors in some Spring Framework methods. Somehow in method chaining interface types get lost. This issue #16724 might be related with this.

scala-netty-reactor.zip

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions