OL.jav funktioniert nicht #177

Closed
opened 2015-09-23 22:50:25 +00:00 by pl · 1 comment
Owner

class OL {

Integer m(Integer x) { return x + x; }

Boolean m(Boolean x) {return x || x; }

}

class Main {

main(x) { 
	ol;
	ol = new OL();
	return ol.m(x);
}

}

Fehlermeldung:

java.lang.Error: Unresolved compilation problem:
The type Binary must implement the inherited abstract method Statement.genByteCode(ClassGenerator)

at de.dhbwstuttgart.syntaxtree.statement.Binary.genByteCode(Binary.java:47)
at de.dhbwstuttgart.syntaxtree.statement.Return.genByteCode(Return.java:138)
at de.dhbwstuttgart.syntaxtree.statement.Block.genByteCode(Block.java:264)
at de.dhbwstuttgart.bytecode.MethodGenerator.createMethod(MethodGenerator.java:26)
at de.dhbwstuttgart.syntaxtree.Method.genByteCode(Method.java:772)
at de.dhbwstuttgart.syntaxtree.Class.genByteCode(Class.java:103)
at de.dhbwstuttgart.syntaxtree.SourceFile.generateBytecode(SourceFile.java:1840)
at de.dhbwstuttgart.core.MyCompiler.generateBytecode(MyCompiler.java:868)
at bytecode.SingleClassTester.compileToBytecode(SingleClassTester.java:22)
at bytecode.OL.test(OL.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
class OL { Integer m(Integer x) { return x + x; } Boolean m(Boolean x) {return x || x; } } class Main { main(x) { ol; ol = new OL(); return ol.m(x); } } Fehlermeldung: java.lang.Error: Unresolved compilation problem: The type Binary must implement the inherited abstract method Statement.genByteCode(ClassGenerator) at de.dhbwstuttgart.syntaxtree.statement.Binary.genByteCode(Binary.java:47) at de.dhbwstuttgart.syntaxtree.statement.Return.genByteCode(Return.java:138) at de.dhbwstuttgart.syntaxtree.statement.Block.genByteCode(Block.java:264) at de.dhbwstuttgart.bytecode.MethodGenerator.createMethod(MethodGenerator.java:26) at de.dhbwstuttgart.syntaxtree.Method.genByteCode(Method.java:772) at de.dhbwstuttgart.syntaxtree.Class.genByteCode(Class.java:103) at de.dhbwstuttgart.syntaxtree.SourceFile.generateBytecode(SourceFile.java:1840) at de.dhbwstuttgart.core.MyCompiler.generateBytecode(MyCompiler.java:868) at bytecode.SingleClassTester.compileToBytecode(SingleClassTester.java:22) at bytecode.OL.test(OL.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71) at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Owner

Im Zuge von Enricos Studienarbeit behoben.

Im Zuge von Enricos Studienarbeit behoben.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: JavaTX/JavaCompilerCore#177
No description provided.