forked from alex-eg/sex
look for an import beside the file it is written in
Imports were looked for from the unit's directory, so a module in a subdirectory could not import its neighbours: a pub import failed, a private one lost its handle declarations, and --public-interface changed with where sexc ran.
This commit is contained in:
9
tests/modules/shelf-app.sex
Normal file
9
tests/modules/shelf-app.sex
Normal file
@@ -0,0 +1,9 @@
|
||||
(include stdio.h)
|
||||
(import shelf/book)
|
||||
|
||||
(pub fn main () int
|
||||
(var b book #(book : NULL #(page : 1)))
|
||||
(printf "pages %d %d\n"
|
||||
(. (second-page (& b)) number)
|
||||
(. (page-after (second-page (& b))) number))
|
||||
(return 0))
|
||||
Reference in New Issue
Block a user