Bug 24792 - Inner interface's are not know inside package's
Summary: Inner interface's are not know inside package's
Status: RESOLVED DUPLICATE of bug 8544
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: ---
Assignee: Andrew Haley
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-11 12:11 UTC by Jakub Jelinek
Modified: 2005-11-11 12:12 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2005-11-11 12:11:11 UTC
#!/bin/sh
mkdir test_pack
cat > test_pack/DisplayRenderer.java <<EOF
package test_pack;
import test_pack.StyledText.*;
class DisplayRenderer
{
  StyledText text;
  DisplayRenderer (StyledText parent)
  {
    text = parent;
  }
  protected void test ()
  {
    LineCache lineCache;
  }
}
EOF
cat > test_pack/StyledText.java <<EOF
package test_pack;
public class StyledText
{
  LineCache lineCache;
  public StyledText (int a)
  {
  }
  public LineCache getCache ()
  {
    return lineCache;
  }
  interface LineCache
  {
    public void calculate (int startLine, int lineCount);
  }
}
EOF
gcj -C test_pack/*.java

gives
test_pack/DisplayRenderer.java:12: error: Type 'LineCache' not found in the declaration of the local variable 'lineCache'.
       LineCache lineCache;
       ^
1 error

Verified on HEAD.  For more details, see
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=172853
Comment 1 Jakub Jelinek 2005-11-11 12:12:43 UTC
Oops.

*** This bug has been marked as a duplicate of 8544 ***