Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion stdlib/LinearAlgebra/src/lapack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ macro chkvalidparam(position::Int, param, validvalues)
:(chkvalidparam($position, $(string(param)), $(esc(param)), $validvalues))
end
function chkvalidparam(position::Int, var::String, val, validvals)
# mimic `repr` for chars without explicitly calling it
# This is because `repr` introduces dynamic dispatch
_repr(c::AbstractChar) = "'$c'"
_repr(c) = c
if val ∉ validvals
throw(ArgumentError(
lazy"argument #$position: $var must be one of $validvals, but $(repr(val)) was passed"))
lazy"argument #$position: $var must be one of $validvals, but $(_repr(val)) was passed"))
end
return val
end
Expand Down