Compiling the following program with oakc causes a NullPointerException:
interface bar {
abstract void doBar();
}
class foo implements bar {
public foo() {
}
static void main(String args[]) {
foo f = new foo();
}
}
oakc foo.oak
oak.lang.NullPointerException
at oak.tools.oak.ClassDefinition.addAbstractFields(ClassDefinition.oak:166)
at oak.tools.oak.ClassDefinition.getAbstractFields(ClassDefinition.oak:181)
at oak.tools.oak.ClassDefinition.isAbstract(ClassDefinition.oak:153)
at oak.tools.tree.NewInstanceExpression.checkValue(NewInstanceExpression.oak)
at oak.tools.tree.Expression.checkInitializer(Expression.oak)
at oak.tools.tree.VarDeclarationStatement.checkDeclaration(VarDeclarationStatement.oak)
at oak.tools.tree.DeclarationStatement.check(DeclarationStatement.oak)
at oak.tools.tree.CompoundStatement.check(CompoundStatement.oak)
at oak.tools.tree.Statement.checkMethod(Statement.oak)
at oak.tools.oakc.SourceField.check(SourceField.oak)
oakc: an exception has occurred, please contact x47242.
interface bar {
abstract void doBar();
}
class foo implements bar {
public foo() {
}
static void main(String args[]) {
foo f = new foo();
}
}
oakc foo.oak
oak.lang.NullPointerException
at oak.tools.oak.ClassDefinition.addAbstractFields(ClassDefinition.oak:166)
at oak.tools.oak.ClassDefinition.getAbstractFields(ClassDefinition.oak:181)
at oak.tools.oak.ClassDefinition.isAbstract(ClassDefinition.oak:153)
at oak.tools.tree.NewInstanceExpression.checkValue(NewInstanceExpression.oak)
at oak.tools.tree.Expression.checkInitializer(Expression.oak)
at oak.tools.tree.VarDeclarationStatement.checkDeclaration(VarDeclarationStatement.oak)
at oak.tools.tree.DeclarationStatement.check(DeclarationStatement.oak)
at oak.tools.tree.CompoundStatement.check(CompoundStatement.oak)
at oak.tools.tree.Statement.checkMethod(Statement.oak)
at oak.tools.oakc.SourceField.check(SourceField.oak)
oakc: an exception has occurred, please contact x47242.