diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-07-20 13:47:43 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan@lightbend.com> | 2016-08-11 10:59:17 -0700 |
commit | 4555681544ec40c5b787b9708266fcbdcc2ff62b (patch) | |
tree | cac56a5aaa38a919b0c0858682784e0aee937162 /src/compiler | |
parent | 9b59f5f9530d54c917479c6bf44aa3007ba0a2df (diff) | |
download | scala-4555681544ec40c5b787b9708266fcbdcc2ff62b.tar.gz scala-4555681544ec40c5b787b9708266fcbdcc2ff62b.tar.bz2 scala-4555681544ec40c5b787b9708266fcbdcc2ff62b.zip |
Mixed in getter needs NullaryMethodType too
Clone at uncurry to preserve it in its info history.
Discovered by the scala-js test suite.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Fields.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Fields.scala b/src/compiler/scala/tools/nsc/transform/Fields.scala index 1900fcdc16..6e064e2a24 100644 --- a/src/compiler/scala/tools/nsc/transform/Fields.scala +++ b/src/compiler/scala/tools/nsc/transform/Fields.scala @@ -341,7 +341,9 @@ abstract class Fields extends InfoTransform with ast.TreeDSL with TypingTransfor // if we don't cloneInfo, method argument symbols are shared between trait and subclasses --> lambalift proxy crash // TODO: use derive symbol variant? // println(s"cloning accessor $member to $clazz") - clonedAccessor setInfo ((clazz.thisType memberType member) cloneInfo clonedAccessor) // accessor.info.cloneInfo(clonedAccessor).asSeenFrom(clazz.thisType, accessor.owner) + // start at uncurry so that we preserve that part of the history where an accessor has a NullaryMethodType + enteringUncurry { clonedAccessor setInfo ((clazz.thisType memberType member) cloneInfo clonedAccessor) } + clonedAccessor } if (member hasFlag MODULE) { |