Skip to content
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

Support static methods in Java 8 interfaces under joint compilation #8852

Closed
scabug opened this issue Sep 18, 2014 · 2 comments
Closed

Support static methods in Java 8 interfaces under joint compilation #8852

scabug opened this issue Sep 18, 2014 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Sep 18, 2014

% qscalac sandbox/{Test.java,test.scala}
sandbox/Test.java:2: error: `;' expected but `{' found.
  public static int foo() {
                          ^
one error found
topic/scalap-lite ~/scala tail -n100 sandbox/{Test.java,test.scala}
==> sandbox/Test.java <==
public interface Test {
  public static int foo() {
  	return 42;
  }
}

class JavaTest {
	static {
		System.out.println(Test.foo());
	}
}

==> sandbox/test.scala <==
object Test {
  Foo.test()
}

See: http://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html#static

@scabug
Copy link
Author

scabug commented Sep 18, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8852?orig=1
Reporter: @retronym
Affected Versions: 2.11.2

@scabug
Copy link
Author

scabug commented Sep 18, 2014

@retronym said:
scala/scala#3989

@scabug scabug closed this as completed Sep 18, 2014
@scabug scabug added the critical label Apr 7, 2017
@scabug scabug added this to the 2.11.4 milestone Apr 7, 2017
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