Skip to content
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

Fix signature for Enumerable#find. #437

Merged
merged 1 commit into from Oct 28, 2020
Merged

Fix signature for Enumerable#find. #437

merged 1 commit into from Oct 28, 2020

Conversation

marcandre
Copy link
Member

I wanted to put the interface declaration just above find, but I was getting an error:

/Users/mal/ruby/rbs/lib/rbs/errors.rb:122:in `check!': /Users/mal/ruby/rbs/stdlib/builtin/enumerable.rbs:323:26...323:30: Could not find Elem (RBS::NoTypeFoundError)

Is this a bug?

@soutaro
Copy link
Member

soutaro commented Oct 19, 2020

@marcandre Generics parameters are local in class, module, and interface. So you anyway need to write _NotFound[T] even if it is written inside Enumerable.

@marcandre
Copy link
Member Author

marcandre commented Oct 19, 2020

@marcandre Generics parameters are local in class, module, and interface. So you anyway need to write _NotFound[T] even if it is written inside Enumerable.

Yes, I understand that. I opened #440 to show you.

I rebased this PR to fix conflict.

@marcandre
Copy link
Member Author

PR changed now that bug #440 is fixed.

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

🎉

@soutaro soutaro merged commit 6e9b98e into ruby:master Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants