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

Import wildcards and implicit java.lang.* #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Brofian
Copy link
Owner

@Brofian Brofian commented Feb 8, 2025

Changes

  • The grammar and parser now allow for import wildcards like import java.lang.*
  • If no discrete import matches a simplified class name, every wildcard is tested (from first to last) as the package name of this class. The first match will be used for the fully qualified name, or otherwise the current package is used
  • If not specified explicitly, the semantic check will add the java.lang.* as an implicit import. This removes the requirement of importing classes like java.lang.String or java.lang.Object
  • This fixed a bug, where an implicit java.lang.Object parent would be converted to <current-package>.Object

This will resolve #21

@Brofian Brofian self-assigned this Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implicit java.lang.* imports
1 participant