Skip to content

Commit 56074ca

Browse files
committed
Fix test
The test previously compiled by accident due to the "more implicit parameters win" rule. Once that rule got changed it should have failed, but it seems the error (illegal forward reference) was not detected. Rebasing this commit on latest master detects the error: ``` implicit val co_i: Conversion[Char, Position[CharSequence]] = the[Conversion[Char, Position[CharSequence]]] ^ co_i is a forward reference extending over the definition of co_i ``` The fix to the test avoids the error again.
1 parent cd9a29f commit 56074ca

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/pos/i5978.scala

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,18 @@ package p3 {
6363
import implied TextParser._
6464
import TextParser._
6565

66-
val tp_v: TokenParser[Char, Position[CharSequence]] = TextParser.TP
67-
val tp_i = the[TokenParser[Char, Position[CharSequence]]]
68-
implicit val co_i: Conversion[Char, Position[CharSequence]] = the[Conversion[Char, Position[CharSequence]]]
69-
val co_x : Position[CharSequence] = 'x'
66+
val co_i: Conversion[Char, Position[CharSequence]] = the[Conversion[Char, Position[CharSequence]]]
7067

7168
{
72-
implied XXX for Conversion[Char, Position[CharSequence]] = co_i
73-
val co_y : Position[CharSequence] = 'x'
69+
val tp_v: TokenParser[Char, Position[CharSequence]] = TextParser.TP
70+
val tp_i = the[TokenParser[Char, Position[CharSequence]]]
71+
implied for Conversion[Char, Position[CharSequence]] = co_i
72+
val co_x : Position[CharSequence] = 'x'
73+
74+
{
75+
implied XXX for Conversion[Char, Position[CharSequence]] = co_i
76+
val co_y : Position[CharSequence] = 'x'
77+
}
7478
}
7579
}
7680
}

0 commit comments

Comments
 (0)