Changeset 5026

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

* fix unhashify.t - testing .does/.isa/smartmatch on a reference

should not deref it.

Files:
1 modified

Legend:

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

    r4986 r5026  
    151151        (return $ VMatch match) 
    152152 
     153op2Match (VType typ) (VType t) = do 
     154    typs <- pkgParents (showType typ) 
     155    return . VBool $ showType t `elem` typs 
     156 
     157op2Match x y@(VType _) = do 
     158    typ <- fromVal x 
     159    op2Match (VType typ) y 
     160 
     161{- 
    153162op2Match (VRef x) y = do 
    154163    x' <- readRef x 
    155164    op2Match x' y 
    156  
    157 op2Match (VType typ) (VType t) = do 
    158     typs <- pkgParents (showType typ) 
    159     return . VBool $ showType t `elem` typs 
    160  
    161 op2Match x y@(VType _) = do 
    162     typ <- fromVal x 
    163     op2Match (VType typ) y 
     165-} 
    164166 
    165167op2Match x y = do