@@ -280,9 +280,6 @@ class Namer { typer: Typer =>
280280 if rhs.isEmpty || flags.is(Opaque ) then flags |= Deferred
281281 if flags.is(Param ) then tree.rhs else analyzeRHS(tree.rhs)
282282
283- def hasExplicitType (tree : ValOrDefDef ): Boolean =
284- ! tree.tpt.isEmpty || tree.mods.isOneOf(TermParamOrAccessor )
285- 286283 // to complete a constructor, move one context further out -- this
287284 // is the context enclosing the class. Note that the context in which a
288285 // constructor is recorded and the context in which it is completed are
@@ -296,8 +293,6 @@ class Namer { typer: Typer =>
296293
297294 val completer = tree match
298295 case tree : TypeDef => TypeDefCompleter (tree)(cctx)
299- case tree : ValOrDefDef if Feature .enabled(Feature .modularity) && hasExplicitType(tree) =>
300- new Completer (tree, isExplicit = true )(cctx)
301296 case _ => Completer (tree)(cctx)
302297 val info = adjustIfModule(completer, tree)
303298 createOrRefine[Symbol ](tree, name, flags, ctx.owner, _ => info,
@@ -813,7 +808,7 @@ class Namer { typer: Typer =>
813808 }
814809
815810 /** The completer of a symbol defined by a member def or import (except ClassSymbols) */
816- class Completer (val original : Tree , override val isExplicit : Boolean = false )(ictx : Context ) extends LazyType with SymbolLoaders .SecondCompleter {
811+ class Completer (val original : Tree )(ictx : Context ) extends LazyType with SymbolLoaders .SecondCompleter {
817812
818813 protected def localContext (owner : Symbol ): FreshContext = ctx.fresh.setOwner(owner).setTree(original)
819814
0 commit comments