mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Configure IntelliJ to respect @LateInit annotations (#1606)
IntelliJ can understand that some annotations on fields mean that they are implicitly initialized, which means we don't get the "field XXX is not initialized" warning for `@LateInit` fields. This setting, unfortunately, is recorded into `.idea/misc.xml`, which contains a bunch of arbitrary stuff that we don't want to check into source control This adds some logic to touch up that file to mark `@LateInit` as implicitly initialized fields, so we don't get any editor warnings. Also, suppress some warnings.
This commit is contained in:
@@ -47,6 +47,7 @@ public final class TypeAlias extends Member implements Value {
|
||||
}
|
||||
|
||||
public void initAliasedType(PType type) {
|
||||
//noinspection ConstantValue
|
||||
assert aliasedType == null;
|
||||
aliasedType = type;
|
||||
}
|
||||
@@ -80,6 +81,7 @@ public final class TypeAlias extends Member implements Value {
|
||||
|
||||
/** Returns the type that this type alias stands for. */
|
||||
public PType getAliasedType() {
|
||||
//noinspection ConstantValue
|
||||
assert aliasedType != null;
|
||||
return aliasedType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user