We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a56ecd commit ad977cbCopy full SHA for ad977cb
base/compiler/typeutils.jl
@@ -41,7 +41,7 @@ end
41
# some of these queries, this check can be used to somewhat protect against making incorrect
42
# decisions based on incorrect subtyping. Note that this check, itself, is broken for
43
# certain combinations of `a` and `b` where one/both isa/are `Union`/`UnionAll` type(s)s.
44
-isnotbrokensubtype(@nospecialize(a), @nospecialize(b)) = (!iskindtype(b) || !isType(a) || hasuniquerep(a.parameters[1]))
+isnotbrokensubtype(@nospecialize(a), @nospecialize(b)) = (!iskindtype(b) || !isType(a) || hasuniquerep(a.parameters[1]) || b <: a)
45
46
argtypes_to_type(argtypes::Array{Any,1}) = Tuple{anymap(widenconst, argtypes)...}
47
0 commit comments