aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PostTyper.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/transform/PostTyper.scala')
-rw-r--r--src/dotty/tools/dotc/transform/PostTyper.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/PostTyper.scala b/src/dotty/tools/dotc/transform/PostTyper.scala
index 3266d3a02..edf97f5b8 100644
--- a/src/dotty/tools/dotc/transform/PostTyper.scala
+++ b/src/dotty/tools/dotc/transform/PostTyper.scala
@@ -180,6 +180,15 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran
case tree: DefDef =>
transformAnnots(tree)
superAcc.wrapDefDef(tree)(super.transform(tree).asInstanceOf[DefDef])
+ case tree: TypeDef =>
+ transformAnnots(tree)
+ val sym = tree.symbol
+ val tree1 =
+ if (sym.isClass) tree
+ else {
+ cpy.TypeDef(tree)(rhs = TypeTree(tree.symbol.info))
+ }
+ super.transform(tree1)
case tree: MemberDef =>
transformAnnots(tree)
super.transform(tree)