Skip to content

Odd syntax error? #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devonpmack opened this issue Aug 25, 2022 · 1 comment
Closed

Odd syntax error? #151

devonpmack opened this issue Aug 25, 2022 · 1 comment

Comments

@devonpmack
Copy link

devonpmack commented Aug 25, 2022

This code gives a syntax error, but it's not clear why. It might be nice to either say, keyword arguments must come at the end, or show the red underline on the second argument.

image

Oddly, it works if we remove the T.must, so this might be a related bug.

image

module Foo
  class Bar
    extend T::Sig

    sig { void}
    def service
      nil
    end

    sig { void }
    def baz
      Job.perform_later(service:, T.must(name))
    end
  end
end
@devonpmack devonpmack changed the title Syntax error that's not a syntax error Odd syntax error? Aug 25, 2022
@devonpmack
Copy link
Author

Rubocop issue, not syntax tree

@devonpmack devonpmack closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2022
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

No branches or pull requests

1 participant