Skip to content

infix modifier lost when exporting a method/type #19301

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
soronpo opened this issue Dec 19, 2023 · 4 comments · Fixed by #19636
Closed

infix modifier lost when exporting a method/type #19301

soronpo opened this issue Dec 19, 2023 · 4 comments · Fixed by #19636
Assignees
Milestone

Comments

@soronpo
Copy link
Contributor

soronpo commented Dec 19, 2023

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.

@soronpo soronpo added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label area:export and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 19, 2023
@soronpo soronpo changed the title infix modifier lost when exporting a method infix modifier lost when exporting a method/type Dec 19, 2023
@bishabosha bishabosha self-assigned this Dec 19, 2023
@mbovel
Copy link
Member

mbovel commented Jan 31, 2024

@bishabosha could I use this issue for a spree?

@bishabosha bishabosha assigned mbovel and unassigned bishabosha Jan 31, 2024
@bishabosha bishabosha added the Spree Suitable for a future Spree label Jan 31, 2024
@bishabosha
Copy link
Member

@mbovel that sounds like a good idea!

@soronpo
Copy link
Contributor Author

soronpo commented Jan 31, 2024

Related issue is when exporting an identifier with annotations:
#19516

@scala-center-bot
Copy link

This issue was picked for the Issue Spree No. 42 of February 6th, 2024. @natsukagami, @kyouko-taiga, @hamzaremmal will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.

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.

5 participants