Add error hint for `setindex(::Type, ...) #53241
Labels
error messages
Better, more actionable error messages
good first issue
Indicates a good issue for first-time contributors to Julia
The typical pattern that this would help is something like
which gives the only somewhat helpful error message
ERROR: MethodError: no method matching setindex!(::Type{Dict}, ::Int64, ::Int64)
. Since Types are never indexable, it seems like it would be reasonable to give an error hint that links to some docs on the difference between a type and a type constructor.See https://discourse.julialang.org/t/use-dict-to-store-tree-with-uninitialized-tree-nodes/109895 for an example of a user running into this.
The text was updated successfully, but these errors were encountered: