diff --git a/tests/nbackend/kernelcreation/test_typification.py b/tests/nbackend/kernelcreation/test_typification.py index 13d6deceda6898a512d60a20725516d75497ba31..cb7e5561f994e0f40bdee4b6da6269d2d4232465 100644 --- a/tests/nbackend/kernelcreation/test_typification.py +++ b/tests/nbackend/kernelcreation/test_typification.py @@ -182,3 +182,14 @@ def test_typify_integer_binops_in_floating_context(): with pytest.raises(TypificationError): expr = typify(expr) + + +def test_regression_typify_constants(): + ctx = KernelCreationContext(default_dtype=Fp(32)) + freeze = FreezeExpressions(ctx) + typify = Typifier(ctx) + + x, y = sp.symbols("x, y") + expr = (-x - y) ** 2 + + typify(freeze(expr)) # just test that no error is raised