Am 19.04.2013 18:44, schrieb Matej Nanut:

Can it be because the parameter passed into renderCompat is actually an "in javaRunVM" instead of a plain "javaRunVM"?

Yes, that sounds very likely. The reason is that const(T) and T have
a different TypeInfo and this is used in the assertion to check the
type. Maybe the assertion should rather use Variant.convertTo and be
less strict about the actual type...

BTW the reason for release builds working is simply because assertions
are disabled in release mode and Variant.get presumably is able to
implicitly convert the value to non-cost.

I'll go ahead and change the assertion to use convertsTo.