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.

Java 8: support auto-SMI of our Callable types

See original GitHub issue

[@FroMage] In theory we should be able to pretend that any method in Java which accepts an SMI (Single-Method Interface) accepts a union of the SMI and its corresponding Ceylon Callable, and do the magic auto-conversion in our backend, when provided with a Callable.

Similarly we should be able to pretend that any method in Java which returns an SMI returns an intersection of the SMI and its corresponding Ceylon Callable, and do the magic auto-conversion in our backend.

I’m not 100% convinced we can do this due to the usual issues with types and bounds and type-arguments, but we can try and investigate.

I highly doubt we’ll have time to do this for 1.1, so marking 1.2

[Migrated from ceylon/ceylon-compiler#1617]

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:115 (106 by maintainers)

github_iconTop GitHub Comments

1reaction
FroMagecommented, Oct 21, 2016

This appears to work. Let’s see if I can make the IDEs compile with the changes I did.

1reaction
FroMagecommented, Oct 20, 2016

I removed it after 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Callable (Java Platform SE 8 ) - Oracle Help Center
The Callable interface is similar to Runnable , in that both are designed for classes whose instances are potentially executed by another thread....
Read more >
Java 8 Runnable and Callable Lambda Example with Argument
Java 8 supports lambda expression. In java 8 Runnable interface has been annotated with @FunctionalInterface . Now we can create Runnable ...
Read more >
Is there an interface similar to Callable but with arguments?
Since Java 8 there is a whole set of Function-like interfaces in the java.util.function package. The one you're asking for specifically is simply...
Read more >
What is the difference between Callable<T> and Java 8's ...
I noticed that the lambda expression () -> Display.isCloseRequested() is actually type compatible with both Callable<Boolean> and Supplier<Boolean> .
Read more >
Functional Interfaces in Java 8 | Baeldung
Since a primitive type can't be a generic type argument, there are versions of the Function interface for the most used primitive types...
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