1.2.49. test/regress/rt-1.01.49

Start felix section to test/regress/rt-1.01.49-0.flx[1 /1 ]
     1: #line 1945 "./lpsrc/flx_regress.pak"
     2: //Check typeclasses:imbue module
     3: //Check typeclasses:polymorphic methods
     4: #import <flx.flxh>
     5: header '#include <iostream>';
     6: 
     7: 
     8: typeclass XEq[t] {
     9:   virtual fun xeq: t * t -> bool;
    10:   virtual fun xne: t * t -> bool;
    11: }
    12: 
    13: instance XEq[int] {
    14:   fun xeq: int * int -> bool = "$1==$2";
    15:   fun xne: int * int -> bool = "$1!=$2";
    16: }
    17: 
    18: module Joe[with XEq[int]] {
    19:   fun feq(x:int,y:int) => xeq(x,y);
    20: }
    21: print$ Joe::feq(1,2); endl;
    22: 
    23: module Max[t with XEq[t]] {
    24:   fun feq(x:t,y:t) => xeq(x,y);
    25: }
    26: print$ Max::feq(1,1); endl;
    27: 
End felix section to test/regress/rt-1.01.49-0.flx[1]
Start data section to test/regress/rt-1.01.49-0.expect[1 /1 ]
     1: false
     2: true
End data section to test/regress/rt-1.01.49-0.expect[1]