-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins ITs: Java records are also in standard test projects
- Loading branch information
1 parent
ce34625
commit a0acb0c
Showing
5 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...tend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/JavaRecord.java
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 record JavaRecord(String name) { | ||
public XtendA foo(XtendA test) { | ||
return test; | ||
} | ||
} |
9 changes: 6 additions & 3 deletions
9
...e.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/XtendA.xtend
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package test | ||
|
||
class XtendA extends JavaB { | ||
|
||
def JavaB test2(XtendC s) { | ||
return s.foo.newJavaB | ||
} | ||
|
||
def JavaB newJavaB() { | ||
return new JavaB() | ||
} | ||
|
||
|
||
def JavaRecord newJavaRecord() { | ||
return new JavaRecord("a test") | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
...se.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/JavaRecord.java
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,5 @@ | ||
public record JavaRecord(String name) { | ||
public void useXbaseType(XbaseReferToJava xbaseType) throws Throwable { | ||
xbaseType.myMethod(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...t.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/XbaseReferToJava.xbase
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
val JavaClazz jc = null | ||
val JavaRecord jr = new JavaRecord("test") | ||
val name = jr.name() | ||
jc.useXbaseType(this) |