-
Notifications
You must be signed in to change notification settings - Fork 422
Description
Problem
Dynamic dispatch of static methods called directly on interface-typed values (obj.staticMethod() syntax) has no dedicated test coverage. Existing tests only cover the generic T::staticMethod() pattern and associated-type static methods, but not the case where a static method is called on an interface-typed value whose concrete type is unknown at compile time.
Additionally, accessing static const members through dynamic dispatch causes an internal compiler error (ICE 99999) on both HLSL and SPIRV targets, which is undocumented.
Proposed Solution
Add test coverage for:
-
Static method dynamic dispatch - Verify that static methods called on interface-typed values produce correct runtime results when the concrete type is resolved at runtime. Cover mixed static and instance method dispatch on the same interface, and verify the compiler reports the expected dynamic dispatch sites. Target multiple backends (dx12, vk, cuda, mtl).
-
Static const with dynamic dispatch - Document the ICE when accessing
static constinterface members through dynamic dispatch, both via direct interface-typed values and via generic parameters. Tests should be disabled until the compiler either supports this or produces a proper diagnostic.
Related
- ICE with
static constin dynamic dispatch should be tracked separately (compiler emitsinternal error 99999: unexpected IR opcode during code emit)