diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-09-24 10:31:33 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-03-09 17:07:32 -0700 |
commit | d04cd7b39107fb7cb817a08265724c00043b1396 (patch) | |
tree | c89aba4a90616bce4b25164fcb66d229450dfdc1 /test/files/pos/t8861.scala | |
parent | e8e9c0d6b9181be657a1d28eef9f999cb26df9e5 (diff) | |
download | scala-d04cd7b39107fb7cb817a08265724c00043b1396.tar.gz scala-d04cd7b39107fb7cb817a08265724c00043b1396.tar.bz2 scala-d04cd7b39107fb7cb817a08265724c00043b1396.zip |
SI-8861 Handle alias when probing for Any
If args to a method are alias types, dealias to see if they
contain Any before warning about inferring it. Similarly for
return and expected types.
Diffstat (limited to 'test/files/pos/t8861.scala')
-rw-r--r-- | test/files/pos/t8861.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t8861.scala b/test/files/pos/t8861.scala new file mode 100644 index 0000000000..816d15700e --- /dev/null +++ b/test/files/pos/t8861.scala @@ -0,0 +1,11 @@ + +trait Test { + type R = PartialFunction[Any, Unit] + + val x: R = { case "" => } + val y: R = { case "" => } + + val z: R = x orElse y + val zz = x orElse y +} + |