diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2024-01-09 10:12:03 -0800 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-01-10 15:24:26 +0000 |
commit | 881c5a1846c220662a4ad49208a28fe0287b3c58 (patch) | |
tree | 2c88efc963b38b2adf3325a35f3703ea69f13b55 /test/prism/snapshots/seattlerb/difficult3__9.txt | |
parent | 8940922d1889f885d4f26b4c815beb136a9a2095 (diff) |
[ruby/prism] Add a "repeated flag" to parameter nodes
It's possible to repeat parameters in method definitions like so:
```ruby
def foo(_a, _a)
end
```
The compiler needs to know to adjust the local table size to account for
these duplicate names. We'll use the repeated parameter flag to account
for the extra stack space required
https://github.com/ruby/prism/commit/b443cb1f60
Co-Authored-By: Kevin Newton <kddnewton@gmail.com>
Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
Diffstat (limited to 'test/prism/snapshots/seattlerb/difficult3__9.txt')
-rw-r--r-- | test/prism/snapshots/seattlerb/difficult3__9.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/prism/snapshots/seattlerb/difficult3__9.txt b/test/prism/snapshots/seattlerb/difficult3__9.txt index 98e1771a77..eec21b775c 100644 --- a/test/prism/snapshots/seattlerb/difficult3__9.txt +++ b/test/prism/snapshots/seattlerb/difficult3__9.txt @@ -22,6 +22,7 @@ │ │ @ ParametersNode (location: (1,5)-(1,12)) │ │ ├── requireds: (length: 2) │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ ├── flags: ∅ │ │ │ │ └── name: :a │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,12)) │ │ │ ├── lefts: (length: 0) @@ -30,6 +31,7 @@ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" │ │ │ │ └── expression: │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ │ ├── flags: ∅ │ │ │ │ └── name: :b │ │ │ ├── rights: (length: 0) │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" |