Skip to content

Commit

Permalink
Add test for basic record syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Aug 6, 2022
1 parent da5ed4f commit 0710c7b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/files/pos/t12474/Nat.java
@@ -0,0 +1,6 @@
// javaVersion: 17+

public sealed interface Nat permits Nat.Zero, Nat.Succ {
public static final record Zero() implements Nat {}
public static final record Succ(Nat pred) implements Nat {}
}
5 changes: 5 additions & 0 deletions test/files/pos/t12474/s.scala
@@ -0,0 +1,5 @@
// javaVersion: 17+

class S {
def j: Nat = new Nat.Zero
}

0 comments on commit 0710c7b

Please sign in to comment.