# http://cobra-language.com/trac/cobra/ticket/284 class Test def main .testLiterals .testObjects def testLiterals # not enough targets expect UnpackException, a, b = [1, 2, 3] expect UnpackException, c, d = @[1, 2, 3] # too many targets expect UnpackException, a, b, c, d = [1, 2, 3] expect UnpackException, c, d, a, b = @[1, 2, 3] CobraCore.noOp(a, b, c, d) def testObjects t = [1, 2, 3] expect UnpackException, x, y = t expect UnpackException, x, y, u, v = t a = @[1, 2, 3] expect UnpackException, x, y = a expect UnpackException, x, y, u, v = a CobraCore.noOp(x, y, u, v, t, a)