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

Super expressions don't work #43

Closed
bichanna opened this issue Mar 11, 2022 · 2 comments
Closed

Super expressions don't work #43

bichanna opened this issue Mar 11, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@bichanna
Copy link
Owner

bichanna commented Mar 11, 2022

code:

class Car {
    drive() {
        println("driving a car");
    }
}

class Mazda <- Car {}

let myCar = Mazda();
myCar.drive();

#{
driving a car
}#

error:

/Users/nobu/WorkSpace/Nim/SLAP/src/main.nim(90) main
/Users/nobu/WorkSpace/Nim/SLAP/src/main.nim(42) runFile
/Users/nobu/WorkSpace/Nim/SLAP/src/main.nim(36) execute
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(515) interpret
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(397) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(400) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(27) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(244) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(60) :anonymous
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(419) executeBlock
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(397) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(400) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(27) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(233) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(27) eval
/Users/nobu/WorkSpace/Nim/SLAP/src/interpreter.nim(285) eval
/usr/local/Cellar/nim/1.6.2/nim/lib/pure/collections/tables.nim(246) []
/usr/local/Cellar/nim/1.6.2/nim/lib/pure/collections/tables.nim(236) raiseKeyError
Error: unhandled exception: key not found [KeyError]
@bichanna bichanna added the bug Something isn't working label Mar 11, 2022
@GalaxianMonster
Copy link

(might be wrong) I think you are accessing a nim map and that key doesn't exists.

@bichanna
Copy link
Owner Author

bichanna commented Mar 11, 2022

Yes, I know that. But it's too late for me (1:40 pm). So, maybe tomorrow.
This is kind of a reminder for the future me.

bichanna added a commit that referenced this issue Mar 12, 2022
bichanna added a commit that referenced this issue Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants