question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to chain conversions

See original GitHub issue

For use-cases similar to the one mentioned here it would be nice if (implicit) convert() calls could be chained like so: .convert { File(it).expandTilde().path }.file()

As this seems to be a serious breaking change, I wonder if things would be easier if another function, like changeValue(), would be introduced for this purpose that is not allowed to change the type.

In any case, it’s misleading currently that something like .convert { File(it).expandTilde().path }.file() compiles and runs, but silently ignores the first (explicit) conversion. Can we throw an exception if an existing conversion gets replaced?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ajaltcommented, Mar 17, 2020

Good catch; I updated the changelog and release notes.

1reaction
ajaltcommented, Feb 27, 2020

I was was thinking the same thing; the expansion was a bit of a hack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sportster Chain Conversion: Pros and Cons - YouMotorcycle
A Sportster chain drive conversion can give you some performance benefits, but not as much as many think. These are all the pros...
Read more >
Sportster Chain Drive Conversion Pros and Cons - YouTube
A Sportster chain drive conversion can give you some performance benefits, but not as much as many think. These are all the 7...
Read more >
Chain Conversion or Keep the Belt on the Harley-Davidson ...
We'll explore the reasons for a chain drive conversion on the Sportster and how it compares to the factory belt drive system.
Read more >
Fuel Moto Chain Drive Conversion Kit for Harley Davidson ...
Following my 2020 Harley Davidson Street Glide Special build series - in this video I install a Fuel Moto Chain Drive Conversion Kit...
Read more >
Chaining implicit conversion operators - c++ - Stack Overflow
The complier will only perform one implicit conversion automatically. Normally implicit conversions are best avoided - they tend to make code ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found