Skip to content
Snippets Groups Projects

Fix typing of constants

Merged Daniel Bauer requested to merge hyteg/pystencils:bauerd/fix-const-typing into backend-rework
1 unresolved thread
1 file
+ 11
0
Compare changes
  • Side-by-side
  • Inline
@@ -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
Loading