-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.1_02
-
generic
-
generic
:
Name: sk89920 Date: 06/04/99
Solaris_JDK_1.2.1_02/bin/javac fails to compile the
following class. The source looks ok to me:
---
public class Test
{
private abstract class UserTreeNode
{
// remove "protected" here and it compiles
protected class BIStates
{
}
protected abstract String treeLabel();
}
private class Block_TreeNode
extends UserTreeNode
{
// move this class def behind treeLabel() and it compiles
protected class BlockBIStates extends BIStates
{
}
protected String treeLabel()
{
return "";
}
}
}
--
Javac reports:
# Solaris_JDK_1.2.1_02/bin/javac Test.java
Test.java:19: The method String treeLabel() declared in inner class Test. Block_TreeNode cannot override the method of the same signature declared in inner class Test. UserTreeNode. They must have the same return type.
protected String treeLabel()
^
1 error
Exit 1
(Review ID: 83356)
======================================================================
Name: sk89920 Date: 06/04/99
Solaris_JDK_1.2.1_02/bin/javac fails to compile the
following class. The source looks ok to me:
---
public class Test
{
private abstract class UserTreeNode
{
// remove "protected" here and it compiles
protected class BIStates
{
}
protected abstract String treeLabel();
}
private class Block_TreeNode
extends UserTreeNode
{
// move this class def behind treeLabel() and it compiles
protected class BlockBIStates extends BIStates
{
}
protected String treeLabel()
{
return "";
}
}
}
--
Javac reports:
# Solaris_JDK_1.2.1_02/bin/javac Test.java
Test.java:19: The method String treeLabel() declared in inner class Test. Block_TreeNode cannot override the method of the same signature declared in inner class Test. UserTreeNode. They must have the same return type.
protected String treeLabel()
^
1 error
Exit 1
(Review ID: 83356)
======================================================================