JuliaEditorSupport / julia-intellij

:computer: Julia Plugin for IntelliJ IDEA ┗:smiley:┛ ┏:smiley:┓ ┗:smiley:┛
GNU General Public License v3.0
303 stars 30 forks source link

Converting ordinary to compact overloaded functions does not work properly #457

Open mattBrzezinski opened 4 years ago

mattBrzezinski commented 4 years ago

If you have an overloaded function such as:

Base.isapprox(ad::Wirtinger)
    # some code here
end

Converting this to a compact function results in:

isapprox(ad::Wirtinger) =  # some code here

Converting this back to an ordinary function results in:

Base.function isapprox(ad::Wirtinger)
    # some code here
end

However, converting from the block above results in the proper compact version of:

Base.isapprox(ad::Wirtinger) =  # some code here

Properly this should just go back and forth between:

function Base.isapprox(ad::Wirtinger)
   # some code here
end

Base.isapprox(ad::Wirtinger) =  # some code here
ice1000 commented 4 years ago

This is why I was telling you about changing the element passed to JuliaReplaceWithTextIntention