Skip to content
Snippets Groups Projects
Commit 66daa5de authored by Hallvard Trætteberg's avatar Hallvard Trætteberg
Browse files

Fikset enda en feil

parent 7358cb2d
No related branches found
No related tags found
No related merge requests found
...@@ -89,8 +89,8 @@ public class Calc { ...@@ -89,8 +89,8 @@ public class Calc {
if (getOperandCount() < 2) { if (getOperandCount() < 2) {
throw new IllegalStateException("Too few operands (" + getOperandCount() + ") on the stack"); throw new IllegalStateException("Too few operands (" + getOperandCount() + ") on the stack");
} }
var op1 = popOperand();
var op2 = popOperand(); var op2 = popOperand();
var op1 = popOperand();
var result = op.apply(op1, op2); var result = op.apply(op1, op2);
pushOperand(result); pushOperand(result);
return result; return result;
......
...@@ -85,8 +85,8 @@ public class Calc { ...@@ -85,8 +85,8 @@ public class Calc {
if (getOperandCount() < 2) { if (getOperandCount() < 2) {
throw new IllegalStateException("Too few operands (" + getOperandCount() + ") on the stack"); throw new IllegalStateException("Too few operands (" + getOperandCount() + ") on the stack");
} }
var op1 = popOperand();
var op2 = popOperand(); var op2 = popOperand();
var op1 = popOperand();
var result = op.apply(op1, op2); var result = op.apply(op1, op2);
pushOperand(result); pushOperand(result);
return result; return result;
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>it1901</groupId>
<artifactId>modules-ui</artifactId> <artifactId>modules-ui</artifactId>
<parent> <parent>
......
...@@ -85,8 +85,8 @@ public class Calc { ...@@ -85,8 +85,8 @@ public class Calc {
if (getOperandCount() < 2) { if (getOperandCount() < 2) {
throw new IllegalStateException("Too few operands (" + getOperandCount() + ") on the stack"); throw new IllegalStateException("Too few operands (" + getOperandCount() + ") on the stack");
} }
var op1 = popOperand();
var op2 = popOperand(); var op2 = popOperand();
var op1 = popOperand();
var result = op.apply(op1, op2); var result = op.apply(op1, op2);
pushOperand(result); pushOperand(result);
return result; return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment