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
Currently CodeQL permits writing classes with predicates using database queries, and then subclasses which do not fulfill the requirements for these database types. This renders these inherited predicates unusable and creates pretty cryptic compilation errors when trying to use them. Examples:
The CodeQL compiler would detect such unusuable inherited predicates and cause a compilation error (or at least a warning) for the subclass. This would avoid exposing such subclasses to the user, causing the cryptic compilation errors when they try to use predicates of the subclass.
The error message would be clearer, ideally pointing to where the requirement for the database types come from, with predicate call hierarchy if possible. For example for CodeQL Java's Array.getQualifiedName() (see Java: Array.getPackage() (and Array.getQualifiedName()) cannot be used codeql#7067) it should indicate that RefType.getPackage() only supports @class and @interface.
The text was updated successfully, but these errors were encountered:
Currently CodeQL permits writing classes with predicates using database queries, and then subclasses which do not fulfill the requirements for these database types. This renders these inherited predicates unusable and creates pretty cryptic compilation errors when trying to use them. Examples:
Array.getPackage()
(andArray.getQualifiedName()
) cannot be used codeql#7067It would be good if:
Array.getQualifiedName()
(see Java:Array.getPackage()
(andArray.getQualifiedName()
) cannot be used codeql#7067) it should indicate thatRefType.getPackage()
only supports@class
and@interface
.The text was updated successfully, but these errors were encountered: