Record implementing an interface incorrectly printed
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
Hello,
I'm trying to apply a refactor using Spoon and there seem to be an issue when a record implements an interface.
The following code:
```
public class RecordTest {
public record SimpleRecord(int a) implements Supplier {
@Override
public Object get() {
return null;
}
}
}
```
Gets printed incorrectly (the interface disappeared and the method is now in parent class):
```
public class RecordTest {
public record SimpleRecord(int a) {
}
@Override
public Object get() {
return null;
}
}
```
And when using Snipper (note the missing } at the end):
```
public class RecordTest {
public record SimpleRecord(int a) implements Supplier {
@Override
public Object get() {
return null;
}
}
```
Is this a known issue?
Records are fairly new so it's good to see Spoon starting to support them!
Contributor guide
Assessment
This issue has not been assessed yet.