You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
Your first question: Yes, that's exactly how it works. Subclasses must respect the annotations of the interface / superclass.
Second question: It's a while since I looked at it, but I don't think you can say only a single argument should be pure - when you declare a pure method, all the arguments being passed in must be pure (checked at compile time or runtime).
I have two questions which I couldn't find in the docs:
Let's say I have a class like this:
Can I use the
@Pure
annotation in this way, to enforce that subclasses implement the function in a pure way?Along the same lines, is it possible to annotate a
@FunctionalInterface
argument of a function to be pure?The text was updated successfully, but these errors were encountered: