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
Wait as sec... there isn't anything to throw out as the doc only mentions #type for Object and the config objects, but not for any "JSON type". IMO it's not too bad that there are non-intentionally exposed things as long as they're not documented.
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13141
Created by nlm on 2016-11-10 14:29:14 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-11-10 14:29:14 +00:00 (in Redmine)
I was coding some functions in my icinga2 configuration, when I remarked that there are some oddities in object types:
=> Type.type
"Type"
=> Object.type
"Type"
=> Object().type
"Object"
=> User().type
"User"
=> UserGroup().type
"UserGroup"
=> [].type
"Array"
=> {}.type
null
=> {test = 123}.type
null
=> Dictionary().type
null
=> 0.type
Invalid field access (for value of type 'Number'): 'type'
=> Number().type
^
Invalid field access (for value of type 'Number'): 'type'
=> "Hello".type
Invalid field access (for value of type 'String'): 'type'
It seems it's not intentional
The text was updated successfully, but these errors were encountered: