From a978c9c38be6ef5c235f2e3062bd8c55e82367a0 Mon Sep 17 00:00:00 2001 From: Zachary Gramana Date: Thu, 18 Jan 2018 11:24:19 -0800 Subject: [PATCH] Fixes Mono build error when iterator contains typeof(char*) --- Naiad/CodeGeneration/AutoSerialization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Naiad/CodeGeneration/AutoSerialization.cs b/Naiad/CodeGeneration/AutoSerialization.cs index cbaeee6..e64d395 100644 --- a/Naiad/CodeGeneration/AutoSerialization.cs +++ b/Naiad/CodeGeneration/AutoSerialization.cs @@ -1239,7 +1239,7 @@ private IEnumerable GenerateStringDeserializeInstructions(CodeVar List stringStmts = new List(); stringStmts.Add(Assign(toDeserialize, - new CodeObjectCreateExpression(typeof(string), new CodeCastExpression(typeof(char*), currentPosition), Expr("0"), Var(lengthVar)))); + new CodeObjectCreateExpression(typeof(string), new CodeCastExpression("System.Char*", currentPosition), Expr("0"), Var(lengthVar)))); stringStmts.Add(Assign(currentPosition, new CodeBinaryOperatorExpression(currentPosition, CodeBinaryOperatorType.Add, BinOp(Var(lengthVar), CodeBinaryOperatorType.Multiply, Expr("sizeof(char)"))))); stringStmts.Add(Assign(bytesRemaining, new CodeBinaryOperatorExpression(bytesRemaining, CodeBinaryOperatorType.Subtract, BinOp(Var(lengthVar), CodeBinaryOperatorType.Multiply, Expr("sizeof(char)")))));