summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2021-04-15 14:16:55 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:33 -0400
commitedaf12def626a2b06fc2cf9bf53db9b0f45b88ac (patch)
tree0bce49352b5975958fb1b96d4d1f7e889765b275 /bootstraptest
parent791f20af6e9a5db37e69ed33c6b91fc15d9fe824 (diff)
Fix local type tracking in getlocal, setlocal. Add test.
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index fcda5476ea..2da9086a60 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -89,6 +89,20 @@ assert_equal '0', %q{
retval = foo()
}
+# Passing argument types to callees
+assert_equal '8.5', %q{
+ def foo(x, y)
+ x + y
+ end
+
+ def bar
+ foo(7, 1.5)
+ end
+
+ bar
+ bar
+}
+
# Recursive Ruby-to-Ruby calls
assert_equal '21', %q{
def fib(n)