File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -214,23 +214,23 @@ given BigDecimalAsIfInlineIntegral: BigDecimalIsConflicted with InlineIntegral[B
214
214
215
215
object tests :
216
216
import InlineNumeric .*
217
+ import InlineIntegral .{/ => quot , % }
218
+ import InlineFractional .{/ }
217
219
218
220
// A generic inline operation that inlines/specializes primitive operations
219
- inline def foo [T : InlineNumeric ](a : T , b : T ) =
221
+ inline def foo [T : InlineNumeric ](inline a : T , inline b : T ) =
220
222
a + b * b
221
223
222
- inline def div [T : InlineIntegral ](a : T , b : T ) =
223
- import InlineIntegral .{/ , % }
224
- a / b % b
224
+ inline def div [T : InlineIntegral ](inline a : T , inline b : T ) =
225
+ a quot b % b
225
226
226
- inline def div [T : InlineFractional ](a : T , b : T ) =
227
- import InlineFractional .{/ }
227
+ inline def div [T : InlineFractional ](inline a : T , inline b : T ) =
228
228
a / b + a
229
229
230
- inline def bar [T : InlineNumeric ](a : T ) =
230
+ inline def bar [T : InlineNumeric ](inline a : T ) =
231
231
a.toInt
232
232
233
- inline def sign [T : InlineNumeric ](a : T ) =
233
+ inline def sign [T : InlineNumeric ](inline a : T ) =
234
234
a.sign
235
235
236
236
def test (a : Int , b : Int ) =
You can’t perform that action at this time.
0 commit comments