File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,26 @@ class FunctionTypeIsolation {
127
127
return getKind () == Kind::NonIsolatedCaller;
128
128
}
129
129
130
+ // / Two function type isolations are equal if they have the same kind and
131
+ // / (when applicable) the same global actor types.
132
+ // /
133
+ // / Exact equality is the right thing to ask about when deciding whether
134
+ // / two isolations are the same statically, because we have to treat
135
+ // / different specializations of the same generic global actor type
136
+ // / as potentially different isolations. (Of course, you must be comparing
137
+ // / types that have been mapped into the same context.)
138
+ // /
139
+ // / Exact equality is *not* the right thing to ask about when deciding
140
+ // / whether two isolations might be the same dynamically, because two
141
+ // / different specializations of the same generic global actor type
142
+ // / could absolutely end up being the same in concrete specialization.
143
+ bool operator ==(FunctionTypeIsolation other) const {
144
+ return value == other.value ;
145
+ }
146
+ bool operator !=(FunctionTypeIsolation other) const {
147
+ return value != other.value ;
148
+ }
149
+
130
150
// The opaque accessors below are just for the benefit of ExtInfoBuilder,
131
151
// which finds it convenient to break down the type separately. Normal
132
152
// clients should use the accessors above.
You can’t perform that action at this time.
0 commit comments