Skip to content

Conversation

@retronym
Copy link
Member

@retronym retronym commented Mar 8, 2019

Welcome to Scala 2.12.9-20190308-043616-e9bd65d (OpenJDK 64-Bit Server VM, Java 1.8.0-adoptopenjdk).
Type in expressions for evaluation. Or try :help.

scala> class Shazam(i :Int) { def this(s: String)(i: Int) = this(0) }
defined class Shazam

scala> new Sh
Shazam   Short

scala> new Shazam
   def <init>(i: Int): Shazam   def <init>(s: String)(i: Int): Shazam

scala> new Shazam

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.
@scala-jenkins scala-jenkins added this to the 2.12.9 milestone Mar 8, 2019
@retronym retronym requested a review from SethTisue March 8, 2019 05:32
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

👍

@retronym retronym force-pushed the topic/completion-new branch from 5b30d91 to 55ba885 Compare March 8, 2019 05:49
@retronym
Copy link
Member Author

retronym commented Mar 8, 2019

The next feature we need to support for showing the "def string" after an applied type tree.

new Some[String]<TAB> or identity[String]<TAB>.

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) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Does Name deserve name_== alongside weird string_==?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, next time I'll just use string_== 😺

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.

5 participants