From b0c01f052464a478246e6c5da35c2a7b98cc59cc Mon Sep 17 00:00:00 2001 From: Brian Hawley Date: Sat, 6 Apr 2013 20:59:15 -0500 Subject: [PATCH] Private module imports take precedence For module Needs imports, give private module exports a higher priority than runtime library (lib) imports. Doesn't affect scripts, which use strict in-order precedence already. See http://issue.cc/r3/1998 for details. --- src/mezz/sys-base.r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mezz/sys-base.r b/src/mezz/sys-base.r index ad190ab52f..b510d1e941 100644 --- a/src/mezz/sys-base.r +++ b/src/mezz/sys-base.r @@ -167,16 +167,16 @@ make-module*: func [ ; All words of the module body are module variables: bind/new body obj ; The module keeps its own variables (not shared with system): + if object? mixins [resolve obj mixins] ;resolve obj sys -- no longer done -Carl resolve obj lib - if object? mixins [resolve obj mixins] ][ ; Only top level defined words are module variables. bind/only/set body obj ; The module shares system exported variables: - if object? mixins [bind body mixins] bind body lib ;bind body sys -- no longer done -Carl + if object? mixins [bind body mixins] ] bind body obj