Skip to content

compile mistake for void #10516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnyannj opened this issue Sep 23, 2017 · 1 comment
Closed

compile mistake for void #10516

johnyannj opened this issue Sep 23, 2017 · 1 comment

Comments

@johnyannj
Copy link

jdk8:
one java interface:
public interface IntefaceA{ default void remove() { throw new UnsupportedOperationException("remove"); } }

and one scala calass:
class ClassB extends IntefaceA { overide remove() {throw UnsupportedOperationException} }

then make a new Java class

public class ClassC extend ClassB{ }

we will compile failed. because the the return type of classB in class file is "Nothing", not void....

@som-snytt
Copy link

There is an issue not to infer Nothing in override.

#7212

Similarly frequent with Option: #7873

The Scala method in the sample shouldn't be procedure syntax a/k/a Unit, which works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants