diff options
author | Martin Odersky <odersky@gmail.com> | 2017-02-14 09:44:07 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-04 13:29:38 +0200 |
commit | c58555e434d886e079104b0311ecb523f4ee1b40 (patch) | |
tree | ca2e0eb307206f86862d1012130dc3b1f1e4cf66 /compiler/src/dotty/tools/dotc/ast | |
parent | a30e7ecabc84583fa93bc215b1d1b5186caec07b (diff) | |
download | dotty-c58555e434d886e079104b0311ecb523f4ee1b40.tar.gz dotty-c58555e434d886e079104b0311ecb523f4ee1b40.tar.bz2 dotty-c58555e434d886e079104b0311ecb523f4ee1b40.zip |
Don't change the return type of the `copy` method
`copy` should always return the type of it's rhs. The discussion of
#1970 concluded that no special treatment for enums is needed.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast')
-rw-r--r-- | compiler/src/dotty/tools/dotc/ast/Desugar.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index cf128c26e..aa073429d 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -391,7 +391,7 @@ object desugar { cpy.ValDef(vparam)(rhs = copyDefault(vparam))) val copyRestParamss = derivedVparamss.tail.nestedMap(vparam => cpy.ValDef(vparam)(rhs = EmptyTree)) - DefDef(nme.copy, derivedTparams, copyFirstParams :: copyRestParamss, applyResultTpt, creatorExpr) + DefDef(nme.copy, derivedTparams, copyFirstParams :: copyRestParamss, TypeTree(), creatorExpr) .withMods(synthetic) :: Nil } |