Skip to content

Conversation

@liufengyun
Copy link
Contributor

@liufengyun liufengyun commented Jul 19, 2019

The logic was introduced in f618e47, which is hard to justify.
The problem is exhibited in tests/pos/i6142.scala, where
we have code lik the following:

    implicit val _: scala.quoted.Type = ...
    {
      def $anon$ = _
      closure($anon$)
    }

Changing the type of _ will break LambdLift (_ is not free anymore),
and the compiler crashes at backend when generating code for the unfound local variable _,
whose symbol is scala.quoted.Type.

The logic was introduced in f618e47, which is hard to justify.
The problem is exhibited in tests/pos/i6142.scala, where
we have code lik the following:

    implicit val _: scala.quoted.Type = ...
    {
      def $anon$ = _
      closure($anon$)
    }

Changing the type of `_` will break LambdLift (`_` is not free anymore),
and the compiler crashes at backend when generating code for the unfound local variable `_`,
whose symbol is `scala.quoted.Type`.
@liufengyun liufengyun requested a review from odersky July 19, 2019 21:03
@nicolasstucki nicolasstucki merged commit 6f59aa9 into scala:master Jul 24, 2019
@nicolasstucki nicolasstucki deleted the fix-6142 branch July 24, 2019 04:54
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.

2 participants