diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-03-03 23:38:43 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-03-03 23:44:45 +0100 |
commit | 5225f00ab3300bac62a467ecc532c275e02e7f43 (patch) | |
tree | 7a4963de6b9d998f379fd0e00b6109f7bda464f3 /src/dotty/tools/dotc/typer/ProtoTypes.scala | |
parent | 0ae3ef2010b90bf06d76a768b0f0c5aa56c1180a (diff) | |
download | dotty-5225f00ab3300bac62a467ecc532c275e02e7f43.tar.gz dotty-5225f00ab3300bac62a467ecc532c275e02e7f43.tar.bz2 dotty-5225f00ab3300bac62a467ecc532c275e02e7f43.zip |
Do the implicit search shadowing check in the correct context
This commit fixes a very sneaky bug, the following code:
```
lazy val shadowing =
typed(untpd.Ident(ref.name) withPos pos.toSynthetic, funProto)
(nestedContext.addMode(Mode.ImplicitShadowing).setExploreTyperState)
```
is parsed by scalac as:
```
lazy val shadowing =
typed(untpd.Ident(ref.name) withPos pos.toSynthetic, funProto);
(nestedContext.addMode(Mode.ImplicitShadowing).setExploreTyperState);
```
So we don't actually use the nested context in `typed`, instead we end
up implicitly using `ctx`!
Diffstat (limited to 'src/dotty/tools/dotc/typer/ProtoTypes.scala')
0 files changed, 0 insertions, 0 deletions