Skip to content

Commit 1b3fb0e

Browse files
authored
Compiler: Fix usage of @nospecialize on optional parameter (#61519)
As @mlechu pointed out in #61489 (comment), flisp silently ignores this `@nospecialize` if it doesn't wrap the full arg expression.
1 parent 78698ab commit 1b3fb0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Compiler/src/tfuncs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ add_tfunc(Core.throw_methoderror, 1, INT_INF, @nospecs((𝕃::AbstractLattice, x
9595
# if isexact is false, the actual runtime type may (will) be a subtype of t
9696
# if isconcrete is true, the actual runtime type is definitely concrete (unreachable if not valid as a typeof)
9797
# if istype is true, the actual runtime value will definitely be a type (e.g. this is false for Union{Type{Int}, Int})
98-
function instanceof_tfunc(@nospecialize(t), astag::Bool=false, @nospecialize(troot) = t)
98+
function instanceof_tfunc(@nospecialize(t), astag::Bool=false, @nospecialize(troot = t))
9999
if isa(t, Const)
100100
if isa(t.val, Type) && valid_as_lattice(t.val, astag)
101101
return t.val, true, isconcretetype(t.val), true

0 commit comments

Comments
 (0)