You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash: a call argument that is itself a call, in a file that declares a record (CtRecordImpl does not have CtRole.TYPE) #568
Exception in thread "main" java.lang.RuntimeException:
Error while checking CtMethodImpl
on f() {
...
with The element of class class spoon.support.reflect.declaration.CtRecordImpl does not have CtRole.TYPE
It needs no annotations, only a record somewhere in the file and a call whose argument is a call (twice(size())).
First bad commit (git bisect): 9aa2467 "Write a call argument as the caller wrote it in refinement errors" (#486). MethodsFunctionsChecker.createVariableRepresentingArgument now calls getOriginalSourceFragment() on call arguments. Spoon's fragment builder then walks the file's record and throws.
A possible fix: catch the SpoonException and fall back to toString(), or read the argument's text from its source position.
Found while moving liquid-java/co-specification to main: a mined client with a record Result (ImageWriteParam, E_OSS_A1_04) now crashes for every spec. Related, but a different path: #369.
Activity