Skip to content

infix modifier lost when exporting a method/type #19301

Closed
@soronpo

Description

@soronpo

Compiler version

3.4.0-RC1-bin-20231207-16f1680-NIGHTLY

Minimized code

object Extensions:
  extension (arg1: Int) infix def X (arg2: Int): Int = arg1 * arg2
  infix type X[A, B]
export Extensions.*
val x = 1 X 2
type Foo = Int X Int

Output

Alphanumeric method X is not declared infix; it should not be used as infix operator.
Instead, use method syntax .X(...) or backticked identifier `X`.
The latter can be rewritten automatically under -rewrite -source 3.4-migration.
Alphanumeric type X is not declared infix; it should not be used as infix operator.
Instead, use prefix syntax X[...] or backticked identifier `X`.
The latter can be rewritten automatically under -rewrite -source 3.4-migration.

Expectation

No warning.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions