Changeset 3714

Show
Ignore:
Timestamp:
05/23/05 05:19:44 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
5201
Message:

* Implement ($type_ref Type) too.

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Match.hs

    r3708 r3714  
    7878    op2Match x y' 
    7979 
    80 op2Match (VType typ) (VType t) = do 
    81     cls <- asks envClasses 
    82     return $ VBool (isaType cls (showType t) typ) 
    83  
    84 op2Match x y@(VType _) = do 
    85     typ <- evalValType x 
    86     op2Match (VType typ) y 
    87  
    8880op2Match x (VSubst (rx, subst)) | rxGlobal rx = do 
    8981    str         <- fromVal x 
     
    148140        (return $ VMatch match) 
    149141 
     142op2Match (VRef x) y = do 
     143    x' <- readRef x 
     144    op2Match x' y 
     145 
     146op2Match (VType typ) (VType t) = do 
     147    cls <- asks envClasses 
     148    return $ VBool (isaType cls (showType t) typ) 
     149 
     150op2Match x y@(VType _) = do 
     151    typ <- evalValType x 
     152    op2Match (VType typ) y 
     153 
    150154op2Match x y = op2Cmp (fromVal :: Val -> Eval VStr) (==) x y 
    151155 
  • t/oo/magical_vars.t

    r3469 r3714  
    4848  my $package = $bar.get_package; 
    4949 
    50   is( $package, 'SimpleClass', '$?PACKAGE should be the package name' ); 
     50  is( $package, SimpleClass, '$?PACKAGE should be the package name', :todo<bug> ); 
    5151 
    52   is $class ~~ SimpleClass, 'the thing returned by $?CLASS in our role smartmatches against our class'; 
     52  is $class ~~ SimpleClass, 'the thing returned by $?CLASS in our role smartmatches against our class', :todo<bug>; 
    5353  my $fourty_two; 
    5454  lives_ok { my $obj = $class.new; $fourty_two = $obj.dummy },