edwardwongtl
04/26/2018, 5:39 AM@Deprecated
and ReplaceWith()
, while replacing normal functions works fine, replacing infix function will be like this
@Deprecated(..., replaceWith = ReplaceWith("bar(x)"))
infix fun Foo.foo(x: Int) = ...
infix fun Foo.bar(x: Int) = ...
foo foo 10
// After replacement becomes
foo.bar(10)
is there anyway for the IDE do the replacement such that it becomes foo bar 10
?gildor
04/26/2018, 5:47 AMedwardwongtl
04/26/2018, 5:48 AMgildor
04/26/2018, 5:49 AMedwardwongtl
04/26/2018, 5:50 AMa + b foo 10
into a + b bar 10
?(a + b).bar(10)
or (a+b) bar 10
gildor
04/26/2018, 5:50 AM(a + b).bar(10)
edwardwongtl
04/26/2018, 5:51 AMgildor
04/26/2018, 5:51 AM(a + b) foo 10
works perfectly, replaced to (a + b) bar 10
a + b foo 10
is very confusing, probably IDE should warn user to avoid it and ask to add parenthesisedwardwongtl
04/26/2018, 5:54 AMa bindTo b until event
in my project, which should be better?gildor
04/26/2018, 5:55 AMedwardwongtl
04/26/2018, 5:56 AM