Skip to content

Remove @forceInline from the inlining doc #11766

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
japgolly opened this issue Mar 16, 2021 · 1 comment · Fixed by #11770
Closed

Remove @forceInline from the inlining doc #11766

japgolly opened this issue Mar 16, 2021 · 1 comment · Fixed by #11770

Comments

@japgolly
Copy link
Contributor

According to https://dotty.epfl.ch/docs/reference/metaprogramming/inline.html,

To cross compile between both Scala 3 and Scala 2, we introduce a new @forceInline
annotation which is equivalent to the new inline modifier. Note that
Scala 2 ignores the @forceInline annotation, so one must use both
annotations to guarantee inlining for Scala 3 and at the same time hint inlining
for Scala 2 (i.e. @forceInline @inline).

but it seems that @forceInline was removed in #7475. The documentation should be updated.

Note: I don't know what the replacement solution for cross-compilation is so if someone could share that'd be awesome.

@japgolly
Copy link
Contributor Author

Sorry @nicolasstucki so just to confirm, there's no replacement for this? There's still only @inline which Scala 3 will treat the way Scala 2 does?

michelou pushed a commit to michelou/scala3 that referenced this issue Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants