File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -257,11 +257,8 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
257
257
case tree : MemberDef =>
258
258
transformMemberDef(tree)
259
259
super .transform(tree)
260
- case tree : New =>
261
- if (tree.tpe.classSymbol.hasAnnotation(defn.DeprecatedAnnot ))
262
- ctx.deprecationWarning(s " ${tree.tpe.typeSymbol} is deprecated " , tree.pos)
263
- if (isCheckable(tree))
264
- Checking .checkInstantiable(tree.tpe, tree.pos)
260
+ case tree : New if isCheckable(tree) =>
261
+ Checking .checkInstantiable(tree.tpe, tree.pos)
265
262
super .transform(tree)
266
263
case tree @ Annotated (annotated, annot) =>
267
264
cpy.Annotated (tree)(transform(annotated), transformAnnot(annot))
Original file line number Diff line number Diff line change @@ -879,6 +879,7 @@ class RefChecks extends MiniPhase { thisPhase =>
879
879
}
880
880
881
881
override def transformNew (tree : New )(implicit ctx : Context ) = {
882
+ checkUndesiredProperties(tree.tpe.typeSymbol, tree.pos)
882
883
currentLevel.enterReference(tree.tpe.typeSymbol, tree.pos)
883
884
tree
884
885
}
You can’t perform that action at this time.
0 commit comments