diff --git a/internal/pkg/types/mlrval_infer.go b/internal/pkg/types/mlrval_infer.go index 169751e8f..cdbbd6f42 100644 --- a/internal/pkg/types/mlrval_infer.go +++ b/internal/pkg/types/mlrval_infer.go @@ -159,7 +159,7 @@ func inferNormally(input string, inferBool bool) *Mlrval { func inferWithOctalSuppress(input string, inferBool bool) *Mlrval { output := inferNormally(input, inferBool) - if output.mvtype != MT_INT { + if output.mvtype != MT_INT && output.mvtype != MT_FLOAT { return output } diff --git a/test/cases/io-infer-flags/dash-A/expout b/test/cases/io-infer-flags/dash-A/expout index 265fcda50..64ff495d3 100644 --- a/test/cases/io-infer-flags/dash-A/expout +++ b/test/cases/io-infer-flags/dash-A/expout @@ -2,6 +2,8 @@ x t y z 123 float 124 123.5 123.45 float 124.45 123.95 0123 float 84 83.5 +07 float 8 7.5 +08 float 9 8.5 0b0100 float 5 4.5 0x1000 float 4097 4096.5 -123 float -122 -122.5 @@ -9,3 +11,5 @@ x t y z -0123 float -82 -82.5 -0b0100 float -3 -3.5 -0x1000 float -4095 -4095.5 +-07 float -6 -6.5 +-08 float -7 -7.5 diff --git a/test/cases/io-infer-flags/dash-O/expout b/test/cases/io-infer-flags/dash-O/expout index b82705057..24a22ab37 100644 --- a/test/cases/io-infer-flags/dash-O/expout +++ b/test/cases/io-infer-flags/dash-O/expout @@ -2,6 +2,8 @@ x t y z 123 int 124 123.5 123.45 float 124.45 123.95 0123 string (error) (error) +07 string (error) (error) +08 string (error) (error) 0b0100 int 5 4.5 0x1000 int 4097 4096.5 -123 int -122 -122.5 @@ -9,3 +11,5 @@ x t y z -0123 string (error) (error) -0b0100 int -3 -3.5 -0x1000 int -4095 -4095.5 +-07 string (error) (error) +-08 string (error) (error) diff --git a/test/cases/io-infer-flags/dash-S/expout b/test/cases/io-infer-flags/dash-S/expout index 4d8aca15e..fc2875e90 100644 --- a/test/cases/io-infer-flags/dash-S/expout +++ b/test/cases/io-infer-flags/dash-S/expout @@ -2,6 +2,8 @@ x t y z 123 string (error) (error) 123.45 string (error) (error) 0123 string (error) (error) +07 string (error) (error) +08 string (error) (error) 0b0100 string (error) (error) 0x1000 string (error) (error) -123 string (error) (error) @@ -9,3 +11,5 @@ x t y z -0123 string (error) (error) -0b0100 string (error) (error) -0x1000 string (error) (error) +-07 string (error) (error) +-08 string (error) (error) diff --git a/test/cases/io-infer-flags/default/expout b/test/cases/io-infer-flags/default/expout index 559034b41..94b125761 100644 --- a/test/cases/io-infer-flags/default/expout +++ b/test/cases/io-infer-flags/default/expout @@ -2,6 +2,8 @@ x t y z 123 int 124 123.5 123.45 float 124.45 123.95 0123 int 84 83.5 +07 int 8 7.5 +08 float 9 8.5 0b0100 int 5 4.5 0x1000 int 4097 4096.5 -123 int -122 -122.5 @@ -9,3 +11,5 @@ x t y z -0123 int -82 -82.5 -0b0100 int -3 -3.5 -0x1000 int -4095 -4095.5 +-07 int -6 -6.5 +-08 float -7 -7.5 diff --git a/test/input/infer.csv b/test/input/infer.csv index 94b86026e..f1058dda8 100644 --- a/test/input/infer.csv +++ b/test/input/infer.csv @@ -2,6 +2,8 @@ x 123 123.45 0123 +07 +08 0b0100 0x1000 -123 @@ -9,3 +11,5 @@ x -0123 -0b0100 -0x1000 +-07 +-08