Index: src/CodeGen/GenType.cc
===================================================================
--- src/CodeGen/GenType.cc	(revision b93a3de3de9cd1e0a05c6f8cd3e218e2ac85ceb0)
+++ src/CodeGen/GenType.cc	(revision 86f852bbdff57943d457ec5d43641a6f9deaddd4)
@@ -210,9 +210,9 @@
 
 	std::string GenType::handleGeneric( ReferenceToType * refType ) {
-		if ( ! refType->get_parameters().empty() ) {
+		if ( ! refType->parameters.empty() ) {
 			std::ostringstream os;
 			PassVisitor<CodeGenerator> cg( os, pretty, genC, lineMarks );
 			os << "(";
-			cg.pass.genCommaList( refType->get_parameters().begin(), refType->get_parameters().end() );
+			cg.pass.genCommaList( refType->parameters.begin(), refType->parameters.end() );
 			os << ") ";
 			return os.str();
Index: src/tests/ctor-autogen.c
===================================================================
--- src/tests/ctor-autogen.c	(revision b93a3de3de9cd1e0a05c6f8cd3e218e2ac85ceb0)
+++ src/tests/ctor-autogen.c	(revision 86f852bbdff57943d457ec5d43641a6f9deaddd4)
@@ -32,4 +32,60 @@
 };
 
+// dtype-static generic type is otype
+forall(dtype T)
+struct DtypeStaticStruct {
+  T * data;
+  short size;
+};
+
+forall(dtype T)
+union DtypeStaticUnion {
+  T * data;
+  short size;
+};
+
+// dynamic generic type is otype
+forall(otype T)
+struct DynamicStruct {
+	T x;
+};
+
+forall(otype T)
+union DynamicUnion {
+	T x;
+};
+
+// struct/union that contains a generic type is
+struct GenericContainingStruct {
+	DynamicStruct(int) dsi;
+	DynamicStruct(double) dsd;
+	DynamicUnion(int) dui;
+	DynamicUnion(double) dud;
+	DtypeStaticStruct(int) dssi;
+	DtypeStaticStruct(float) dssf;
+	DtypeStaticUnion(int) dsui;
+	DtypeStaticUnion(float) dsuf;
+};
+
+union GenericContainingUnion {
+	DynamicStruct(int) dsi;
+	DynamicStruct(double) dsd;
+	DynamicUnion(int) dui;
+	DynamicUnion(double) dud;
+	DtypeStaticStruct(int) dssi;
+	DtypeStaticStruct(float) dssf;
+	DtypeStaticUnion(int) dsui;
+	DtypeStaticUnion(float) dsuf;
+};
+
+
+forall(otype T)
+T identity(T x) { return x; }
+
+// can identity e if only sized or only the assertion, but the combination breaks...
+// forall(dtype T | sized(T) | { void ?{}(T &); })
+// void identity(T x) {  }
+
+#if ERR1
 // managed type - defines a constructor - can't use field constructors
 struct Managed {
@@ -44,10 +100,9 @@
 };
 
-forall(otype T)
-T identity(T x) { return x; }
+Managed x = { 123 }; // error
+Managed y;           // okay
 
-// can identity e if only sized or only the assertion, but the combination breaks...
-// forall(dtype T | sized(T) | { void ?{}(T &); })
-// void identity(T x) {  }
+InheritManaged z = { y };  // error?
+#endif
 
 int main() {
@@ -56,6 +111,6 @@
 	Color e;
 
-	// identity(R);  // Color should be an otype
-	// identity((Color)e);
+	// identity(R);  Color constant should be Color which is otype
+	identity(e);  // Color should be an otype
 	identity(u);  // U should be an otype
 	identity(s);  // S should be an otype
@@ -73,10 +128,26 @@
 	identity(pu); // should recursively be an otype
 
-#if ERR1
-	Managed x = { 123 }; // error
-	Managed y;           // okay
+	DynamicStruct(int) dsi;
+	DynamicStruct(double) dsd;
+	DynamicUnion(int) dui;
+	DynamicUnion(double) dud;
+	DtypeStaticStruct(int) dssi;
+	DtypeStaticStruct(float) dssf;
+	DtypeStaticUnion(int) dsui;
+	DtypeStaticUnion(float) dsuf;
 
-	InheritManaged z = { y };  // error?
-#endif
+	identity(dsi);
+	identity(dsd);
+	// identity(dui); // xxx - codegen errors in generated thunk _temp3 (Box-pass-generated assignment return-temporary)
+	// identity(dud);
+	identity(dssi);
+	identity(dssf);
+	identity(dsui);
+	identity(dsuf);
 
+	GenericContainingStruct gcs;
+	GenericContainingUnion gcu;
+
+	identity(gcs);
+	identity(gcu);
 }
