Closed Akuli closed 1 year ago
a.jou:
from "stdlib/io.jou" import printf class Foo: def print(self: Foo) -> void: printf("Hello\n")
b.jou:
from "./a.jou" import Foo def make_foo() -> Foo: return Foo{}
c.jou:
from "./b.jou" import make_foo def main() -> int: make_foo().print() return 0
When running jou c.jou I would expect to see hello world, but instead I get: compiler error in file "c.jou", line 4: class Foo does not have a method named 'print'
jou c.jou
compiler error in file "c.jou", line 4: class Foo does not have a method named 'print'
To work around this I need to add from "./a.jou" import Foo to c.jou
from "./a.jou" import Foo
c.jou
a.jou:
b.jou:
c.jou:
When running
jou c.jou
I would expect to see hello world, but instead I get:compiler error in file "c.jou", line 4: class Foo does not have a method named 'print'
To work around this I need to add
from "./a.jou" import Foo
toc.jou