~ chicken-core (master) b504d1249a9421cf1ca8d5660829dbbbd9bbac28


commit b504d1249a9421cf1ca8d5660829dbbbd9bbac28
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Wed Jul 1 22:05:23 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Wed Jul 1 22:05:23 2026 +0200

    check for empty files after traversing clauses
    
    (reported by Kon Lovett)

diff --git a/egg-compile.scm b/egg-compile.scm
index 660efab8..f6a267b5 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -357,8 +357,8 @@
           (fluid-let ((target (check-target (cadr info) scminc))
                       (dest #f)
                       (files '()))
-            (checkfiles files target)
             (for-each compile-data/include (cddr info))
+            (checkfiles files target)
             (let* ((dest (or (and dest (normalize-destination dest mode))
                              (if (eq? mode 'target)
                                  default-sharedir
Trap