如何在一个dataclass中使用另外一个dataclass

如题,有如下代码,但发现好像不太行,请问有什么比较好的解决方法嘛:

import taichi as ti
ti.init()

@ti.dataclass
class material:
    types: ti.types.vector(3, float)
    
    @ti.func
    def init(self):
        self.types = ti.Vector([2,13,4])
        
    @ti.func
    def stress(self):
        pass

@ti.dataclass
class Sphere:
    center: ti.types.vector(3, float)
    
    @ti.func
    def init(self):
        self.center = ti.Vector([2,13,4])
        
    @ti.func
    def set(self):
        self.mat = material(types=ti.Vector([1,2,3]))
        
    @ti.func
    def update(self):
        self.mat.stress()

@ti.data_oriented
class A:
    def __init__(self):
        self.a_taichi_struct = Sphere.field(shape=12)
        
    @ti.kernel
    def execk(self):
        self.a_taichi_struct[1].set()
        print(self.a_taichi_struct[1].center)
        
a=A()
a.execk()

个人的理解是
你把dataclass 看作是一个C系的结构体
所有结构体的参数必须被预先声明

@ti.dataclass
class Sphere:
    center: ti.types.vector(3, float)
    mat: material
    @ti.func
    def ....

我在1.3版本这样是可以的