INRIA / INRIA/spoon

Inner classes reference fails with pretty print

Open
#4,001 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2k
Forks
392
Avg merge
11h 24m
Merged PRs (30d)
36

Description

A class defines two inner classes:

` public static class ByReference extends WFSALMCAPS implements Structure.ByReference {}

public static class ByValue extends WFSALMCAPS implements Structure.ByValue {}`

If spoon processes with PRETTY_PRINTING_MODE.FULLYQUALIFIED the references to the inner classes are correct:

`public class WFSALMCAPS extends com.ardan1.xfs.Structure `

But if spoon processes with PRETTY_PRINTING_MODE.AUTOIMPORT the references to the inner classes are incomplete (it does not compile):

` public class WFSALMCAPS extends Structure`

It should be:

`public class WFSALMCAPS extends Structure`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported WFSALMCAPS example with PRETTY_PRINTING_MODE.FULLYQUALIFIED and PRETTY_PRINTING_MODE.AUTOIMPORT, then trace the pretty-printing and import-resolution entry points. Done means AUTOIMPORT emits WFSALMCAPS.ByValue and WFSALMCAPS.ByReference so the generated Java source compiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.