Skip to content

Commit b8bb504

Browse files
committed
Add passing test
Needs to be done in pos-special because junit tests do not recognize _1, _2.
1 parent f006688 commit b8bb504

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

test/dotc/tests.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ class tests extends CompilerTest {
111111

112112
@Test def pos_859 = compileFile(posSpecialDir, "i859", scala2mode)(allowDeepSubtypes)
113113

114+
@Test def pos_t5545 = {
115+
// compile by hand in two batches, since junit lacks the infrastructure to
116+
// compile files in multiple batches according to _1, _2, ... suffixes.
117+
compileFile(posSpecialDir, "spec-t5545/S_1")
118+
compileFile(posSpecialDir, "spec-t5545/S_2")
119+
}
120+
114121
@Test def new_all = compileFiles(newDir, twice)
115122
@Test def repl_all = replFiles(replDir)
116123

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
trait F[@specialized(Int) T1, R] {
2+
def f(v1: T1): R
3+
def g = v1 => f(v1)
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
trait F[@specialized(Int) T1, R] {
2+
def f(v1: T1): R
3+
def g = v1 => f(v1)
4+
}

0 commit comments

Comments
 (0)