// Named type & named type => identity comparison int a = ii; T b = tt; // Named & anonymous types => structure comparison () c = tt; T d = (); () e = (); int^ f = @a; T^ g = @b; ()^ h = @b; T^ i = @(); ()^ j = @(); TPtr k = @d; TPtr l = @(); RT1 m = (b,); RT1 n = ((),); // special handling of byte and char byte byt = 10; char ch = 32; int8 i8; uint8 u8; // int and byte int8^ i8bp = @byt; uint8^ u8bp = @byt; byte^ bp1 = @i8; byte^ bp2 = @u8; // int and char int8^ i8cp = @ch; uint8^ u8cp = @ch; char^ cp1 = @i8; char^ cp2 = @u8; // non-pointer values are compatible if they have compatible ranges byte b1 = ch; char c1 = byt; // casting via "as uint8^" is allowed byte^ bp3 = @ch as uint8^; char^ cp3 = @byt as uint8^; // structure of array element types must match exactly (int)#[2] arr1 = [(1,), (2,)]; V#[2] arr2 = arr1; (int)#[2] arr3 = arr2; // test with compatible enum types int enum(false=0,true=1) enum1 = bb; int enum(false=0,true=1,verytrue=2) enum2 = bb; // Function types FT1^ fpa = @func; FT1^ fpb = fpa; // types to test with typedef T = (); typedef U = (); typedef TPtr = T^; // bad code style! typedef UPtr = U^; typedef V = (int x); typedef W = (int x, int y); typedef RT1 = (T x); typedef RT2 = (T x); typedef FT1 = T(T x, T y); // values to test with int ii = 0; T tt = (); T tt2; bool bb = :false; // functions to test with T func(T x, T y);