Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GD0303:必须与变体兼容的类型参数的父符号未被处理
规则 ID |
GD0303 |
类别 |
用法 |
修复是破坏性的还是非破坏性的 |
不可修复 |
默认启用 |
是 |
原因
该错误为引擎内部 bug,应当上报。
规则说明
MustBeVariantAnalyzer 在用户源代码中发现了一个未被处理的案例。请打开一个 issue 并附上一个最小的可重现项目,以便修复它。
如何解决违规情况
违反该规则的情况无法被修复。
何时抑制警告
屏蔽这条规则的警告可能会导致意想不到的错误。因为分析器(Analyzer)检测到的这种情况,往往需要开发者手动去处理,以防止那些不兼容 Variant 的类型被传递到引擎中。如果强行去编组(marshal)这些不兼容的类型,就会引发运行时错误。