错误:case-to-case inheritance is prohibited. To overcome this limitation, use extractors to pattern match on non-leaf nodes.

错误:case-to-case inheritance is prohibited. To overcome this limitation, use extractors to pattern match on non-leaf nodes.

此处错误:样例类不可以作为继承链路中的叶子结点

解决方案

不采用case,而是老老实实的构造参数和伴生对象。

posted @ 2024-04-28 16:48  Nakano_Miku  阅读(15)  评论(0)    收藏  举报
返回顶端