ChaiScript icon indicating copy to clipboard operation
ChaiScript copied to clipboard

Class with type_conversion from int and "==" operator causes switch s…

Open dinghram opened this issue 7 years ago • 5 comments

…tatement to compare destroyed objects

I added a Function_Push_Pop to save the match_value and the value from evaluating the case statement. This makes the code look like Fold_Right_Binary_Operator_AST_Node::do_oper, which does not have the same defect behavior.

Issue this pull request references: #421

Changes proposed in this pull request

  • chaiscript_eval.hpp: Switch_AST_Node::eval_internal

dinghram avatar Mar 05 '18 18:03 dinghram

Codecov Report

Merging #422 into develop will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #422      +/-   ##
===========================================
+ Coverage    71.99%   71.99%   +<.01%     
===========================================
  Files           59       59              
  Lines        10858    10859       +1     
===========================================
+ Hits          7817     7818       +1     
  Misses        3041     3041
Impacted Files Coverage Δ
include/chaiscript/language/chaiscript_eval.hpp 95.57% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ef47b45...d68ba51. Read the comment docs.

codecov-io avatar Mar 05 '18 18:03 codecov-io

Mind resolving the conflict if this is still relevant? Thanks!

RobLoach avatar Nov 01 '18 21:11 RobLoach

Hi, Rob. The current Develop branch cannot seem to compile with Visual Studio 2017 15.8.8 with /std:c++17 and /permissive- due to the usage of constexpr that doesn't seem to work:

proxy_functions.hpp line 80: constexpr auto dynamic_object_type_info = user_type<Dynamic_Object>();

If I can't compile, I can't verify that we still need the bug fix and can't verify that the merged code works properly.

Thanks, Don Inghram

On Thu, Nov 1, 2018 at 3:51 PM Rob Loach [email protected] wrote:

Mind resolving the conflict if this is still relevant? Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChaiScript/ChaiScript/pull/422#issuecomment-435199663, or mute the thread https://github.com/notifications/unsubscribe-auth/AWCfOXW-DyZf1YFXmyFlEwyFOlOgp_Ggks5uq2zxgaJpZM4ScvdR .

dinghram avatar Nov 02 '18 16:11 dinghram

Even with the constexpr changes in place there still one more compiler bug in MSVC, I just sent in a bug report for it, hopefully at some point in the near future we can get it working again.

lefticus avatar Dec 28 '18 18:12 lefticus

Great, looking forward to it.

Don

On Fri, Dec 28, 2018, 11:48 AM Jason Turner [email protected] wrote:

Even with the constexpr changes in place there still one more compiler bug in MSVC, I just sent in a bug report for it, hopefully at some point in the near future we can get it working again.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChaiScript/ChaiScript/pull/422#issuecomment-450408520, or mute the thread https://github.com/notifications/unsubscribe-auth/AWCfOUE3cOo6ElnyId85Ng7T8WqGNFWAks5u9meTgaJpZM4ScvdR .

dinghram avatar Dec 28 '18 20:12 dinghram