Changeset 5027

Show
Ignore:
Timestamp:
06/27/05 20:43:21 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
6880
Message:

* $hashref.does(Hash) now returns true
* more test cleanups

Files:
4 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/AST/Internals.hs

    r4945 r5027  
    251251        str     <- fromVal =<< fetch "name" 
    252252        return $ mkType str 
    253     fromVal v           = return $ valType v 
     253    fromVal v           = evalValType v 
    254254    doCast v = castFailM v "VType" 
    255255 
  • src/Pugs/Prim/Match.hs

    r5026 r5027  
    153153op2Match (VType typ) (VType t) = do 
    154154    typs <- pkgParents (showType typ) 
    155     return . VBool $ showType t `elem` typs 
     155    return . VBool $ showType t `elem` (showType typ:typs) 
    156156 
    157157op2Match x y@(VType _) = do 
     
    159159    op2Match (VType typ) y 
    160160 
    161 {- 
    162161op2Match (VRef x) y = do 
    163162    x' <- readRef x 
    164163    op2Match x' y 
    165 -} 
    166164 
    167165op2Match x y = do 
  • t/pugsbugs/positional_parameters_in_BUILD.t

    r4694 r5027  
    99class Foo { submethod BUILD ($value) { $value_from_BUILD = $value; } }; 
    1010 
    11 my $foo = Foo.new("passed"); 
    12  
    13 is $value_from_BUILD, 'passed', 'positional args passed to new() are passed on to BUILD', :todo<bug>; 
     11dies_ok { Foo.new("passed") }, 'positional args passed to new() should not be passed on to BUILD'; 
  • t/statements/given.t

    r5007 r5027  
    229229    is(@got.join(","), "false,true", q!given { when true { } }!); 
    230230'; 
    231 fail("when true is parsefail; $!", :todo<feature>) if $!; 
     231fail("when true is parsefail", :todo<feature>) if $!;