summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2024-02-25 12:22:21 +0100
committergit <svn-admin@ruby-lang.org>2024-02-28 18:30:42 +0000
commit567d4ee79e7f9847c8a5c3ee53d382f80480fe89 (patch)
tree64fdd98dc94fc0399cc8e21c225f49f11c48696d
parenta29c0e827f519f097bddfc3ddad5279d89131a7e (diff)
[ruby/prism] Set proper types for node[] in Java-generated code
https://github.com/ruby/prism/commit/322eaea500
-rwxr-xr-xprism/templates/template.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/prism/templates/template.rb b/prism/templates/template.rb
index d981b89592..79292ab691 100755
--- a/prism/templates/template.rb
+++ b/prism/templates/template.rb
@@ -161,7 +161,11 @@ module Prism
end
def java_type
- "Node[]"
+ if specific_kind
+ "#{specific_kind}[]"
+ else
+ "Node[]"
+ end
end
# TODO: unduplicate with NodeKindField