Improve REPL completion for class names and constructors#7833
Merged
SethTisue merged 2 commits intoscala:2.12.xfrom Mar 18, 2019
Merged
Improve REPL completion for class names and constructors#7833SethTisue merged 2 commits intoscala:2.12.xfrom
SethTisue merged 2 commits intoscala:2.12.xfrom
Conversation
Member
retronym
commented
Mar 8, 2019
The logic under all `allImportedSymbols` differed from `importedSymbol` by fruitlessly copmaring the import selector (a TermName) to the TypeName of the member of the import's prefix.
dwijnand
reviewed
Mar 8, 2019
src/repl/scala/tools/nsc/interpreter/PresentationCompilation.scala
Outdated
Show resolved
Hide resolved
5b30d91 to
55ba885
Compare
Member
Author
|
The next feature we need to support for showing the "def string" after an applied type tree.
|
som-snytt
reviewed
Mar 8, 2019
| case List() => List() | ||
| case List(ImportSelector(nme.WILDCARD, _, _, _)) => List(sym) | ||
| case ImportSelector(from, _, to, _) :: _ if from == sym.name => | ||
| case ImportSelector(from, _, to, _) :: _ if from == (if (from.isTermName) sym.name.toTermName else sym.name.toTypeName) => |
Contributor
There was a problem hiding this comment.
Does Name deserve name_== alongside weird string_==?
Member
Author
There was a problem hiding this comment.
I can't think of cases when it makes sense to equate Term/Type-names outside of import selectors, so I opted not to introduce a method on Name that might be misused.
Contributor
There was a problem hiding this comment.
OK, next time I'll just use string_== 😺
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.