Skip to content

Commit 5f28c9a

Browse files
committed
FEAT: improve import/version error message in case when module has no name
before: ``` >> import/version module [version: 1.0.0][a: 1] 2.0.0 ** syntax error: this script needs none 2.0.0 or better to run correctly ``` now: ``` ** syntax error: this script needs version 2.0.0 or better to run correctly ```
1 parent 6f5fc86 commit 5f28c9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mezz/sys-load.reb

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ load-module: function [
595595

596596
; Verify /check and /version
597597
all [check sum !== modsum] [cause-error 'access 'invalid-check module]
598-
all [version ver > modver] [cause-error 'syntax 'needs reduce [name ver]]
598+
all [version ver > modver] [cause-error 'syntax 'needs reduce [any [name 'version] ver]]
599599

600600
; If no further processing is needed, shortcut return
601601
all [not override? any [mod delay]] [return reduce [name mod]]

0 commit comments

Comments
 (0)