Skip to content

Commit f831cdf

Browse files
mameclaude
andcommitted
Add known bug for splat fallback with union types
When [*x] has x typed as Array[T] | Symbol, the Symbol side doesn't get wrapped as [Symbol] because to_a succeeds for the Array side, making @ary non-empty and skipping the fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d5e7aa6 commit f831cdf

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## update
2+
def foo(x)
3+
[*x]
4+
end
5+
6+
foo([:int])
7+
foo(:sym)
8+
9+
## assert
10+
class Object
11+
def foo: (Array[:int] | :sym) -> Array[:int | :sym]
12+
end

0 commit comments

Comments
 (0)