我正在使用Chrome 72 中提供的新类公共字段声明,我遇到了这种非常奇怪的行为:class Extended { property = 5;}class Extending extends Extended { get property() { return false; }}const extending = new Extending();console.log(extending.property);//logs 5如果这是预期的结果,我会感到惊讶,因为它使get扩展类上的 ter 无法访问。这是一个错误吗?
添加回答
举报
0/150
提交
取消