Skip to content

Commit cfcfe8c

Browse files
aviateskpull[bot]
authored andcommitted
limit the constructor signatures of PartialStruct and Conditional (#45436)
1 parent 8e84da7 commit cfcfe8c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

base/boot.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ eval(Core, quote
432432
relocatability)
433433
end
434434
Const(@nospecialize(v)) = $(Expr(:new, :Const, :v))
435-
PartialStruct(@nospecialize(typ), fields::Array{Any, 1}) = $(Expr(:new, :PartialStruct, :typ, :fields))
435+
PartialStruct(typ::DataType, fields::Array{Any, 1}) = $(Expr(:new, :PartialStruct, :typ, :fields))
436436
PartialOpaque(@nospecialize(typ), @nospecialize(env), parent::MethodInstance, source::Method) = $(Expr(:new, :PartialOpaque, :typ, :env, :parent, :source))
437437
InterConditional(slot::Int, @nospecialize(vtype), @nospecialize(elsetype)) = $(Expr(:new, :InterConditional, :slot, :vtype, :elsetype))
438438
MethodMatch(@nospecialize(spec_types), sparams::SimpleVector, method::Method, fully_covers::Bool) = $(Expr(:new, :MethodMatch, :spec_types, :sparams, :method, :fully_covers))

base/compiler/typelattice.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct Conditional
3737
vtype
3838
elsetype
3939
function Conditional(
40-
var,
40+
var::SlotNumber,
4141
@nospecialize(vtype),
4242
@nospecialize(nottype))
4343
return new(var, vtype, nottype)

0 commit comments

Comments
 (0)