Skip to content

Fix #4611: Change implicit function types rewriting rules #4621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

allanrenucci
Copy link
Contributor

An abstract method definition

def m(xs: Ts): IF

is expanded to:

def m(xs: Ts): IF = implicit (ys: Us) => m$direct(xs)(ys)
def m$direct(xs: Ts)(ys: Us): R

An overriding method definition

override def m(xs: Ts): IF = implicit (ys: Us) => E

is expanded to:

def m$direct(xs: Ts)(ys: Us): R = E

An abstract method definition

    def m(xs: Ts): IF

is expanded to:

    def m(xs: Ts): IF = implicit (ys: Us) => m$direct(xs)(ys)
    def m$direct(xs: Ts)(ys: Us): R

An overriding method definition

    override def m(xs: Ts): IF = implicit (ys: Us) => E

is expanded to:

    def m$direct(xs: Ts)(ys: Us): R = E
if (original.allOverriddenSymbols.exists(!_.is(Deferred))) {
// if original overrides something we only generate
// the direct method and remove original
original.owner.asClass.delete(original)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit scared by this. Especially how it will interact with other phases in the same group such as ExpandSAMs

@allanrenucci allanrenucci mentioned this pull request Jun 26, 2018
@allanrenucci
Copy link
Contributor Author

Closed in favor of #4723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant