File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
compiler/src/dotty/tools/dotc/cc Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -142,26 +142,6 @@ object CheckCaptures:
142142
143143 private val seen = new EqHashSet [TypeRef ]
144144
145- /** Check that there is at least one method containing carrier and defined
146- * in the scope of tparam. E.g. this is OK:
147- * def f[T] = { ... var x: T ... }
148- * So is this:
149- * class C[T] { def f() = { class D { var x: T }}}
150- * But this is not OK:
151- * class C[T] { object o { var x: T }}
152- */
153- extension (tparam : Symbol ) def isParametricIn (carrier : Symbol ): Boolean =
154- carrier.exists && {
155- val encl = carrier.owner.enclosingMethodOrClass
156- if encl.isClass then tparam.isParametricIn(encl)
157- else
158- def recur (encl : Symbol ): Boolean =
159- if tparam.owner == encl then true
160- else if encl.isStatic || ! encl.exists then false
161- else recur(encl.owner.enclosingMethodOrClass)
162- recur(encl)
163- }
164-
165145 def traverse (t : Type ) =
166146 t.dealiasKeepAnnots match
167147 case t : TypeRef =>
You can’t perform that action at this time.
0 commit comments