File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
docs/docs/reference/metaprogramming Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -170,17 +170,17 @@ Inline methods can override other non-inline methods. The rules are as follows:
1701702 . Inline methods are effectively final .
171171
1721723 . Inline methods can also be abstract . An abstract inline method can be implemented only by other inline methods. It cannot be invoked directly :
173- ```scala
174- abstract class A {
175- inline def f (): Int
176- }
177- object B extends A {
178- inline def f (): Int = 22
179- }
180- B .f() // OK
181- val a : A = B
182- a.f() // error: cannot inline f() in A.
183- ```
173+ ```scala
174+ abstract class A {
175+ inline def f (): Int
176+ }
177+ object B extends A {
178+ inline def f (): Int = 22
179+ }
180+ B .f() // OK
181+ val a : A = B
182+ a.f() // error: cannot inline f() in A.
183+ ```
184184
185185### Relationship to @ inline
186186
You can’t perform that action at this time.
0 commit comments