Skip to content

Commit 29e8ec9

Browse files
committed
Demonstrate issue with inference and TermRefs
> run -Xprint-types -Ytest-pickler -Ystop-after:pickler tests/pos/pickleinf.scala [error] (no source file, offset = 0): error: value of type <notype> does not take parameters
1 parent 8532c98 commit 29e8ec9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/dotc/tests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class tests extends CompilerTest {
5353
// This directory doesn't exist anymore
5454
// @Test def pickle_pickling = compileDir(coreDir, "pickling", testPickling)
5555
@Test def pickle_ast = compileDir(dotcDir, "ast", testPickling)
56+
@Test def pickle_inf = compileFile(posDir, "pickleinf", testPickling)
5657

5758
//@Test def pickle_core = compileDir(dotcDir, "core", testPickling, xerrors = 2) // two spurious comparison errors in Types and TypeOps
5859

tests/pos/pickleinf.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Bar[N] {
2+
def bar(name: N, dummy: Int = 42): N = name
3+
}
4+
5+
object Test {
6+
def test(): Unit = {
7+
(new Bar).bar(10)
8+
}
9+
}

0 commit comments

Comments
 (0)