We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ca251e commit ecc70edCopy full SHA for ecc70ed
Project.toml
@@ -1,7 +1,7 @@
1
name = "Mjolnir"
2
uuid = "1154507a-7ac2-44fe-9f15-34617bca9db5"
3
authors = ["Mike J Innes <[email protected]>"]
4
-version = "0.2.0"
+version = "0.2.1"
5
6
[deps]
7
IRTools = "7869d1d1-7146-5819-86e3-90919afe41df"
test/trace.jl
@@ -164,3 +164,15 @@ tr = @trace f(::Matrix{Int32})
164
f(xs) = sum(xs, dims = 1)
165
tr = @trace f(::Matrix{Int32})
166
@test returntype(tr) == Matrix{Int32}
167
+
168
169
+function negsquare(x)
170
+ if x > 0
171
+ return x^2
172
+ else
173
+ return -x^2
174
+ end
175
+end
176
177
+tr = @trace negsquare(::Float64)
178
+@test returntype(tr) == Float64
0 commit comments