Opened 16 years ago
Closed 16 years ago
#120 closed defect (fixed)
rejected initialization expression x+y
| Reported by: | Stephen Siegel | Owned by: | ywei |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | front | Version: | 1.0 |
| Keywords: | Cc: |
Description
This is rejected by front end:
void main() {
int x = 2;
int y = 3;
int z = x+y;
}
java.lang.RuntimeException: 4: Unknown variable name: x at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processLhs(TreeParser.java:1439) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processPrimaryExpr(TreeParser.java:914) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processPostfixExpr(TreeParser.java:866) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processUnaryExpr(TreeParser.java:829) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processMultiplicativeExpr(TreeParser.java:793) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processAdditiveExpr(TreeParser.java:768) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processRelationalExpr(TreeParser.java:727) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processEqualityExpr(TreeParser.java:699) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processLogicalAndExpr(TreeParser.java:680) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processLogicalOrExpr(TreeParser.java:662) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processIfThenElseExpr(TreeParser.java:631) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processAssignExpr(TreeParser.java:625) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processExpr(TreeParser.java:570) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processVarDeclBody(TreeParser.java:326) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processVariableList(TreeParser.java:544) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processFunctionBody(TreeParser.java:515) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processFunction(TreeParser.java:421) at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processAST(TreeParser.java:140) at edu.udel.cis.vsl.minimp.front.minimp.ModelExtractor.extract(ModelExtractor.java:29) at edu.udel.cis.vsl.minimp.front.minimp.ModelExtractor.extractModel(ModelExtractor.java:54) at arithmetic.ArithmeticTest.test(ArithmeticTest.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Change History (2)
comment:1 by , 16 years ago
| Status: | new → accepted |
|---|
comment:2 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.

Bug fixed.