A warn when defining a litteral object with twice the same key.

Propose new features and changes
User avatar
FredOoo
Posts: 60
Joined: 07 May 2019, 21:58
Location: Paris

A warn when defining a litteral object with twice the same key.

10 Jun 2019, 17:55

That would be nice to get a warn when defining a litteral object with twice the same key.

Code: Select all

;#! AHK  v2
#Warn

test := { a:"AA", a:"BB" }

flatObj( obj ) {
	txt := ""
	for key, value in obj
		txt .= key ": " value "`n"
	return txt
}

MsgBox % flatObj( test )  ;  a: BB

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 4 guests