Skip to content

Commit 8f858aa

Browse files
Merge pull request #8247 from robstoll/patch-20
doc(inline specialisation): typos and improvements
2 parents 6b38045 + b68db30 commit 8f858aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/metaprogramming/inline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ obj2.meth() // OK
212212
Here, the inline method `choose` returns an object of either of the two dynamic types
213213
`A` and `B`. If `choose` had been declared with a normal return type `: A`, the result
214214
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
216216
implementation do not leak out. But with the specializing return type `<: A`,
217217
the type of the expansion is the type of the expanded body. If the argument `b`
218218
is `true`, that type is `A`, otherwise it is `B`. Consequently, calling `meth` on `obj2`
219219
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
221221
of an application of such a method can be more specialized than its declared
222222
return type, depending on how the method expands.
223223

0 commit comments

Comments
 (0)