Skip to content

Conversation

@apiology
Copy link
Contributor

@apiology apiology commented Sep 25, 2025

This is a case where incorrect gates result in the wrong type being used - found by strong typechecking on a branch ::Solargraph::Pin::Symbol was resolved as ::Symbol in a generics scenario.

This is a case where incorrect gates result in the wrong type being
used - found by strong typechecking on a branch ::Solargraph::Pin::Symbol
was resolved as ::Symbol in a generics scenario.
@apiology apiology marked this pull request as draft September 25, 2025 21:39
@apiology apiology marked this pull request as ready for review September 26, 2025 13:39
I was hitting a strange 'works on my machine' issue and figured it out
that I wasn't seeing it because of a difference in where files lived
in CI vs my machine.  This resulted in different pin info being
selected during combination, as we were using the file location when
we had no better way to prefer one over the other.

This should make the result more consistent, making user and CI
pin-combination-triggered issues easier to reproduce.
# @param locals [::Array<Solargraph::Pin::LocalVariable, Solargraph::Pin::Parameter>]
# @return [::Array<Pin::Base>]
def inferred_pins pins, api_map, name_pin, locals
result = pins.map do |p|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call.rb could use a refactor for sure - we should keep that to a separate PR, though. Adding to rubocop todo file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant