1#version 400 core 2 3in double d; // ERROR, no doubles 4in dvec3 d3; // ERROR, no doubles 5in dmat4 dm4; // ERROR, no doubles 6 7// function selection under type conversion 8void foo1(double a, uint b) {} 9void foo1(double a, int b) {} 10void foo1(double a, float b) {} 11void foo1(double a, double b){} 12 13void foo2(double a, float b) {} 14void foo2(double a, double b){} 15 16void foo3(double a, float b) {} 17void foo3(float a, double b) {} 18 19void ftd( int, float, double) {} 20void ftd( uint, float, double) {} 21void ftd(float, double, double) {} 22 23void main() 24{ 25 double d; 26 uint u; 27 int i; 28 float f; 29 30 foo1(d, d); 31 foo1(d, u); 32 foo1(d, i); 33 foo1(d, f); 34 35 foo1(f, d); 36 foo1(f, u); 37 foo1(f, i); 38 foo1(f, f); 39 40 foo1(u, d); 41 foo1(u, u); 42 foo1(u, i); 43 foo1(u, f); 44 45 foo1(i, d); 46 foo1(i, u); 47 foo1(i, i); 48 foo1(i, f); 49 50 foo2(d, d); 51 foo2(d, u); 52 foo2(d, i); 53 foo2(d, f); 54 55 foo2(f, d); 56 foo2(f, u); 57 foo2(f, i); 58 foo2(f, f); 59 60 foo2(u, d); 61 foo2(u, u); 62 foo2(u, i); 63 foo2(u, f); 64 65 foo2(i, d); 66 foo2(i, u); 67 foo2(i, i); 68 foo2(i, f); 69 70 foo3(d, d); // ERROR, no match 71 foo3(d, u); 72 foo3(d, i); 73 foo3(d, f); 74 75 foo3(f, d); 76 foo3(f, u); // ERROR, ambiguous 77 foo3(f, i); // ERROR, ambiguous 78 foo3(f, f); // ERROR, ambiguous 79 80 foo3(u, d); 81 foo3(u, u); // ERROR, ambiguous 82 foo3(u, i); // ERROR, ambiguous 83 foo3(u, f); // ERROR, ambiguous 84 85 foo3(i, d); 86 foo3(i, u); // ERROR, ambiguous 87 foo3(i, i); // ERROR, ambiguous 88 foo3(i, f); // ERROR, ambiguous 89 90 ftd(i, f, f); 91 ftd(u, f, f); 92} 93 94void itf(int, float, int); 95void itf(int, double, int); 96 97void tf() 98{ 99 double d; 100 uint u; 101 int i; 102 float f; 103 104 itf(i, i, i); 105 itf(i, u, i); 106} 107