Skip to content

Commit b9c72b2

Browse files
committed
Fix #8729: Drop failing assertion in enter
The eliminated assertion looked weird -- it makes no sense to compare the code (i.e. the bits) of two period encodings. It failed in innocuous code, and dropping it did not cause follow-on errors. Sorry, no test. If someone else wants to add a test, please do. But it is such a weird case (and was such a weird assertion) that I am not sure we need to have a test.
1 parent a1f8fda commit b9c72b2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,13 +1810,7 @@ object SymDenotations {
18101810
*/
18111811
def enter(sym: Symbol, scope: Scope = EmptyScope)(implicit ctx: Context): Unit = {
18121812
val mscope = scope match {
1813-
case scope: MutableScope =>
1814-
// if enter gets a scope as an argument,
1815-
// than this is a scope that will eventually become decls of this symbol.
1816-
// And this should only happen if this is first time the scope of symbol
1817-
// is computed, ie symbol yet has no future.
1818-
assert(this.nextInRun.validFor.code <= this.validFor.code)
1819-
scope
1813+
case scope: MutableScope => scope
18201814
case _ => unforcedDecls.openForMutations
18211815
}
18221816
if (proceedWithEnter(sym, mscope)) {

0 commit comments

Comments
 (0)