• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1struct Foo { int x; };
2Foo foo;
3
4
5void construct_struct_from_float2x2()   { Foo x = Foo(float2x2(0)); }
6void construct_float_from_struct()      { float x = float(foo); }
7void construct_float2_from_struct()     { float2 x = float2(foo); }
8void construct_float2x2_from_struct()   { float2x2 x = float2x2(foo); }
9void construct_float2x2_from_type()     { float2x2 x = float2x2(int); }
10void construct_float2x2_from_function() { float2x2 x = float2x2(sqrt); }
11
12/*%%*
13expected 'int', but found 'float2x2'
14'Foo' is not a valid parameter to 'float' constructor
15'Foo' is not a valid parameter to 'float2' constructor
16'Foo' is not a valid parameter to 'float2x2' constructor
17'<INVALID>' is not a valid parameter to 'float2x2' constructor
18'<INVALID>' is not a valid parameter to 'float2x2' constructor
19*%%*/
20