id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
370	Nominal type annotation on array and object literals	lth		We've agreed in the past that it should be possible to annotate array and object literals with array and object structural types, respectively.\r\n\r\nThe Clique of Three decided today that this should be extended to nominal types.\r\n\r\nIf T is a nominal type of any kind then\r\n\r\n{{{\r\n  [x,y,z] : T\r\n}}}\r\n\r\nmeans exactly\r\n\r\n{{{\r\n  let (tmp = new T(3))\r\n    ( tmp[0] = x,\r\n      tmp[1] = y,\r\n      tmp[2] = z,\r\n      tmp )\r\n}}}\r\n\r\nand\r\n\r\n{{{\r\n   { x: v1, y: v2 } : T\r\n}}}\r\n\r\nmeans exactly\r\n\r\n{{{\r\n   let (tmp = new T)\r\n     ( tmp.x = v1,\r\n       tmp.y = v2,\r\n       tmp )\r\n}}}\r\n\r\nThe killer use case here is that you want array literals to be annotated by a Vector type:\r\n\r\n{{{\r\n   [ 1, 2, 3 ] : Vector.<int>\r\n}}}\r\n\r\nbut it generalizes well, so we think the generalization should be allowed.	defect	new	major	Spec	4			graydon, brendan, jeffdyer, etierney, edwsmith
