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

Importing into namespace prevents extended method calls from being resolved #766

Closed
xsleonard opened this issue Jan 11, 2014 · 1 comment
Closed
Assignees
Milestone

Comments

@xsleonard
Copy link

@xsleonard xsleonard commented Jan 11, 2014

Given these files in the same directory:

y.ooc:

X: cover from int*

x.ooc:

import y

extend X {
    draw: func() {
        "draw" println()
    }
}

makeX: func() -> X {
    return 0 as X
}

main.ooc:

import x

makeX() draw()

main2.ooc:

import x into z

z makeX() draw()

main.ooc will successfully compile and run, but main2.ooc fails with:
./main2.ooc:3:3 error No such function draw() for 'X'

horasal added a commit to horasal/rock that referenced this issue Jun 30, 2014
This may solve the issue 766 in official repo
ooc-lang#766
@fasterthanlime fasterthanlime added this to the 0.9.9 milestone Aug 15, 2014
@fasterthanlime fasterthanlime self-assigned this Aug 15, 2014
fasterthanlime added a commit that referenced this issue Aug 15, 2014
This may solve the issue 766 in official repo
#766
@fasterthanlime
Copy link
Collaborator

@fasterthanlime fasterthanlime commented Aug 15, 2014

Applied @zhaihj's fix, now works in 99x.

Loading

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

Successfully merging a pull request may close this issue.

None yet
2 participants