KE2: Add more dbscheme comments

This commit is contained in:
Ian Lynagh
2024-10-10 17:45:29 +01:00
parent 643419a32f
commit 4b73fed267

View File

@@ -831,6 +831,16 @@ isLocalClassOrInterface(
int parent: @localtypedeclstmt ref
);
/**
* Holds if `constructorid` is a compiler-generated constructor,
* i.e. where it is not explicitly defined in the source code.
* For example, the constructor for
* ```
* class SomeClass {}
* ```
* Only holds for constructors of classes for which we see the
* source code, not classes from external libraries.
*/
isDefConstr(
int constructorid: @constructor ref
);
@@ -841,6 +851,25 @@ lambdaKind(
int bodyKind: int ref
);
/**
* Holds if `constructorid` is the canonical constructor of a Java
* record, e.g. the first constructor in
* ```
* record Rectangle(double length, double width) {
* public Rectangle(double length, double width) {
* if (length <= 0 || width <= 0) {
* throw new java.lang.IllegalArgumentException("Bad size");
* }
* this.length = length;
* this.width = width;
* }
*
* public Rectangle(double size) {
* this(size, size);
* }
* }
* ```
*/
isCanonicalConstr(
int constructorid: @constructor ref
);