diff options
| author | krasimir <krasimir@chalmers.se> | 2010-11-15 09:38:31 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-11-15 09:38:31 +0000 |
| commit | f6a7292ad2c444f14882d291169b4df81361c254 (patch) | |
| tree | 7e89ca96200dbad0f9e8c0a0038fdbf8cbf24456 /src | |
| parent | 75570c982086f45fe5385150a1b65ab1cd28d773 (diff) | |
bugfix for the abstract operations
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiler/GF/Grammar/Parser.y | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/GF/Grammar/Parser.y b/src/compiler/GF/Grammar/Parser.y index 058c78e90..71b81e345 100644 --- a/src/compiler/GF/Grammar/Parser.y +++ b/src/compiler/GF/Grammar/Parser.y @@ -679,7 +679,7 @@ checkInfoType mt jment@(id,info) = CncFun _ pd ppn -> ifConcrete mt (locPerh pd ++ locPerh ppn) ResParam pparam _ -> ifResource mt (maybe [] locAll pparam) ResValue ty -> ifResource mt (locL ty) - ResOper pty pt -> return (id,AbsFun pty (fmap (const 0) pt) (Just (maybe [] (\(L l t) -> [L l ([],t)]) pt)) (Just False)) + ResOper pty pt -> ifOper mt pty pt ResOverload _ xs -> ifResource mt (concat [[loc1,loc2] | (L loc1 _,L loc2 _) <- xs]) where locPerh = maybe [] locL @@ -700,6 +700,9 @@ checkInfoType mt jment@(id,info) = ifResource MTInterface locs = return jment ifResource MTResource locs = return jment ifResource _ locs = illegal locs + + ifOper MTAbstract pty pt = return (id,AbsFun pty (fmap (const 0) pt) (Just (maybe [] (\(L l t) -> [L l ([],t)]) pt)) (Just False)) + ifOper _ pty pt = return jment mkAlts cs = case cs of _:_ -> do |
