From 3d7d0b3cd40f145e2daab0af892c2ae0af9e4585 Mon Sep 17 00:00:00 2001 From: Eldho Ittan George <7940237+el2e10@users.noreply.github.com> Date: Mon, 23 Dec 2024 08:32:45 +0530 Subject: [PATCH] Fix incorrect implicit type conversion output in variables.mdx documentation - The "Implicit type conversion" section shows the output of implicitly converting an Integer to Float64 as an Integer. It should have been a Float. Updated it to 1.0 instead of 1 - Also added a print statement in that code snippet. Signed-off-by: Eldho Ittan George <7940237+el2e10@users.noreply.github.com> --- docs/manual/variables.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/manual/variables.mdx b/docs/manual/variables.mdx index 9247ff5c9f..f9e1c5c249 100644 --- a/docs/manual/variables.mdx +++ b/docs/manual/variables.mdx @@ -184,10 +184,11 @@ floating-point type, it converts the value instead of giving a compiler error: ```mojo var number: Float64 = Int(1) +print(number) ``` ```output -1 +1.0 ``` As shown above, value assignment can be converted into a constructor call if the