Resolve named types when checking conversions

This commit is contained in:
Adam Sampson 2007-05-03 23:13:23 +00:00
parent 4551d97b28
commit 6a30c57f52

View File

@ -1049,9 +1049,11 @@ conversion :: OccParser A.Expression
conversion
= do m <- md
t <- dataType
baseT <- underlyingType t
(c, o) <- conversionMode
ot <- typeOfExpression o
c <- case (isPreciseConversion ot t, c) of
baseOT <- underlyingType ot
c <- case (isPreciseConversion baseOT baseT, c) of
(False, A.DefaultConversion) ->
fail "imprecise conversion must specify ROUND or TRUNC"
(False, _) -> return c