File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/docs/reference/metaprogramming Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -212,12 +212,12 @@ obj2.meth() // OK
212
212
Here, the inline method ` choose ` returns an object of either of the two dynamic types
213
213
` A ` and ` B ` . If ` choose ` had been declared with a normal return type ` : A ` , the result
214
214
of its expansion would always be of type ` A ` , even though the computed value might be
215
- of type ` B ` . The inline method is "blackbox" in the sense that details of its
215
+ of type ` B ` . The inline method is a "blackbox" in the sense that details of its
216
216
implementation do not leak out. But with the specializing return type ` <: A ` ,
217
217
the type of the expansion is the type of the expanded body. If the argument ` b `
218
218
is ` true ` , that type is ` A ` , otherwise it is ` B ` . Consequently, calling ` meth ` on ` obj2 `
219
219
type-checks since ` obj2 ` has the same type as the expansion of ` choose(false) ` , which is ` B ` .
220
- Inline methods with specializing return types are "whitebox" in that the type
220
+ Inline methods with specializing return types are a "whitebox" in the sense that the type
221
221
of an application of such a method can be more specialized than its declared
222
222
return type, depending on how the method expands.
223
223
You can’t perform that action at this time.
0 commit comments