From b9041ccff81a21e90210c0b230bb6a30853f5170 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 20 Jul 2021 17:24:45 -0600 Subject: [PATCH] make sure underlying C# clone error will fail loudly next time --- src/kiss/cloner/Cloner.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/kiss/cloner/Cloner.hx b/src/kiss/cloner/Cloner.hx index 801b47a..c1c19e6 100644 --- a/src/kiss/cloner/Cloner.hx +++ b/src/kiss/cloner/Cloner.hx @@ -107,6 +107,12 @@ class Cloner { } catch (s) { // There will be errors on C++ and C# when trying to assign to a member function. // They're not important, because the function will already be on the clone. + // However, some types won't clone properly on C#, and if that becomes a problem, tests should fail + #if cs + if (field != "breakPoints" && Std.string(s) == "Specified cast is not valid.") { + throw 'Failed to clone field $field on $inValue'; + } + #end } } return outValue;