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

No occurence generated with implicit parameter #2206

Open
tgodzik opened this issue Dec 31, 2020 · 0 comments
Open

No occurence generated with implicit parameter #2206

tgodzik opened this issue Dec 31, 2020 · 0 comments

Comments

@tgodzik
Copy link
Collaborator

tgodzik commented Dec 31, 2020

 occurrences(
    """|object O {
       |  implicit val farewell = "farewell"
       |  case class Split() {
       |    def withSingleLine(
       |        expire: Int,
       |        exclude: => Boolean = false,
       |    )(implicit line: String): Int = 1
       |  }
       |  val expireToken = 123
       |  Split().withSingleLine(expireToken)
       |}
    """.stripMargin,
    """|[0:7..0:8): O <= _empty_/O.
       |[1:15..1:23): farewell <= _empty_/O.farewell.
       |[2:13..2:18): Split <= _empty_/O.Split#
       |[2:18..2:18):  <= _empty_/O.Split#`<init>`().
       |[3:8..3:22): withSingleLine <= _empty_/O.Split#withSingleLine().
       |[4:8..4:14): expire <= _empty_/O.Split#withSingleLine().(expire)
       |[4:16..4:19): Int => scala/Int#
       |[5:8..5:15): exclude <= _empty_/O.Split#withSingleLine().(exclude)
       |[5:20..5:27): Boolean => scala/Boolean#
       |[6:15..6:19): line <= _empty_/O.Split#withSingleLine().(line)
       |[6:21..6:27): String => scala/Predef.String#
       |[6:30..6:33): Int => scala/Int#
       |[8:6..8:17): expireToken <= _empty_/O.expireToken.
       |[9:2..9:7): Split => _empty_/O.Split.
       |[9:10..9:24): withSingleLine => _empty_/O.Split#withSingleLine().
       |[9:25..9:36): expireToken => _empty_/O.expireToken.
       |""".stripMargin
  )

gets an error:

=> Diff (- obtained, + expected)
 [9:10..9:24): withSingleLine => _empty_/O.Split#withSingleLine().
-[9:25..9:36): expireToken => local1
+[9:25..9:36): expireToken => _empty_/O.expireToken.

It seems a wrong symbol is being returned here by the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant