Skip to content

Cannot inline calls to private method after inlining #14048

Closed
@nicolasstucki

Description

@nicolasstucki

Compiler version

3.1.0

Minimized code

A similar issue happens with

class T:
  inline def foo(): Unit = bar()
  private inline def bar(): Unit = ()

def test(t: T) = t.foo()

Output

5 |def test(t: T) = t.foo()
  |                 ^^^^^^^
  |method bar cannot be accessed as a member of (T_this : (t : T)) from module class Foo$package$.
  | This location contains code that was inlined from Foo.scala:2

Expectation

Should compile.

This is similar to #14042.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions