0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
posthog/hogvm/__tests__/tuples.hog
Marius Andra 5c90d21751
feat(hog): nullish coalescing (#23521)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-09 13:02:00 +02:00

20 lines
467 B
Plaintext

print(tuple())
print((1,))
print((1, 2))
print((1, 2,))
print((1, 2, 3))
print((1, '2', 3))
print((1, (2, 3), 4))
print((1, (2, (3, 4)), 5))
let a := (1, 2, 3)
print(a[1])
print(a?.1)
print(a?.7)
print((1, (2, (3, 4)), 5)[1][1][1])
print((1, (2, (3, 4)), 5)?.1?.1?.1)
print((1, (2, (3, 4)), 5)?.[1]?.[1]?.[1])
print((1, (2, (3, 4)), 5)?.3?.6?.1)
print((1, (2, (3, 4)), 5)?.[3]?.[6]?.[1])
print((1, (2, (3, 4, ), ), 5, ).1.1.1)
print((1, (2, (3, 4)), 5)[1][1][1] + 1)