Skip to content

Commit 19585dd

Browse files
committed
fix dotty compile errors: ambiguous reference
1 parent 63a148e commit 19585dd

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

scalatest/src/main/scala/org/scalatest/flatspec/AnyFlatSpecLike.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,17 +1562,17 @@ import resultOfStringPassedToVerb.verb
15621562
new ResultOfStringPassedToVerb(verb, rest) {
15631563

15641564
def is(testFun: => PendingStatement): Unit = {
1565-
registerTestToRun(verb.trim + " " + rest.trim, "is", List(), () => { testFun; succeed }, pos)
1565+
registerTestToRun(this.verb.trim + " " + this.rest.trim, "is", List(), () => { testFun; succeed }, pos)
15661566
}
15671567
// Note, won't have an is method that takes fixture => PendingStatement one, because don't want
15681568
// to say is (fixture => pending), rather just say is (pending)
15691569
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
15701570
val tagList = firstTestTag :: otherTestTags.toList
1571-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
1571+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
15721572
// "A Stack" should "bla bla" taggedAs(SlowTest) is (pending)
15731573
// ^
15741574
def is(testFun: => PendingStatement): Unit = {
1575-
registerTestToRun(verb.trim + " " + rest.trim, "is", tags, () => { testFun; succeed }, pos)
1575+
registerTestToRun(this.verb.trim + " " + this.rest.trim, "is", this.tags, () => { testFun; succeed }, pos)
15761576
}
15771577
}
15781578
}

scalatest/src/main/scala/org/scalatest/flatspec/AsyncFlatSpecLike.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,17 +1564,17 @@ import resultOfStringPassedToVerb.verb
15641564
new ResultOfStringPassedToVerb(verb, rest) {
15651565

15661566
def is(testFun: => PendingStatement): Unit = {
1567-
registerPendingTestToRun(verb.trim + " " + rest.trim, "is", List(), () => testFun, pos)
1567+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, "is", List(), () => testFun, pos)
15681568
}
15691569
// Note, won't have an is method that takes fixture => PendingStatement one, because don't want
15701570
// to say is (fixture => pending), rather just say is (pending)
15711571
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
15721572
val tagList = firstTestTag :: otherTestTags.toList
1573-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
1573+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
15741574
// "A Stack" should "bla bla" taggedAs(SlowTest) is (pending)
15751575
// ^
15761576
def is(testFun: => PendingStatement): Unit = {
1577-
registerPendingTestToRun(verb.trim + " " + rest.trim, "is", tags, () => testFun, pos)
1577+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, "is", this.tags, () => testFun, pos)
15781578
}
15791579
}
15801580
}

scalatest/src/main/scala/org/scalatest/flatspec/FixtureAnyFlatSpecLike.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,15 +2011,15 @@ import resultOfStringPassedToVerb.verb
20112011
registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, sourceFileName, "apply", stackDepth, 0, Some(pos))
20122012
new ResultOfStringPassedToVerb(verb, rest) {
20132013
def is(testFun: => PendingStatement): Unit = {
2014-
registerPendingTestToRun(verb.trim + " " + rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
2014+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
20152015
}
20162016
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
20172017
val tagList = firstTestTag :: otherTestTags.toList
2018-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
2018+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
20192019
// "A Stack" must "test this" taggedAs(mytags.SlowAsMolasses) is (pending)
20202020
// ^
20212021
def is(testFun: => PendingStatement): Unit = {
2022-
registerPendingTestToRun(verb.trim + " " + rest.trim, tags, "is", new NoArgTestWrapper(() => testFun), pos)
2022+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, this.tags, "is", new NoArgTestWrapper(() => testFun), pos)
20232023
}
20242024
}
20252025
}

scalatest/src/main/scala/org/scalatest/flatspec/FixtureAsyncFlatSpecLike.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,15 +1988,15 @@ import resultOfStringPassedToVerb.verb
19881988
registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, pos)
19891989
new ResultOfStringPassedToVerb(verb, rest) {
19901990
def is(testFun: => PendingStatement): Unit = {
1991-
registerPendingTestToRun(verb.trim + " " + rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
1991+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
19921992
}
19931993
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
19941994
val tagList = firstTestTag :: otherTestTags.toList
1995-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
1995+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
19961996
// "A Stack" must "test this" taggedAs(mytags.SlowAsMolasses) is (pending)
19971997
// ^
19981998
def is(testFun: => PendingStatement): Unit = {
1999-
registerPendingTestToRun(verb.trim + " " + rest.trim, tags, "is", new NoArgTestWrapper(() => testFun), pos)
1999+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, this.tags, "is", new NoArgTestWrapper(() => testFun), pos)
20002000
}
20012001
}
20022002
}

0 commit comments

Comments
 (0)