Changeset 3714
- Timestamp:
- 05/23/05 05:19:44 (4 years ago)
- svk:copy_cache_prev:
- 5201
- Files:
-
- 2 modified
-
src/Pugs/Prim/Match.hs (modified) (2 diffs)
-
t/oo/magical_vars.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim/Match.hs
r3708 r3714 78 78 op2Match x y' 79 79 80 op2Match (VType typ) (VType t) = do81 cls <- asks envClasses82 return $ VBool (isaType cls (showType t) typ)83 84 op2Match x y@(VType _) = do85 typ <- evalValType x86 op2Match (VType typ) y87 88 80 op2Match x (VSubst (rx, subst)) | rxGlobal rx = do 89 81 str <- fromVal x … … 148 140 (return $ VMatch match) 149 141 142 op2Match (VRef x) y = do 143 x' <- readRef x 144 op2Match x' y 145 146 op2Match (VType typ) (VType t) = do 147 cls <- asks envClasses 148 return $ VBool (isaType cls (showType t) typ) 149 150 op2Match x y@(VType _) = do 151 typ <- evalValType x 152 op2Match (VType typ) y 153 150 154 op2Match x y = op2Cmp (fromVal :: Val -> Eval VStr) (==) x y 151 155 -
t/oo/magical_vars.t
r3469 r3714 48 48 my $package = $bar.get_package; 49 49 50 is( $package, 'SimpleClass', '$?PACKAGE should be the package name');50 is( $package, SimpleClass, '$?PACKAGE should be the package name', :todo<bug> ); 51 51 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>; 53 53 my $fourty_two; 54 54 lives_ok { my $obj = $class.new; $fourty_two = $obj.dummy },
