Open sbc100 opened 3 months ago
It looks like when this feature was first added we only used the LightTypeID when the type was not polymorphic: 2bbdb0cd396d785a9587bc776d699283c1902ff7
However this check was removed in #10914
@brendandahl
@dnfield it seems like the assumption of https://github.com/emscripten-core/emscripten/pull/10914 is that all cases should work find without RTTI. If that is true why do we have the rtti mode still? Why not default to not -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0
and no rtti usage.
However, based on the above failure, I'm not sure this assumption is true.
CC @chadaustin
The
EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0
feature seems to not work with polymorphic types.Adding a flavor of
other.test_embind
that builds withEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0
causes the test to fail with:I believe this is because
getLightTypeID()
is able to inspect the type of a value whenEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES
is enabled but other wise it only looks at the typeT
and not thevalue
: https://github.com/emscripten-core/emscripten/blob/d99707c10d916cdb2064c38216ab7304cdb781c0/system/include/emscripten/wire.h#L85-L95