Skip to content

Fix #9538: repl crashes when :type and :doc are invoked with an empty expression #9571

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

Merged
merged 3 commits into from
Aug 17, 2020

Conversation

december32
Copy link
Contributor

The :type and :doc commands now handle being invoked with an empty expression gracefully by printing the corresponding usage text, similar to the repl in Scala 2.

scala>:type
:type <expression>.

scala>:doc
:doc <expression>.

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

@december32 december32 force-pushed the fix-#9538-repl-crash branch from 60ea617 to 5122eaf Compare August 16, 2020 16:03
@december32 december32 force-pushed the fix-#9538-repl-crash branch from 5122eaf to d5e84f4 Compare August 16, 2020 16:06
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @december32 👍

Copy link
Contributor Author

@december32 december32 left a comment

Choose a reason for hiding this comment

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

Removed . from the usage text as suggested.

Co-authored-by: Fengyun Liu <liu@fengy.me>
@liufengyun liufengyun merged commit 4dbe0b7 into scala:master Aug 17, 2020
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.

3 participants