File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ object ProtoTypes {
418418
419419 /** Create a new TypeVar that represents a dependent method parameter singleton */
420420 def newDepTypeVar (tp : Type )(implicit ctx : Context ): TypeVar =
421- newTypeVar(TypeBounds .upper(AndType (tp, defn.SingletonClass .typeRef)))
421+ newTypeVar(TypeBounds .upper(AndType (tp.widenExpr , defn.SingletonClass .typeRef)))
422422
423423 /** The result type of `mt`, where all references to parameters of `mt` are
424424 * replaced by either wildcards (if typevarsMissContext) or TypeParamRefs.
Original file line number Diff line number Diff line change 1+ object Crash {
2+ def f (cond : => Boolean ): cond.type = ??? // error: cond is not stable
3+ f(true )
4+ }
You can’t perform that action at this time.
0 commit comments