diff --git a/src/macroexpand.scm b/src/macroexpand.scm index c3173423cb53f..b7b3e78c994ce 100644 --- a/src/macroexpand.scm +++ b/src/macroexpand.scm @@ -85,6 +85,8 @@ ;; where (pattern-lambda (where ex . vars) (cons 'varlist (typevar-names vars))) + (pattern-lambda (= (curly ex . vars) rhs) + (cons 'varlist (typevar-names vars))) ;; let (pattern-lambda (let binds ex) diff --git a/test/syntax.jl b/test/syntax.jl index 4b969ab44f619..a90c55b1ef1a7 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1448,3 +1448,12 @@ end @test Meta.lower(@__MODULE__, :(Int[ return 0 for i=1:2 ])) == Expr(:error, "\"return\" not allowed inside comprehension or generator") @test [ ()->return 42 for i = 1:1 ][1]() == 42 @test Function[ identity() do x; return 2x; end for i = 1:1 ][1](21) == 42 + +# issue #27155 +macro test27155() + quote + MyTest27155{Arg} = Tuple{Arg} + MyTest27155 + end +end +@test @test27155() == (Tuple{T} where T)