Show
Ignore:
Timestamp:
06/24/05 03:59:14 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
6771
Message:

* Instead of implicitly derefercing and evaluating in rvalue

context when deriving reference types, we now simply look
at the refType for constant scalar references. This means that

sub foo ($x) { $x.ref } my %y; foo(%y);

no longer evaluates to List, but to Hash now.

* Also cleaned up related tests.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Types/Scalar.hs

    r4179 r4934  
    66    scalar_store :: a -> VScalar -> Eval () 
    77    scalar_const :: a -> Maybe VScalar 
     8    scalar_fetch' :: a -> Eval VScalar 
     9    scalar_fetch' x = scalar_fetch x 
     10    scalar_type  :: a -> Eval Type 
     11    scalar_type x = do 
     12        v <- scalar_fetch x 
     13        evalValType v 
    814 
    915instance ScalarClass IScalarProxy where 
     
    4046    scalar_store d _ = retConstError d 
    4147    scalar_const = Just 
     48    scalar_type v = return $ valType v 
     49    scalar_fetch' v = return v 
    4250