Skip to content

Commit e4494c3

Browse files
committed
Drop unused attachment
1 parent 42b89dc commit e4494c3

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ object desugar {
2323
import untpd._
2424
import DesugarEnums._
2525

26-
/** If a Select node carries this attachment, suppress the check
27-
* that its type refers to an acessible symbol.
28-
*/
29-
val SuppressAccessCheck: Property.Key[Unit] = Property.Key()
30-
3126
/** An attachment for companion modules of classes that have a `derives` clause.
3227
* The position value indicates the start position of the template of the
3328
* deriving class.

compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,9 @@ trait TypeAssigner {
173173
/** The type of the selection in `tree`, where `qual1` is the typed qualifier part.
174174
* The selection type is additionally checked for accessibility.
175175
*/
176-
def accessibleSelectionType(tree: untpd.RefTree, qual1: Tree)(using Context): Type = {
176+
def accessibleSelectionType(tree: untpd.RefTree, qual1: Tree)(using Context): Type =
177177
val ownType = selectionType(tree, qual1)
178-
if (tree.hasAttachment(desugar.SuppressAccessCheck)) ownType
179-
else ensureAccessible(ownType, qual1.isInstanceOf[Super], tree.srcPos)
180-
}
178+
ensureAccessible(ownType, qual1.isInstanceOf[Super], tree.srcPos)
181179

182180
/** Type assignment method. Each method takes as parameters
183181
* - an untpd.Tree to which it assigns a type,

0 commit comments

Comments
 (0)