Fix parsing of float constants with an exponent (e.g. 1e-02f) (bug #1699646).

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9688 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2007-04-21 16:00:02 +00:00
commit 660d1c8a55
3 changed files with 29 additions and 3 deletions

View file

@ -598,6 +598,12 @@ macro(size_t, pfx, sizet)
return x + y;
}
// Regression test for bug1699646 - we weren't handling
// + or - after e for float constants.
float regression_test_for_bug1699646(float f = 1e-02f) {
return f;
}
float val_float(float x) {
return x;
}