C:\temp\test.fan(9,10): Invalid args doSth(sys::Bool), not ()
ERROR: cannot compile script
for B declared as either mixin or class
brianWed 20 Apr 2011
Promoted to ticket #1501 and assigned to brian
I will have to consider what to do there. I've debated whether subclasses should be forced at compile time to maintain the same defaults as the overridden method.
brianWed 1 Jun 2011
Renamed from overriding mixin method does not inherit default to ensure override has matching param default state
brianWed 1 Jun 2011
Ticket resolved in 1.0.59
For now, I changed the compiler to do more stringent checking on overrides. The parameters of an override method must have or must not have a default based on the base class/mixin's method. If your override adds/removes default parameters then you will now get a compiler error.
We actually had a couple cases where I did this in our SkyFoundry code base. But it was more sloppy programming than any real need. So we'll start off strict and can always decide to relax restrictions in the future.
vkuzkokov Wed 20 Apr 2011
That gives
on attempt to run.
Also
this.doSth
refused to compile withfor
B
declared as eithermixin
orclass
brian Wed 20 Apr 2011
Promoted to ticket #1501 and assigned to brian
I will have to consider what to do there. I've debated whether subclasses should be forced at compile time to maintain the same defaults as the overridden method.
brian Wed 1 Jun 2011
Renamed from overriding mixin method does not inherit default to ensure override has matching param default state
brian Wed 1 Jun 2011
Ticket resolved in 1.0.59
For now, I changed the compiler to do more stringent checking on overrides. The parameters of an override method must have or must not have a default based on the base class/mixin's method. If your override adds/removes default parameters then you will now get a compiler error.
We actually had a couple cases where I did this in our SkyFoundry code base. But it was more sloppy programming than any real need. So we'll start off strict and can always decide to relax restrictions in the future.