From dbd2490d8cd4f19d46ef23b6ed19e5644c59155b 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 61a3a854a..b9ac7203f 100644 --- a/tl.lua +++ b/tl.lua @@ -8540,7 +8540,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 54082ee90..1dda3331f 100644 --- a/tl.tl +++ b/tl.tl @@ -8540,7 +8540,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)