-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorparserLanguage parsing and surface syntaxLanguage parsing and surface syntax
Description
No replies on discourse, so I guess this indeed is a bug.
Suppose we have this:
SomeType = Tuple{Int8, Int16}
f(::Type{Tuple{A, B}}) where {A <: Any, B <: Any} = B
If we now do f(SomeType), we get Int16 in return as expected.
The following however, results in ERROR: UndefVarError: B not defined:
(function(::Type{Tuple{A, B}}) where {A <: Any, B <: Any}
B
end)(SomeType)
versioninfo() output: (1.7.3 behaves the same in this case)
Julia Version 1.8.0-beta3
Commit 3e092a2521 (2022-03-29 15:42 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
Threads: 1 on 8 virtual cores
Environment:
LD_PRELOAD = /usr/lib/libswmhack.so.0.0
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorparserLanguage parsing and surface syntaxLanguage parsing and surface syntax