aboutsummaryrefslogtreecommitdiff
path: root/tests/tasty/default-param-interface.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-03-07 18:51:21 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-03-08 13:30:48 +0100
commita2b3bc17271a59f4d0f690fd46f3328c55ab06cb (patch)
tree5e0eaa03bb816ab2c7fa21897f5caf201005f88d /tests/tasty/default-param-interface.scala
parent279dd3b2065fcdbb2c561a9a68487696dd4923b4 (diff)
downloaddotty-a2b3bc17271a59f4d0f690fd46f3328c55ab06cb.tar.gz
dotty-a2b3bc17271a59f4d0f690fd46f3328c55ab06cb.tar.bz2
dotty-a2b3bc17271a59f4d0f690fd46f3328c55ab06cb.zip
Don't set PureInterface when a default param is present
The default param will be desugared into a method with a body, so setting PureInterface would be wrong. The enclosed test previously failed with a pickling difference, because the unpickler correctly decided to not set the PureInterface flag since it saw the default param method. This fixes the tasty_dotc_util which failed since the last commit because FreshNameCreator was now incorrectly recognized as a PureInterface.
Diffstat (limited to 'tests/tasty/default-param-interface.scala')
-rw-r--r--tests/tasty/default-param-interface.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/tasty/default-param-interface.scala b/tests/tasty/default-param-interface.scala
new file mode 100644
index 000000000..919f4b627
--- /dev/null
+++ b/tests/tasty/default-param-interface.scala
@@ -0,0 +1,3 @@
+trait Foo {
+ def newName(prefix: String = "foo"): String
+}