- edited description
Code inspector false positive - "class unexpected" , "@ expected, got }"
Issue #2042
duplicate
This is a weird one …
Generates code inspector error in line 5 (end of interface definition) and line 9 (start of inner class declaration); compiles fine
public inherited sharing class UUID_IC2 {
public interface IBar {
String foo();
}
static final String x = 'a';
class Concrete implements IBar {
public String foo() {
return '';
}
}
}
By moving the static String higher in the code (above the interface declaration), no code inspection errors
public inherited sharing class UUID_IC2 {
static final String x = 'a';
public interface IBar {
String foo();
}
class Concrete implements IBar {
public String foo() {
return '';
}
}
}
Comments (3)
-
reporter -
repo owner - changed status to duplicate
Duplicate of
#1992. -
repo owner Yeah, this is a strange one that has to do with IC2's Apex parser's pinning and recovery logic. I'd actually had this one teed up for more investigation next week. Let's follow along over on
#1992. - Log in to comment