-
-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jvm] refer to static instance methods correctly
closes #11023
- Loading branch information
Showing
6 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
/** | ||
* Main class. | ||
*/ | ||
class Main { | ||
public static function main():Void { | ||
test.Util.testStatic(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--cmd javac -d bin test/Util.java -g | ||
--cmd cd bin | ||
--cmd jar cf test.jar test/Util.class | ||
--cmd cd .. | ||
|
||
--next | ||
|
||
-cp src | ||
--main Main | ||
--java-lib bin/test.jar | ||
--jvm bin/main.jar | ||
|
||
--next | ||
|
||
--cmd java -jar bin/main.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Util.testStatic() called! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package test; | ||
|
||
public interface Util { | ||
public static void testStatic() { | ||
System.out.println("Util.testStatic() called!"); | ||
} | ||
} |
b4a6d43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like only linux is ok with this test :/
b4a6d43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I copied it from https://github.com/HaxeFoundation/haxe/tree/development/tests/misc/java/projects/Issue9574, but there's a bin directory there. Could you try adding it like here?
b4a6d43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure :)
Still sounds a bit weird that other platforms need the
bin
directory to exist, though 🤔b4a6d43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it either...