diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 726312a13d10f..035d2a84e729d 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1480,6 +1480,7 @@ `(block (= ,rr (where ,type-ex ,@params)) (,(if allow-local 'assign-const-if-global 'const) ,name ,rr) + (latestworld-if-toplevel) ,rr))) (expand-forms `(const (= ,name ,type-ex))))) diff --git a/test/syntax.jl b/test/syntax.jl index b409dba5335f1..5f49f13fca641 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -4081,3 +4081,10 @@ end # Ambiguous 1-arg anymous vs macrosig @test_parseerror "function (@foo(a)) end" + +# #57267 - Missing `latestworld` after typealias +abstract type A57267{S, T} end +@test_nowarn @eval begin + B57267{S} = A57267{S, 1} + const C57267 = B57267 +end