From df47757207a8e2bd777652fd9e08ef327dfc72ce Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Thu, 22 Aug 2024 21:44:33 +0900 Subject: [PATCH] Support MultiWriteNode with ClassVariableWriteNode --- lib/typeprof/core/ast.rb | 3 ++- scenario/variable/masgn.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/typeprof/core/ast.rb b/lib/typeprof/core/ast.rb index da9c31307..0abb9ebb9 100644 --- a/lib/typeprof/core/ast.rb +++ b/lib/typeprof/core/ast.rb @@ -249,7 +249,8 @@ def self.create_target_node(raw_node, lenv) LocalVariableWriteNode.new(raw_node, dummy_node, lenv) when :instance_variable_target_node InstanceVariableWriteNode.new(raw_node, dummy_node, lenv) - #when :class_variable_target_node + when :class_variable_target_node + ClassVariableWriteNode.new(raw_node, dummy_node, lenv) when :global_variable_target_node GlobalVariableWriteNode.new(raw_node, dummy_node, lenv) when :constant_target_node diff --git a/scenario/variable/masgn.rb b/scenario/variable/masgn.rb index 47fe370bc..a04383a21 100644 --- a/scenario/variable/masgn.rb +++ b/scenario/variable/masgn.rb @@ -24,4 +24,4 @@ def bar: -> Integer? end ## update -x, C, C::D::E, @iv, $gv, ary[0], foo.bar = 1, 2, 3, 4, 5, 6, 7 +x, C, C::D::E, @iv, @@cv, $gv, ary[0], foo.bar = 1, 2, 3, 4, 5, 6, 7, 8