Mercurial > projects > ddmd
diff dmd/TypeSArray.d @ 135:af1bebfd96a4 dmd2037
dmd 2.038
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 13 Sep 2010 22:19:42 +0100 |
parents | 60bb0fe4563e |
children | 14feb7ae01a6 |
line wrap: on
line diff
--- a/dmd/TypeSArray.d Sat Sep 11 13:03:39 2010 +0100 +++ b/dmd/TypeSArray.d Mon Sep 13 22:19:42 2010 +0100 @@ -367,7 +367,7 @@ { TypePointer tp = cast(TypePointer)to; - if (next.mod != tp.next.mod && tp.next.mod != MODconst) + if (!MODimplicitConv(next.mod, tp.next.mod)) return MATCHnomatch; if (tp.next.ty == Tvoid || next.constConv(tp.next) != MATCHnomatch) @@ -381,11 +381,12 @@ int offset = 0; TypeDArray ta = cast(TypeDArray)to; - if (next.mod != ta.next.mod && ta.next.mod != MODconst) + if (!MODimplicitConv(next.mod, ta.next.mod)) return MATCHnomatch; if (next.equals(ta.next) || - next.implicitConvTo(ta.next) >= MATCHconst || +// next.implicitConvTo(ta.next) >= MATCHconst || + next.constConv(ta.next) != MATCHnomatch || (ta.next.isBaseOf(next, &offset) && offset == 0) || ta.next.ty == Tvoid )