From bd48be0b3c7157338b5584c3af9a454fbfdac8f3 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Wed, 16 Aug 2023 12:29:42 +0200 Subject: [PATCH] allow dynamic require --- tl.lua | 2 +- tl.tl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tl.lua b/tl.lua index ad9250e71..5078b2690 100644 --- a/tl.lua +++ b/tl.lua @@ -8674,7 +8674,7 @@ tl.type_check = function(ast, opts) return node_error(node, "require expects one literal argument") end if node.e2[1].kind ~= "string" then - return node_error(node, "don't know how to resolve a dynamic require") + return ANY end local module_name = assert(node.e2[1].conststr) diff --git a/tl.tl b/tl.tl index 130d1931e..ff2fd4cfa 100644 --- a/tl.tl +++ b/tl.tl @@ -8674,7 +8674,7 @@ tl.type_check = function(ast: Node, opts: TypeCheckOptions): Result, string return node_error(node, "require expects one literal argument") end if node.e2[1].kind ~= "string" then - return node_error(node, "don't know how to resolve a dynamic require") + return ANY end local module_name = assert(node.e2[1].conststr)