class Person { get genderCode() {return "X";} } class Male extends Person { get genderCode() {return "M";} } class Female extends Person { get genderCode() {return "F";} }
class Person { get genderCode() {return this._genderCode;} }
反向 用子类替换类型码
别名 用字段替换子类