Index: src/tests/.expect/genericUnion.txt
===================================================================
--- src/tests/.expect/genericUnion.txt	(revision 240e1ffa65d94e2aee1046c972a537d84be895c7)
+++ src/tests/.expect/genericUnion.txt	(revision 240e1ffa65d94e2aee1046c972a537d84be895c7)
@@ -0,0 +1,2 @@
+00000000 ffffffff
+00000000 ffffffff
Index: src/tests/genericUnion.c
===================================================================
--- src/tests/genericUnion.c	(revision 240e1ffa65d94e2aee1046c972a537d84be895c7)
+++ src/tests/genericUnion.c	(revision 240e1ffa65d94e2aee1046c972a537d84be895c7)
@@ -0,0 +1,30 @@
+#include <limits>
+
+forall(otype T)
+union ByteView {
+	T val;
+	char bytes[(sizeof(int))]; // want to change to sizeof(T)
+};
+
+forall(otype T)
+void print(ByteView(T) x) {
+	for (int i = 0; i < sizeof(int); i++) { // want to change to sizeof(T)
+		printf("%02x", x.bytes[i] & 0xff);
+	}
+}
+
+forall(otype T)
+void f(ByteView(T) x, T val) {
+	print(x);
+	printf(" ");
+	x.val = val;
+	print(x);
+	printf("\n");
+}
+
+int main() {
+	ByteView(unsigned) u = { 0 };
+	ByteView(int) i = { 0 };
+	f(u, MAX);
+	f(i, -1);
+}
