Skip to content

Extension method returning implicit function can not be found #7070

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
aappddeevv opened this issue Aug 20, 2019 · 2 comments
Closed

Extension method returning implicit function can not be found #7070

aappddeevv opened this issue Aug 20, 2019 · 2 comments
Labels
area:implicits related to implicits itype:bug

Comments

@aappddeevv
Copy link

aappddeevv commented Aug 20, 2019

minimized code

def (str: String) foo: given Unit => Int = ???

given as Unit = ()

val strFoo = "".foo

gives error:

-- [E008] Member Not Found Error: local/ExtensionGiven.scala:5:16 --------------
5 |val strFoo = "".foo
  |             ^^^^^^
  |          value foo is not a member of String - did you mean String("").+?
one error found

expectation

Compile without errors.

Related to #7056?

@aappddeevv aappddeevv changed the title extension methods and implicit functions extension methods and implicit functions do not work together Aug 20, 2019
@bishabosha
Copy link
Member

I've minimised the example

@bishabosha bishabosha changed the title extension methods and implicit functions do not work together Extension method returning implicit function can not be found Aug 22, 2019
@bishabosha bishabosha added the area:implicits related to implicits label Aug 22, 2019
odersky added a commit to dotty-staging/dotty that referenced this issue Aug 25, 2019
anatoliykmetyuk added a commit that referenced this issue Aug 26, 2019
Fix #7070: Allow for inserted applies when checking extension methods
@aappddeevv
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:implicits related to implicits itype:bug
Projects
None yet
Development

No branches or pull requests

2 participants