Is this valid? If not, is there a way to do something like this where I can initialize a field in a parent class with a const in a child class?
valuetype MyBaseValueType {
public string member;
};
valuetype MyValueType:
MyBaseValueType {
public const string member2 = "Member Name";
member = member2;
};
valuetype Message: MyValueType{
public long data;
};
You can try the @default annotation to set a default value for a field:
struct Test {
@default("Hello") string str;
@default(43) int32 value;
};