From 3697e887b3f61546865ca700df5ed2319b139ae7 Mon Sep 17 00:00:00 2001 From: Zedrichu Date: Sat, 13 May 2023 16:43:39 +0200 Subject: [PATCH] Fixed failure in build All tests passed/code is restructured QuLangProcessor ready for release --- QuLangProcessor/Compiler.fs | 8 ++++---- QuboxSimulator.sln.DotSettings.user | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/QuLangProcessor/Compiler.fs b/QuLangProcessor/Compiler.fs index 9469898..9a2545a 100644 --- a/QuLangProcessor/Compiler.fs +++ b/QuLangProcessor/Compiler.fs @@ -116,11 +116,11 @@ let rec internal evalArith (expr:ArithExpr) (memory:Map | _, Num 1 | _, Float 1.0 -> x1 | c, d when c=d -> Num 1 | BinaryOp(a, Mul, c), Num b -> - evalArith (BinaryOp(BinaryOp(a, Div, Num b), Mul, c)) memory + evalArith (BinaryOp(BinaryOp(a, Div, Float b), Mul, c)) memory | UnaryOp (Minus, a), _ -> evalArith (UnaryOp (Minus,BinaryOp(a,Div,y1))) memory - | Num w, _ -> try - interopA (/) (Float w) y1 - with _ -> BinaryOp(x1, Div, y1) + | _, _ -> try + interopA (/) x1 y1 + with _ -> BinaryOp(x1, Div, y1) | BinaryOp(x,Add, y) -> let x1 = evalArith x memory let y1 = evalArith y memory match x1, y1 with diff --git a/QuboxSimulator.sln.DotSettings.user b/QuboxSimulator.sln.DotSettings.user index 03448d3..853941f 100644 --- a/QuboxSimulator.sln.DotSettings.user +++ b/QuboxSimulator.sln.DotSettings.user @@ -33,7 +33,7 @@ - True + True True True @@ -61,10 +61,12 @@ True - True + True + True - /Users/adrianzvizdenco/Library/Caches/JetBrains/Rider2022.3/resharper-host/temp/Rider/vAny/CoverageData/_QuboxSimulator.853814830/Snapshot/snapshot.utdcvr + /Users/adrianzvizdenco/Library/Caches/JetBrains/Rider2023.1/resharper-host/temp/Rider/vAny/CoverageData/_QuboxSimulator.853814830/Snapshot/snapshot.utdcvr + <SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> <Solution /> </SessionState>