... use of ... is hidden by ...; use alias ... to introduce base class overload set ??
Robert M. Münch
robert.muench at saphirion.com
Tue Oct 22 20:23:56 UTC 2019
On 2019-10-21 18:02:06 +0000, Robert M. Münch said:
> This now gives:
>
> rx_filter_subject.d(66,23): Error:
> rx_filter_subject.FilterSubject.subscribe called with argument types
> (myWidget) matches both:
>
> /Users/robby/.dub/packages/rx-0.13.0/rx/source/rx/subject.d(72,16):
> rx.subject.SubjectObject!(message).SubjectObject.subscribe!(myWidget).subscribe(myWidget
> observer)
>
> and:
>
> rx_filter_subject.d(47,14):
> rx_filter_subject.FilterSubject.subscribe(myWidget observer)
>
> So, now there is an ambiguty.
I'm really stuck on this which looks like a dead-lock to me. Adding
"override" gives:
class myWidget : Observer!message {...}
class FilterSubject : SubjectObject!message {
override Disposable subscribe(myWidget observer){...}
}
rx_filter_subject.d(47,23): Error: function Disposable
rx_filter_subject.FilterSubject.subscribe(myWidget observer) does not
override any function, did you mean to override template
rx.subject.SubjectObject!(message).SubjectObject.subscribe(T)(T
observer)?
rx_filter_subject.d(47,23): Functions are the only declarations
that may be overriden
So, I can't override but when I use an alias I get an ambiguty error...
now what?
The only solution I have is to use a different name, but that would
change the interface and run against all the OOP ideas. The whole code
can be found here: https://pastebin.com/5BTT16Ze
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
More information about the Digitalmars-d-learn
mailing list