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

Misleading compile error message in wildcard exports #18031

Closed
antognini opened this issue Jun 21, 2023 · 5 comments · Fixed by #18189
Closed

Misleading compile error message in wildcard exports #18031

antognini opened this issue Jun 21, 2023 · 5 comments · Fixed by #18189
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug Spree Suitable for a future Spree
Milestone

Comments

@antognini
Copy link

Compiler version

3.3.0

Minimized code

object A:
  val x, y, z = 0

object B:
  export A.{*, x as _} // compile error at this line

Output

named imports cannot follow wildcard imports
  export A.{*, x as _}

Expectation

The compiler correctly stops, but there are no import statements involved; the error message should be

named exports cannot follow wildcard exports
  export A.{*, x as _}
@antognini antognini added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 21, 2023
@odersky odersky added area:reporting Error reporting including formatting, implicit suggestions, etc Spree Suitable for a future Spree and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 24, 2023
@odersky
Copy link
Contributor

odersky commented Jun 24, 2023

This could be a good first issue for a someone joining a spree.

@scala-center-bot
Copy link

This issue was picked for the Issue Spree No. 33 of 11 July 2023 which takes place in 7 days. @mbovel, @KuceraMartin, @clavigne will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.

@mbovel
Copy link
Member

mbovel commented Jul 11, 2023

@clavigne as this is your first Spree, welcome!

To get started hacking on the Dotty codebase, you will need to clone it, compile it and open it in VS Code using the following commands:

git clone https://github.com/lampepfl/dotty.git
cd dotty
sbt compile
code .

Then you will need to setup Metals to use the SBT build server. To do it, run the "Switch Build Server" VS Code command (by default the shortcut to open the VS Code command palette is control-⇧-P):

image image

To learn more: https://dotty.epfl.ch/docs/contributing/getting-started.html.

@clavigne
Copy link
Contributor

Hi @mbovel, thanks for the instructions! I'll be using Intellij if that's ok, I'm much more familiar with it than with VSCode. Talk to you soon!

KuceraMartin pushed a commit to KuceraMartin/dotty that referenced this issue Jul 11, 2023
closes scala#18031

Co-authored-by: Matt Bovel <[email protected]>
Co-authored-by: Cyrille Lavigne <[email protected]>
mbovel added a commit that referenced this issue Jul 12, 2023
closes #18031

Co-authored-by: Matt Bovel <[email protected]>
Co-authored-by: Cyrille Lavigne <[email protected]>
@Kordyjan Kordyjan added this to the 3.4.0 milestone Aug 1, 2023
Kordyjan pushed a commit that referenced this issue Nov 23, 2023
closes #18031

Co-authored-by: Matt Bovel <[email protected]>
Co-authored-by: Cyrille Lavigne <[email protected]>

[Cherry-picked a553539]
Kordyjan pushed a commit that referenced this issue Nov 29, 2023
closes #18031

Co-authored-by: Matt Bovel <[email protected]>
Co-authored-by: Cyrille Lavigne <[email protected]>

[Cherry-picked a553539]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug Spree Suitable for a future Spree
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants