Skip to content

Commit

Permalink
fix weird indentations (JuliaLang#42408)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored and LilithHafner committed Mar 8, 2022
1 parent 54f04a7 commit 54dfaa6
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions base/compiler/typelimits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -377,26 +377,25 @@ function tmerge(@nospecialize(typea), @nospecialize(typeb))
return Bool
end
# type-lattice for Const and PartialStruct wrappers
if (isa(typea, PartialStruct) || isa(typea, Const)) &&
(isa(typeb, PartialStruct) || isa(typeb, Const)) &&
widenconst(typea) === widenconst(typeb)
if ((isa(typea, PartialStruct) || isa(typea, Const)) &&
(isa(typeb, PartialStruct) || isa(typeb, Const)) &&
widenconst(typea) === widenconst(typeb))

typea_nfields = nfields_tfunc(typea)
typeb_nfields = nfields_tfunc(typeb)
if !isa(typea_nfields, Const) || !isa(typeb_nfields, Const) || typea_nfields.val !== typeb_nfields.val
typea_nfields = nfields_tfunc(typea)
typeb_nfields = nfields_tfunc(typeb)
if !isa(typea_nfields, Const) || !isa(typeb_nfields, Const) || typea_nfields.val !== typeb_nfields.val
return widenconst(typea)
end
end

type_nfields = typea_nfields.val::Int
fields = Vector{Any}(undef, type_nfields)
anyconst = false
for i = 1:type_nfields
type_nfields = typea_nfields.val::Int
fields = Vector{Any}(undef, type_nfields)
anyconst = false
for i = 1:type_nfields
fields[i] = tmerge(getfield_tfunc(typea, Const(i)),
getfield_tfunc(typeb, Const(i)))
anyconst |= has_nontrivial_const_info(fields[i])
end
return anyconst ? PartialStruct(widenconst(typea), fields) :
widenconst(typea)
end
return anyconst ? PartialStruct(widenconst(typea), fields) : widenconst(typea)
end
if isa(typea, PartialOpaque) && isa(typeb, PartialOpaque) && widenconst(typea) == widenconst(typeb)
if !(typea.source === typeb.source &&
Expand Down

0 comments on commit 54dfaa6

Please sign in to comment.