in dvec3 d3; // ERROR, no doubles
in dmat4 dm4; // ERROR, no doubles
-void main()
+// function selection under type conversion
+void foo1(double a, uint b) {}\r
+void foo1(double a, int b) {}\r
+void foo1(double a, float b) {}\r
+void foo1(double a, double b){}\r
+\r
+void foo2(double a, float b) {}\r
+void foo2(double a, double b){}\r
+\r
+void foo3(double a, float b) {}\r
+void foo3(float a, double b) {}\r
+\r
+void ftd( int, float, double) {}\r
+void ftd( uint, float, double) {}\r
+void ftd(float, double, double) {}\r
+\r
+void main()\r
+{\r
+ double d;\r
+ uint u;\r
+ int i;\r
+ float f;\r
+\r
+ foo1(d, d);\r
+ foo1(d, u);\r
+ foo1(d, i);\r
+ foo1(d, f);\r
+\r
+ foo1(f, d);\r
+ foo1(f, u);\r
+ foo1(f, i);\r
+ foo1(f, f);\r
+\r
+ foo1(u, d);\r
+ foo1(u, u);\r
+ foo1(u, i);\r
+ foo1(u, f);\r
+\r
+ foo1(i, d);\r
+ foo1(i, u);\r
+ foo1(i, i);\r
+ foo1(i, f);\r
+\r
+ foo2(d, d);\r
+ foo2(d, u);\r
+ foo2(d, i);\r
+ foo2(d, f);\r
+\r
+ foo2(f, d);\r
+ foo2(f, u);\r
+ foo2(f, i);\r
+ foo2(f, f);\r
+\r
+ foo2(u, d);\r
+ foo2(u, u);\r
+ foo2(u, i);\r
+ foo2(u, f);\r
+\r
+ foo2(i, d);\r
+ foo2(i, u);\r
+ foo2(i, i);\r
+ foo2(i, f);\r
+\r
+ foo3(d, d); // ERROR, no match\r
+ foo3(d, u);\r
+ foo3(d, i);\r
+ foo3(d, f);\r
+\r
+ foo3(f, d);\r
+ foo3(f, u); // ERROR, ambiguous\r
+ foo3(f, i); // ERROR, ambiguous\r
+ foo3(f, f); // ERROR, ambiguous\r
+\r
+ foo3(u, d);\r
+ foo3(u, u); // ERROR, ambiguous\r
+ foo3(u, i); // ERROR, ambiguous\r
+ foo3(u, f); // ERROR, ambiguous\r
+\r
+ foo3(i, d);\r
+ foo3(i, u); // ERROR, ambiguous\r
+ foo3(i, i); // ERROR, ambiguous\r
+ foo3(i, f); // ERROR, ambiguous\r
+\r
+ ftd(i, f, f);\r
+ ftd(u, f, f);\r
+}
+
+void itf(int, float, int);
+void itf(int, double, int);
+
+void tf()
{
+ double d;\r
+ uint u;\r
+ int i;\r
+ float f;\r
+
+ itf(i, i, i);
+ itf(i, u, i);
}