Skip to content
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

Safe-navigation operator fails when operand is a property #968

Open
thomasfanell opened this issue Dec 10, 2015 · 1 comment
Open

Safe-navigation operator fails when operand is a property #968

thomasfanell opened this issue Dec 10, 2015 · 1 comment

Comments

@thomasfanell
Copy link

Here is a mock-up that should illustrate what I mean:

Polynomial: class {
    m_derivative: Polynomial
    derivative ::= this m_derivative
    init: func
}

somePolynomial := Polynomial new()
thirdDerivative: Polynomial

// error: 'source_Main__Polynomial' has no member named 'derivative'
thirdDerivative = somePolynomial $ derivative $ derivative $ derivative

// This works as expected
thirdDerivative = somePolynomial $ m_derivative $ m_derivative $ m_derivative
@alexnask
Copy link
Collaborator

What appears to be happening is that only the outermost property access is translated to a call.
Probably a VariableAccess bug, SafeNavigation seems to be completely fine to me (all it does is make a huge ternary with accesses and checks to NULL).

On it.

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

No branches or pull requests

2 participants