Shopify / rbi-central

MIT License
55 stars 36 forks source link

Fix incorrect usages of `T.nilable(X, Y)` in signatures #271

Closed Morriar closed 1 month ago

Morriar commented 1 month ago

Type of Change

Changes

In both lhm and lhm-shopify signatures contained calls to T.nilable with more than one type. This is an error in Ruby files and should be an error in RBI files (once https://github.com/sorbet/sorbet/issues/8054 is fixed).

Morriar commented 1 month ago

how did you stumble into these?

I'm trying a type parser I want to add to rbi and I'm finding all kinds of fun things.

do they even typecheck correctly?

It just behaves as untyped which seems wrong, hence the issue mentioned earlier.