From b39af2be094ca16c9cb799389cb73051cbd576e9 Mon Sep 17 00:00:00 2001 From: Heshan Padmasiri Date: Mon, 28 Oct 2024 15:27:38 +0530 Subject: [PATCH] Fix comments --- examples/raw-templates/raw_templates.bal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/raw-templates/raw_templates.bal b/examples/raw-templates/raw_templates.bal index 5283aa85af..e7b79cf4a9 100644 --- a/examples/raw-templates/raw_templates.bal +++ b/examples/raw-templates/raw_templates.bal @@ -14,12 +14,12 @@ public function main() { int col1 = 5; int col2 = 10; - // No static type validation for interpolation + // Allow any value as interpolations since object:RawTemplate has any|error[] as insertions type. object:RawTemplate rawTemplate = `${col1}, fixed_string1, ${col2}, ${col3()}, fixed_string3`; io:println(rawTemplate.strings); io:println(rawTemplate.insertions); - // validate interpolations at compile time + // Ensure we have 2 ints fallowed by a boolean value as interpolations based on insertions type. MyCSVRawTemplate myCSVRawTemplate = `fixed_string4, ${col1}, ${col2}, fixed_string_5, ${col3()}`; io:println(myCSVRawTemplate.strings); io:println(myCSVRawTemplate.insertions);