Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ object DesugarEnums {
*/
private def enumScaffolding(implicit ctx: Context): List[Tree] = {
val valuesDef =
DefDef(nme.values, Nil, Nil, TypeTree(), Select(valuesDot(nme.values), nme.toArray))
DefDef(nme.values, Nil, Nil, TypeTree(defn.ArrayOf(enumClass.typeRef)), Select(valuesDot(nme.values), nme.toArray))
.withFlags(Synthetic)
val privateValuesDef =
ValDef(nme.DOLLAR_VALUES, TypeTree(),
Expand Down
8 changes: 1 addition & 7 deletions compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1810,13 +1810,7 @@ object SymDenotations {
*/
def enter(sym: Symbol, scope: Scope = EmptyScope)(implicit ctx: Context): Unit = {
val mscope = scope match {
case scope: MutableScope =>
// if enter gets a scope as an argument,
// than this is a scope that will eventually become decls of this symbol.
// And this should only happen if this is first time the scope of symbol
// is computed, ie symbol yet has no future.
assert(this.nextInRun.validFor.code <= this.validFor.code)
scope
case scope: MutableScope => scope
case _ => unforcedDecls.openForMutations
}
if (proceedWithEnter(sym, mscope)) {
Expand Down