Merged DMD commit f0cfcb5006ca33c64e50addb14711a7034f3223c:

bugzilla 4623 Non-integer type allowed as static array size
This commit is contained in:
David Nadlinger
2011-04-22 15:09:42 +02:00
parent 61ce67ad14
commit 2bc5cd5f1b

View File

@@ -4,6 +4,7 @@
// All Rights Reserved
// written by Walter Bright
// http://www.digitalmars.com
// http://www.dsource.org/projects/dmd/browser/branches/dmd-1.x/src/mtype.c
// License for redistribution is by either the Artistic License
// in artistic.txt, or the GNU General Public License in gnu.txt.
// See the included readme.txt for details.
@@ -1984,7 +1985,7 @@ Type *TypeSArray::semantic(Loc loc, Scope *sc)
return this;
}
dinteger_t d1 = dim->toInteger();
dim = dim->castTo(sc, tsize_t);
dim = dim->implicitCastTo(sc, tsize_t);
dim = dim->optimize(WANTvalue);
dinteger_t d2 = dim->toInteger();