diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-12 21:46:49 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-12 21:46:49 -0800 |
commit | 5d65772762072aa950a488c666673dc248b01d6d (patch) | |
tree | c06ad41a4c23410489ba42cbf51a42036e25bc61 /test/files | |
parent | 9ea0a208346e86031a58fa9c28daf6103778a02f (diff) | |
parent | 7a23562431e3e9673112b0f5ec5624eb28194ee5 (diff) | |
download | scala-5d65772762072aa950a488c666673dc248b01d6d.tar.gz scala-5d65772762072aa950a488c666673dc248b01d6d.tar.bz2 scala-5d65772762072aa950a488c666673dc248b01d6d.zip |
Merge pull request #1859 from retronym/ticket/6912
SI-6912 Avoid a typer cycle in overload resolution.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t6912.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6912.scala | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t6912.check b/test/files/neg/t6912.check new file mode 100644 index 0000000000..137b651705 --- /dev/null +++ b/test/files/neg/t6912.check @@ -0,0 +1,4 @@ +t6912.scala:8: error: not found: type Xxxx + def test[T]: Xxxx = Foo1[T] + ^ +one error found diff --git a/test/files/neg/t6912.scala b/test/files/neg/t6912.scala new file mode 100644 index 0000000000..f2540ee8c6 --- /dev/null +++ b/test/files/neg/t6912.scala @@ -0,0 +1,9 @@ +object Foo1 { + def apply[T](a: Int = 0): Nothing = sys.error("") + def apply[T](z: String = ""): Nothing = sys.error("") +} + +object Test { + // Triggered a cycle in Typers#adapt + def test[T]: Xxxx = Foo1[T] +} |