Skip to content

Regression: inline extension methods fail to pick arguments being passed #9828

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

Closed
rcano opened this issue Sep 19, 2020 · 0 comments
Closed
Assignees

Comments

@rcano
Copy link

rcano commented Sep 19, 2020

Minimized code

extension [S](f: S => Int) inline def f(s: String) = "test"
def testStuff =  ((s: String) => 42).f("foo")

Output

def test = ((s: String) => 42).f("foo")
             ^^^^^^^^^^^^^^^^
             missing arguments for inline method method extension_f

Expectation

it should compile, just like this

extension [S](f: S => Int) def f(s: String) = "test"
def testStuff =  ((s: String) => 42).f("foo")

which is the exact same definition except method f is no longer inline

@odersky odersky self-assigned this Sep 19, 2020
nicolasstucki added a commit that referenced this issue Sep 23, 2020
Fix #9828: Add missing case for adapt of ExpMethodApply results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants