1: #line 943 "./lpsrc/flx_regress.pak" 2: //Check type constraints
3: #import <flx.flxh> 4: open C_hack; 5: header '#include <iostream>'; 6: // basic type constraints 7: 8: // The general case is put in an open module 9: // so it is not considered if the specialisation applies 10: // but can still be selected otherwise 11: // Note Felix cannot order this kind of constraint. 12: 13: open module X { fun f[t,u]: t * u -> int = "999"; } 14: fun f: !fast_ints * !fast_ints -> int = "$1+$2"; 15: 16: print$ f$ 1,2L; endl; // 3 17: print$ f$ 1,2.0; endl; // 999 18:
1: 3 2: 999