type system_app, domain, coredomain; 和 typeattribute system_app coredomain; 区别
两者的区别
-
声明新类型 vs. 修改现有类型
-
type
:用于声明一个新的类型,并为其分配初始属性。 -
typeattribute
:用于为一个已经存在的类型添加新的属性。
-
-
属性分配
-
type
:可以同时声明类型并分配多个属性(如domain
和coredomain
)。 -
typeattribute
:只能为一个已存在的类型添加单个属性。
-
-
编译时检查
-
type
:如果类型名称已经存在,会导致编译错误。 -
typeattribute
:如果目标类型不存在,会导致编译错误。
-