From c5727193af17228cc13650908004f9d7a5fd957c Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Fri, 7 Feb 2025 05:29:37 +0000 Subject: [PATCH] Add missing latestworld after parameterized type alias Fixes #57267 --- src/julia-syntax.scm | 1 + test/syntax.jl | 7 +++++++ 2 files changed, 8 insertions(+) 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