-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
parserLanguage parsing and surface syntaxLanguage parsing and surface syntax
Description
I have a composite type which has a single Dict property that I thought would be interesting to access with an overloaded ? operator
type J9Type
propDict::Dict
end
function ?(obj::J9Type,field::Union(Symbol,String))
return get(obj.propDict,field,Nothing())
end
A = J9Type([:p1=>1,:p2=>2,:p3=>7])
I found that I could only use my overloaded ? operator if I mention it before hand, even with a comment. Otherwise it says that ? is not a generic function.
#?
?(A,:p1)
Metadata
Metadata
Assignees
Labels
parserLanguage parsing and surface syntaxLanguage parsing and surface syntax