Skip to content

Commit 3cb5b40

Browse files
committed
Cover combined nested field refinements (test #315)
1 parent 8bb0b42 commit 3cb5b40

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package testSuite;
2+
3+
import liquidjava.specification.Refinement;
4+
5+
public class CorrectCombinedNestedFields {
6+
@Refinement("_ < 0")
7+
int port = -1;
8+
9+
private final Job job = new Job();
10+
11+
static class Marker {
12+
int value;
13+
}
14+
15+
@Refinement("_ < 0")
16+
public int getOuterPort() {
17+
return port;
18+
}
19+
20+
@Refinement("_ >= 0")
21+
public int getJobPort() {
22+
return job.port;
23+
}
24+
25+
public void send() {
26+
job.port = 5;
27+
}
28+
29+
static class Job {
30+
@Refinement("_ >= 0")
31+
int port;
32+
}
33+
}

0 commit comments

Comments
 (0)