~ chicken-core (chicken-5) 0dff5a8326ac4ba0bbc21f3d5a406ae98e4f1ef3


commit 0dff5a8326ac4ba0bbc21f3d5a406ae98e4f1ef3
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Fri Jul 13 21:49:20 2018 +0200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Sat Jul 14 12:45:16 2018 +1200

    Add test for interface export issue
    
    This was pointed out by Martin Schneeweis, fixed by megane.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/NEWS b/NEWS
index df0efd7f..b758cf31 100644
--- a/NEWS
+++ b/NEWS
@@ -107,6 +107,8 @@
     in favor of "import" and "import-for-syntax" to reduce confusion.
   - Module imports are now lexically scoped: identifiers provided by
     an (import ...) inside (let ...) won't be visible outside that let.
+  - Modules implementing an interface can now correctly export extra
+    identifiers (bug reported by Martin Schneeweis, fix by "megane").
 
 - Syntax expander
   - Removed support for (define-syntax (foo e r c) ...), which was
diff --git a/tests/functor-tests.scm b/tests/functor-tests.scm
index 6771802f..215826db 100644
--- a/tests/functor-tests.scm
+++ b/tests/functor-tests.scm
@@ -236,6 +236,25 @@
  '#(99))
 
 
+;; Module implementing functor plus more exports did not expose the
+;; additional exports (pointed out by Martin Schneeweis, patch
+;; suggested by megane)
+
+(define-interface iface-a (some-a))
+
+(module iface-a-plus-extra ((interface: iface-a) extra-a)
+  (import scheme (chicken base))
+  (define extra-a 'extra-a)
+  (define some-a 'some-a))
+
+(test-equal
+ "Functor with extra exports"
+ (module m6 ()
+   (import iface-a-plus-extra scheme)
+   (list extra-a some-a))
+ '(extra-a some-a))
+
+
 ;;
 
 (test-end)
Trap