Skip to content

Commit c383812

Browse files
committed
Various test fixes
1 parent 92c08b3 commit c383812

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ class PlainPrinter(_ctx: Context) extends Printer {
235235
changePrec(GlobalPrec) {
236236
"("
237237
~ keywordText("using ").provided(tp.isContextualMethod)
238-
~ keywordText("erased ").provided(tp.isErasedMethod)
239238
~ keywordText("implicit ").provided(tp.isImplicitMethod && !tp.isContextualMethod)
240239
~ paramsText(tp)
241240
~ ")"

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
290290
}
291291
"[applied to ("
292292
~ keywordText("using ").provided(tp.isContextualMethod)
293-
~ keywordText("erased ").provided(tp.isErasedMethod)
294293
~ argsText
295294
~ ") returning "
296295
~ toText(resultType)

tests/neg/safeThrowsStrawman2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def bar(x: Boolean)(using CanThrow[Fail]): Int =
2424
val x = new CanThrow[Fail]() // OK, x is erased
2525
val y: Any = new CanThrow[Fail]() // error: illegal reference to erased class CanThrow
2626
val y2: Any = new CTF() // error: illegal reference to erased class CanThrow
27-
println(foo(true, ctf)) // error: ctf is declared as erased, but is in fact used
27+
println(foo(true, ctf)) // not error: ctf will be erased at erasure
2828
val a = (1, new CanThrow[Fail]()) // error: illegal reference to erased class CanThrow
2929
def b: (Int, CanThrow[Fail]) = ???
3030
def c = b._2 // ok; we only check creation sites

0 commit comments

Comments
 (0)