-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
java.lang.Record is a super type of all records. (#6070)
* Record is a super type of all records. * Inference doesn't work with records. * Change skipDef. * Don't run inference on records. * Delete test. * Fix Javadoc.
- Loading branch information
Showing
7 changed files
with
47 additions
and
4 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
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
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,22 @@ | ||
// @below-java17-jdk-skip-test | ||
package issue6069; | ||
|
||
public class Issue6069 { | ||
public interface MyInterface { | ||
Record foo(); | ||
} | ||
|
||
public static class MyClass implements MyInterface { | ||
|
||
public MyRecord foo() { | ||
return new MyRecord(42); | ||
} | ||
|
||
record MyRecord(int bar) {} | ||
|
||
public static void main(String[] args) { | ||
MyClass f = new MyClass(); | ||
System.out.println(f.foo()); | ||
} | ||
} | ||
} |