aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/ProtoTypes.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-15 12:08:42 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:12:28 +0200
commitb5132e87afe1a98467369d2f91ba4483a6a88ea4 (patch)
treef8fca34ccef6c3b9ff5d9d7f971f30aabd84a2e1 /src/dotty/tools/dotc/typer/ProtoTypes.scala
parent84bc770bb7bcac2fe09a13c62c24aac1e3fda582 (diff)
downloaddotty-b5132e87afe1a98467369d2f91ba4483a6a88ea4.tar.gz
dotty-b5132e87afe1a98467369d2f91ba4483a6a88ea4.tar.bz2
dotty-b5132e87afe1a98467369d2f91ba4483a6a88ea4.zip
Change owner as necessary when typing a TypedSplice
When typing an untpd.TypedSplice it could be that the owner at the time the tree is originally typed is different from the owner at the time the tree is unwrapped. In that case the owner needs to be changed. Problem was noticed in Course-2002-02 after changing Closure to be a pure expression. This means that TypedSplices containing closures are no longer lifted out from containing closures during eta expansion, and the owner chain got corrupted.
Diffstat (limited to 'src/dotty/tools/dotc/typer/ProtoTypes.scala')
-rw-r--r--src/dotty/tools/dotc/typer/ProtoTypes.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/ProtoTypes.scala b/src/dotty/tools/dotc/typer/ProtoTypes.scala
index 80f0fd186..0e6697fb7 100644
--- a/src/dotty/tools/dotc/typer/ProtoTypes.scala
+++ b/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -299,7 +299,7 @@ object ProtoTypes {
}
class UnapplyFunProto(argType: Type, typer: Typer)(implicit ctx: Context) extends FunProto(
- untpd.TypedSplice(dummyTreeOfType(argType)) :: Nil, WildcardType, typer)
+ untpd.TypedSplice(dummyTreeOfType(argType))(ctx) :: Nil, WildcardType, typer)
/** A prototype for expressions [] that are type-parameterized:
*