No, I believe that's correct behavior. You probably want to use init-depend so you get a better error, like this:
(define-unit y@ (import x^) (export y^) (init-depend x^) (define y x)) Also, I see that that the init-depend failure doesn't have good source location reporting. Robby On Wed, Mar 9, 2016 at 5:41 PM, Phil Nguyen <philnguyen0...@gmail.com> wrote: > The program below complains that `x` is used before initialization. But if I > change the linking order to `x@` before `y@`, it works fine. Is this an > intended behavior or a bug? This is Racket v6.4.0.7 > > #lang racket > > (define-signature x^ (x)) > (define-signature y^ (y)) > > (define-unit x@ > (import) > (export x^) > (define x 42)) > > (define-unit y@ > (import x^) > (export y^) > (define y x)) > > (define-values/invoke-unit/infer > (link y@ x@)) > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.