File tree Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -633,7 +633,6 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
633
633
if (scala2Mode) migrationWarning(msg, pos)
634
634
scala2Mode
635
635
}
636
-
637
636
}
638
637
639
638
object TypeOps {
@@ -646,16 +645,16 @@ object TypeOps {
646
645
647
646
object Realizable extends Realizability (" " )
648
647
649
- object NotConcrete extends Realizability (" it is not a concrete type" )
648
+ object NotConcrete extends Realizability (" is not a concrete type" )
650
649
651
- object NotStable extends Realizability (" it is not a stable reference" )
650
+ object NotStable extends Realizability (" is not a stable reference" )
652
651
653
652
class NotFinal (sym : Symbol )(implicit ctx : Context )
654
- extends Realizability (i " it refers to nonfinal $sym" )
653
+ extends Realizability (i " refers to nonfinal $sym" )
655
654
656
655
class HasProblemBounds (mbr : SingleDenotation )(implicit ctx : Context )
657
- extends Realizability (i " it has a member $mbr with possibly conflicting bounds ${mbr.info.bounds.lo} <: ... <: ${mbr.info.bounds.hi}" )
656
+ extends Realizability (i " has a member $mbr with possibly conflicting bounds ${mbr.info.bounds.lo} <: ... <: ${mbr.info.bounds.hi}" )
658
657
659
658
class ProblemInUnderlying (tp : Type , problem : Realizability )(implicit ctx : Context )
660
- extends Realizability (i " its underlying type ${tp} ${problem.msg}" )
659
+ extends Realizability (i " s underlying type ${tp}${problem.msg}" )
661
660
}
Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ trait Checking {
325
325
def checkRealizable (tp : Type , pos : Position )(implicit ctx : Context ): Unit = {
326
326
val rstatus = ctx.realizability(tp)
327
327
if (rstatus ne TypeOps .Realizable ) {
328
- def msg = d " $tp is not a legal path since ${rstatus.msg}"
328
+ def msg = d " $tp is not a legal path since it ${rstatus.msg}"
329
329
if (ctx.scala2Mode) ctx.migrationWarning(msg, pos) else ctx.error(msg, pos)
330
330
}
331
331
}
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ class tests extends CompilerTest {
156
156
@ Test def neg_i705 = compileFile(negDir, " i705-inner-value-class" , xerrors = 7 )
157
157
@ Test def neg_i866 = compileFile(negDir, " i866" , xerrors = 2 )
158
158
@ Test def neg_i974 = compileFile(negDir, " i974" , xerrors = 2 )
159
- @ Test def neg_i1050 = compileFile(negDir, " i1050" , xerrors = 5 )
159
+ @ Test def neg_i1050 = compileFile(negDir, " i1050" , xerrors = 6 )
160
160
@ Test def neg_i1050a = compileFile(negDir, " i1050a" , xerrors = 2 )
161
161
@ Test def neg_moduleSubtyping = compileFile(negDir, " moduleSubtyping" , xerrors = 4 )
162
162
@ Test def neg_escapingRefs = compileFile(negDir, " escapingRefs" , xerrors = 2 )
Original file line number Diff line number Diff line change @@ -63,6 +63,22 @@ object Tiark2 {
63
63
val v = new V {}
64
64
v.brand(" boom!" ): Nothing
65
65
}
66
+ object Tiark3 {
67
+ trait A { type L <: Nothing }
68
+ trait B { type L >: Any }
69
+ trait U {
70
+ type X <: B
71
+ def p2 : X
72
+ final lazy val p : X = p2
73
+ def brand (x : Any ): p.L = x
74
+ }
75
+ trait V extends U {
76
+ type X = B with A
77
+ def p2 : X = ???
78
+ }
79
+ val v = new V {}
80
+ v.brand(" boom!" ): Nothing
81
+ }
66
82
/*
67
83
object Import {
68
84
trait A { type L <: Nothing }
You can’t perform that action at this time.
0 commit comments