You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Tracing.jl
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1128,12 +1128,19 @@ Base.@nospecializeinfer function make_tracer_unknown(
1128
1128
if xi !== xi2
1129
1129
changed =true
1130
1130
end
1131
-
if mode != TracedToTypes &&!(Core.Typeof(xi2) <:fieldtype(TT, i))
1132
-
throw(
1133
-
AssertionError(
1134
-
"Could not recursively make tracer of object of type $RT into $TT at field $i (named $(fieldname(TT, i))), need object of type $(fieldtype(TT, i)) found object of type $(Core.Typeof(xi2))",
1135
-
),
1136
-
)
1131
+
FT =fieldtype(TT, i)
1132
+
if mode != TracedToTypes &&!(Core.Typeof(xi2) <:FT)
1133
+
if FT <:TracedRNumber&& xi2 isaunwrapped_eltype(FT)
1134
+
xi2 =FT(xi2)
1135
+
xi2 = Core.Typeof(xi2)((newpath,), xi2.mlir_data)
1136
+
seen[xi2] = xi2
1137
+
else
1138
+
throw(
1139
+
AssertionError(
1140
+
"Could not recursively make tracer of object of type $RT into $TT at field $i (named $(fieldname(TT, i))), need object of type $(fieldtype(TT, i)) found object of type $(Core.Typeof(xi2))",
0 commit comments