Skip to content

Commit 0dba6f6

Browse files
committed
test type inference for substitution
1 parent a243650 commit 0dba6f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/subs.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Base.Test: @inferred
2+
13
facts("Substitution") do
24
@polyvar x[1:3]
35

@@ -23,4 +25,7 @@ facts("Substitution") do
2325
P = [1 2 3; 2 4 5; 3 5 6]
2426
p = MatPolynomial(P, x)
2527
@fact p(ones(3), x) --> 31
28+
29+
p = x[1] + x[2] + 2*x[1]^2 + 3*x[1]*x[2]^2
30+
@inferred p([1.0, 2.0], [x[1], x[2]])
2631
end

0 commit comments

Comments
 (0)