We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e46bce6 + b5ac268 commit 207ebf3Copy full SHA for 207ebf3
jpm/cc.janet
@@ -300,7 +300,9 @@ int main(int argc, const char **argv) {
300
# Load entry environment and get main function.
301
(def env (make-env))
302
(def entry-env (dofile source :env env))
303
- (def main ((entry-env 'main) :value))
+ (def main (get-in entry-env ['main :value]))
304
+ (assert (and main (function? main))
305
+ (string/format "no main function in %s" source))
306
(def dep-lflags @[])
307
(def dep-ldflags @[])
308
0 commit comments