This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Multiple overloaded alternatives of method define default arguments

2 replies
edmondo1984
Joined: 2011-09-14,
User offline. Last seen 28 weeks 4 days ago.
Dear all,I am getting this error which is very explicative but I don't understand why this is forbidden. Can you please help me to understand?
Best Regards
Edmondo
bmjsmith
Joined: 2010-03-12,
User offline. Last seen 42 years 45 weeks ago.
Re: Multiple overloaded alternatives of method define default a
Hi Edmondo
Martin replied to this question on StackOverflow here.
It seems to come down to the complexity of properly specifying rules for which method is resolved when you make a call which the presence of default parameters causes to be ambiguous.
Regards
Brian

On 14 December 2011 11:58, Edmondo Porcu <edmondo.porcu@gmail.com> wrote:
Dear all,I am getting this error which is very explicative but I don't understand why this is forbidden. Can you please help me to understand?
Best Regards
Edmondo

rytz
Joined: 2008-07-01,
User offline. Last seen 45 weeks 5 days ago.
Re: Multiple overloaded alternatives of method define default a
Hi,see here - http://stackoverflow.com/questions/4652095/why-does-the-scala-compiler-disallow-overloaded-methods-with-default-arguments - https://groups.google.com/forum/#!msg/scala-user/FyQK3-cqfaY/fXLHr8QsW_0J
and here if you are curageous - https://groups.google.com/forum/#!topic/scala-debate/aI81VLgk_Gc/discussion

Lukas
On Wednesday, 14. December 2011 at 12:58, Edmondo Porcu wrote:
Dear all,I am getting this error which is very explicative but I don't understand why this is forbidden. Can you please help me to understand?
Best Regards
Edmondo

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland