KT-3576 Getters for float constants in objects always return 0.0 when constants are less than 1.0

#KT-3576 Fixed
This commit is contained in:
Mikhael Bogdanov
2013-05-06 10:41:48 +04:00
parent dd7c2cf78c
commit 22ddd05e09
3 changed files with 15 additions and 1 deletions
@@ -1593,7 +1593,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
if (type == Type.DOUBLE_TYPE && ((Number) value).doubleValue() == 0d) {
return true;
}
if (type == Type.FLOAT_TYPE && ((Number) value).byteValue() == 0f) {
if (type == Type.FLOAT_TYPE && ((Number) value).floatValue() == 0f) {
return true;
}
}