Skip to content

Commit d161620

Browse files
committed
softtype warn once
1 parent c3d9950 commit d161620

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Deprecated.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ function Base.getproperty(x::InferenceVariable, f::Symbol)
182182
elseif f==:manifolds
183183
Base.depwarn("Softtype $(typeof(x)), field manifolds is deprecated, extend and use `getManifolds` instead",:getproperty)
184184
else
185-
Base.depwarn("Softtype $(typeof(x)), will be required to be a singleton type in the future and can no longer have fields. *.$f called",:getproperty)
185+
if !(@isdefined softtypeFieldsWarnOnce)
186+
Base.depwarn("Softtype $(typeof(x)), will be required to be a singleton type in the future and can no longer have fields. *.$f called. Further warnings are suppressed",:getproperty)
187+
global softtypeFieldsWarnOnce = true
188+
end
186189
end
187190
return getfield(x,f)
188191
end

0 commit comments

Comments
 (0)