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

SI-9937 find nested java classes if InnerClass entry is missing #5822

Merged
merged 1 commit into from
Jun 21, 2017

Commits on Jun 16, 2017

  1. SI-9937 find nested java classes if InnnerClass entry is missing

    When a classfile has a reference to an inner class C$D but no
    InnerClass entry for it, the classfile parser would use the
    top-level symbol C$D. In a different classfile, if there's also
    a reference to C$D, but the InnerClass entry exists, the
    symbol D owned by C (C.D) would be used. Therefore the two
    signatures would be incompatible, which can lead to a spurious
    type error.
    
    Also, when an inner symbol C.D is resolved, the top-level
    symbol C$D is invalidated and removed from the scope. A
    subsequent lookup of the top-level symbol C$D (from a classfile
    with a missing InnerClass entry) would fail.
    
    This patch identifies the case when a class name containing
    a $ is being looked up in a package. It splits the name, resolves
    the outer class, and then searches for a member class.
    lrytz committed Jun 16, 2017
    Configuration menu
    Copy the full SHA
    04d4f4c View commit details
    Browse the repository at this point in the history