diff options
author | Martin Odersky <odersky@gmail.com> | 2014-11-04 20:19:06 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-11-09 19:08:59 +0100 |
commit | 1fad64325e2f457dee76629a8cf8c9427e931412 (patch) | |
tree | e3fa218c278d7fec852ab3f2067322b57e0e2bc1 /src | |
parent | 3299df8baf74564627d474d47a26605b5e02a6d9 (diff) | |
download | dotty-1fad64325e2f457dee76629a8cf8c9427e931412.tar.gz dotty-1fad64325e2f457dee76629a8cf8c9427e931412.tar.bz2 dotty-1fad64325e2f457dee76629a8cf8c9427e931412.zip |
Select operations in erasure should fix symbols in types.
Otherwise we get binding races, e.g. for pos/t2133.scala after mixin
because we create same-named symbols in subclasses, and type refs now
can refer to the subclass symbol where previously they refereed to the
superclass symbol. To avoid a data race the new term ref will have a
fixed symbol.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/transform/Erasure.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/Erasure.scala b/src/dotty/tools/dotc/transform/Erasure.scala index 9f381bb8e..fd9048157 100644 --- a/src/dotty/tools/dotc/transform/Erasure.scala +++ b/src/dotty/tools/dotc/transform/Erasure.scala @@ -277,7 +277,7 @@ object Erasure extends TypeTestsCasts{ case _ => sym.name } untpd.cpy.Select(tree)(qual, sym.name) - .withType(NamedType.withSymAndName(qual.tpe, sym, name)) + .withType(NamedType.withFixedSym(qual.tpe, sym)) } def selectArrayMember(qual: Tree, erasedPre: Type): Tree = |