Skip to content

Error involving inlined code #2404

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
julienrf opened this issue May 9, 2017 · 2 comments
Closed

Error involving inlined code #2404

julienrf opened this issue May 9, 2017 · 2 comments

Comments

@julienrf
Copy link
Contributor

julienrf commented May 9, 2017

The following code fails to compile with the following error:

[error] 84 |  @`inline` final def ++ [V2 >: V](xs: collection.Iterable[(K, V2)]): CC[K, V2] = concat(xs)
[error]    |                                                                                  ^^^^^^
[error]    |value of type <nonsensical><notype></nonsensical> does not take type parameters
[error]    | This location is in code that was inlined at /home/travis/build/scala/collection-strawman/src/main/scala/strawman/collection/immutable/HashMap.scala:106

I’ll try to minimize the test case.

@julienrf
Copy link
Contributor Author

It seems that the error is not due to inlining but to overloading, and it seems to be fixed by #2408.

@odersky
Copy link
Contributor

odersky commented May 11, 2017

I think it was a combination of inlining and overloading. Overloading resolution depends on signatures, and signatures were broken by inlining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants