File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -3590,7 +3590,7 @@ object Types {
35903590
35913591 def expectValueTypeOrWildcard (tp : Type , where : => String )(using Context ): Unit =
35923592 if ! tp.isValueTypeOrWildcard then
3593- assert(! ctx.isAfterTyper, where) // we check correct kinds at PostTyper
3593+ assert(! ctx.isAfterTyper, s " $tp in $ where" ) // we check correct kinds at PostTyper
35943594 throw TypeError (em " $tp is not a value type, cannot be used $where" )
35953595
35963596 /** An extractor object to pattern match against a nullable union.
Original file line number Diff line number Diff line change @@ -224,14 +224,13 @@ abstract class Recheck extends Phase, SymTransformer:
224224 def recheckBind (tree : Bind , pt : Type )(using Context ): Type = tree match
225225 case Bind (name, body) =>
226226 recheck(body, pt)
227- val sym = tree.symbol
228- if sym.isType then sym.typeRef else sym.info
227+ tree.symbol.namedType
229228
230229 def recheckLabeled (tree : Labeled , pt : Type )(using Context ): Type = tree match
231230 case Labeled (bind, expr) =>
232- val bindType = recheck(bind, pt)
231+ val ( bindType : NamedType ) = recheck(bind, pt): @ unchecked
233232 val exprType = recheck(expr, defn.UnitType )
234- bindType
233+ bindType.symbol.info
235234
236235 def recheckValDef (tree : ValDef , sym : Symbol )(using Context ): Unit =
237236 if ! tree.rhs.isEmpty then recheck(tree.rhs, sym.info)
You can’t perform that action at this time.
0 commit comments