diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-13 10:16:13 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-13 10:16:13 -0800 |
commit | 4554a10bcafce6fb14eb8b123bf76887bb6a8114 (patch) | |
tree | 0d82c10b71938c4559cc19ab438fe80bf16f6218 /test/files/neg/t8841.scala | |
parent | 73478ea4d64c62899440bfa0a748e3d57d1ab85d (diff) | |
parent | a4a892fb0196f2f66d86f9cfa508deabe7d2aaae (diff) | |
download | scala-4554a10bcafce6fb14eb8b123bf76887bb6a8114.tar.gz scala-4554a10bcafce6fb14eb8b123bf76887bb6a8114.tar.bz2 scala-4554a10bcafce6fb14eb8b123bf76887bb6a8114.zip |
Merge pull request #4195 from lrytz/t8841
SI-8841 report named arg / assignment ambiguity also in silent mode.
Diffstat (limited to 'test/files/neg/t8841.scala')
-rw-r--r-- | test/files/neg/t8841.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/t8841.scala b/test/files/neg/t8841.scala new file mode 100644 index 0000000000..80430d997e --- /dev/null +++ b/test/files/neg/t8841.scala @@ -0,0 +1,15 @@ +class Cell(val ambiguousName: Option[String]) + +class Test { + def wrap(f: Any): Nothing = ??? + + wrap { + // the namer for these two ValDefs is created when typing the argument expression + // of wrap. This happens to be in a silent context (tryTypedApply). Therefore, the + // cyclic reference will not be thrown, but transformed into a NormalTypeError by + // `silent`. This requires different handling in NamesDefaults. + + val c = new Cell(ambiguousName = Some("bla")) + val ambiguousName = c.ambiguousName + } +} |