Skip to content
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

Cannot export @tailrec method #19505

Closed
adpi2 opened this issue Jan 22, 2024 · 0 comments · Fixed by #19509
Closed

Cannot export @tailrec method #19505

adpi2 opened this issue Jan 22, 2024 · 0 comments · Fixed by #19509
Assignees
Milestone

Comments

@adpi2
Copy link
Member

adpi2 commented Jan 22, 2024

Compiler version

3.3.1

Minimized code

import scala.annotation.tailrec

object Foo:
  @tailrec
  def foo: Int = foo

object Bar:
  export Foo.foo

Output

-- [E097] Syntax Error: --------------------------------------------------------
9 |  export Foo.foo
  |             ^
  |TailRec optimisation not applicable, method foo contains no recursive calls

Expectation

I should be able to export a @tailrec method.

@adpi2 adpi2 added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 22, 2024
@nicolasstucki nicolasstucki added area:export and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 22, 2024
@nicolasstucki nicolasstucki self-assigned this Jan 22, 2024
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 22, 2024
@Kordyjan Kordyjan added this to the 3.4.1 milestone Feb 14, 2024
WojciechMazur pushed a commit that referenced this issue Jun 27, 2024
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.

3 participants