Skip to content

Commit 0e04e44

Browse files
committed
Fix tests
1 parent 8f2d3df commit 0e04e44

15 files changed

+34
-34
lines changed

compiler/src/dotty/tools/repl/ReplCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class ReplCompiler extends Compiler {
276276
val src = SourceFile.virtual("<typecheck>", expr)
277277
implicit val ctx: Context = state.context.fresh
278278
.setReporter(newStoreReporter)
279-
.setSetting(state.context.settings.YstopAfter, List("frontend"))
279+
.setSetting(state.context.settings.YstopAfter, List("typer"))
280280

281281
wrapped(expr, src, state).flatMap { pkg =>
282282
val unit = CompilationUnit(src)

compiler/test/dotty/tools/DottyTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ trait DottyTest extends ContextEscapeDetection {
7777
val dummyName = "x_x_x"
7878
val vals = typeStringss.flatten.zipWithIndex.map{case (s, x)=> s"val ${dummyName}$x: $s = ???"}.mkString("\n")
7979
val gatheredSource = s" ${source}\n object A$dummyName {$vals}"
80-
checkCompile("frontend", gatheredSource) {
80+
checkCompile("typer", gatheredSource) {
8181
(tree, context) =>
8282
implicit val ctx = context
8383
val findValDef: (List[tpd.ValDef], tpd.Tree) => List[tpd.ValDef] =

compiler/test/dotty/tools/DottyTypeStealer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ object DottyTypeStealer extends DottyTest {
1414
val gatheredSource = s" ${source}\n object A$dummyName {$vals}"
1515
var scontext : Context = null
1616
var tp: List[Type] = null
17-
checkCompile("frontend", gatheredSource) {
17+
checkCompile("typer", gatheredSource) {
1818
(tree, context) =>
1919
implicit val ctx = context
2020
val findValDef: (List[ValDef], tpd.Tree) => List[ValDef] =

compiler/test/dotty/tools/dotc/ast/AttachmentsTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AttachmentsTests extends DottyTest {
1616

1717
@Test
1818
def attachmentsAreNotCopiedOver: Unit = {
19-
checkCompile("frontend", "class A") {
19+
checkCompile("typer", "class A") {
2020
case (PackageDef(_, (clazz: tpd.TypeDef) :: Nil), context) =>
2121
assertTrue("Attachment shouldn't be present", clazz.getAttachment(TestKey).isEmpty)
2222

@@ -35,7 +35,7 @@ class AttachmentsTests extends DottyTest {
3535

3636
@Test
3737
def stickyAttachmentsAreCopiedOver: Unit = {
38-
checkCompile("frontend", "class A") {
38+
checkCompile("typer", "class A") {
3939
case (PackageDef(_, (clazz: tpd.TypeDef) :: Nil), context) =>
4040
assertTrue("Attachment shouldn't be present", clazz.getAttachment(StickyTestKey).isEmpty)
4141
assertTrue("Attachment shouldn't be present", clazz.getAttachment(StickyTestKey2).isEmpty)

compiler/test/dotty/tools/dotc/ast/DesugarTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DesugarTests extends DottyTest {
2222
}
2323

2424
@Test def caseClassHasCorrectMembers: Unit =
25-
checkCompile("frontend", "case class Foo(x: Int, y: String)") { (tree, context) =>
25+
checkCompile("typer", "case class Foo(x: Int, y: String)") { (tree, context) =>
2626
implicit val ctx = context
2727
val ccTree = tree.find(tree => tree.symbol.name == typeName("Foo")).get
2828
val List(_, foo) = defPath(ccTree.symbol, tree).map(_.symbol.info)
@@ -37,7 +37,7 @@ class DesugarTests extends DottyTest {
3737
}
3838

3939
@Test def caseClassCompanionHasCorrectMembers: Unit =
40-
checkCompile("frontend", "case class Foo(x: Int, y: String)") { (tree, context) =>
40+
checkCompile("typer", "case class Foo(x: Int, y: String)") { (tree, context) =>
4141
implicit val ctx = context
4242
val ccTree = tree.find(tree => tree.symbol.name == termName("Foo")).get
4343
val List(_, foo) = defPath(ccTree.symbol, tree).map(_.symbol.info)

compiler/test/dotty/tools/dotc/ast/TreeInfoTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TreeInfoTest extends DottyTest {
1414
import tpd._
1515

1616
@Test
17-
def testDefPath: Unit = checkCompile("frontend", "class A { def bar = { val x = { val z = 0; 0} }} ") {
17+
def testDefPath: Unit = checkCompile("typer", "class A { def bar = { val x = { val z = 0; 0} }} ") {
1818
(tree, context) =>
1919
implicit val ctx = context
2020
val xTree = tree.find(tree => tree.symbol.name == termName("x")).get

compiler/test/dotty/tools/dotc/parsing/DocstringTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait DocstringTest extends DottyTest {
2525
}
2626

2727
def checkFrontend(source: String)(docAssert: PartialFunction[Tree[Untyped], Unit]): Unit = {
28-
checkCompile("frontend", source) { (_, ctx) =>
28+
checkCompile("typer", source) { (_, ctx) =>
2929
implicit val c: Context = ctx
3030
(docAssert orElse defaultAssertion)(ctx.compilationUnit.untpdTree)
3131
}

compiler/test/dotty/tools/dotc/parsing/DocstringTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class DocstringTests extends DocstringTest {
6161
|class Class2(val x: String)
6262
""".stripMargin
6363

64-
checkCompile("frontend", source) { (_, ctx) =>
64+
checkCompile("typer", source) { (_, ctx) =>
6565
ctx.compilationUnit.untpdTree match {
6666
case PackageDef(_, Seq(c1 @ TypeDef(_,_), c2 @ TypeDef(_,_))) => {
6767
checkDocString(c1.rawComment.map(_.raw), "/** Class1 docstring */")

compiler/test/dotty/tools/dotc/printing/PrinterTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class PrinterTests extends DottyTest {
2525
}
2626
"""
2727

28-
checkCompile("frontend", source) { (tree, context) =>
28+
checkCompile("typer", source) { (tree, context) =>
2929
implicit val ctx = context
3030
val bar = tree.find(tree => tree.symbol.name == termName("bar")).get
3131
assertEquals("package object foo", bar.symbol.owner.show)
@@ -42,7 +42,7 @@ class PrinterTests extends DottyTest {
4242
|}
4343
""".stripMargin
4444

45-
checkCompile("frontend", source) { (tree, context) =>
45+
checkCompile("typer", source) { (tree, context) =>
4646
implicit val ctx = context
4747
val bar @ Trees.DefDef(_, _, _, _, _) = tree.find(tree => tree.symbol.name == termName("bar2")).get
4848
assertEquals("Int & (Boolean | String)", bar.tpt.show)

compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ class ErrorMessagesTests extends ErrorMessagesTest {
13661366
}
13671367

13681368
@Test def unapplyInvalidReturnType =
1369-
checkMessagesAfter("frontend") {
1369+
checkMessagesAfter("typer") {
13701370
"""
13711371
|class A(val i: Int)
13721372
|
@@ -1386,7 +1386,7 @@ class ErrorMessagesTests extends ErrorMessagesTest {
13861386
}
13871387

13881388
@Test def unapplySeqInvalidReturnType =
1389-
checkMessagesAfter("frontend") {
1389+
checkMessagesAfter("typer") {
13901390
"""
13911391
|class A(val i: Int)
13921392
|

0 commit comments

Comments
 (0)