Skip to content

Cannot export @tailrec method #19505

Closed
@adpi2

Description

@adpi2

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions