Skip to content

Review for scala/scala#8716#92

Closed
retronym wants to merge 2 commits into2.13.xfrom
review/8716
Closed

Review for scala/scala#8716#92
retronym wants to merge 2 commits into2.13.xfrom
review/8716

Conversation

@retronym
Copy link
Owner

@retronym retronym commented Apr 8, 2020

Review for scala#8716

lrytz and others added 2 commits March 20, 2020 12:05
Introduce a typer mode to know when we're type checking a qualifier
of a select, or a function part of an application. When a stabilizing
qualifier is created, insert it once we get back out of this mode.

In `x.y.foo(bar)`, if `foo` has a second implicit argument list, make
sure that the block with the stabilizer is only created after the
implicit is inferred, i.e., run `adapt` on `$stabilizer.foo(bar)`
to get `$stabilizer.foo(bar)(<implicit arg>)` first, then create

```
{
  val $stabilizer = x.y
  $stabilizer.foo(bar)(<implicit arg>)
}
```

Before, we would create

```
{
  val $stabilizer = x.y
  $stabilizer.foo(bar)
}
```

then assign a `MethodType` to the block, and run `adapt`. This worked in
some situations by chance, but not always.
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