From d06a614cfa3a2152a482d56c02cde6bdfbf48b17 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 22 Jun 2024 11:50:44 -0400 Subject: [PATCH] Load standard library correctly --- dust-lang/src/abstract_tree/type_constructor.rs | 4 ++-- std/thread.ds | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dust-lang/src/abstract_tree/type_constructor.rs b/dust-lang/src/abstract_tree/type_constructor.rs index 5d656c0..1eca1a6 100644 --- a/dust-lang/src/abstract_tree/type_constructor.rs +++ b/dust-lang/src/abstract_tree/type_constructor.rs @@ -57,9 +57,9 @@ impl TypeConstructor { let invoked_type = if let Some(r#type) = context.get_type(&identifier.node)? { r#type } else { - return Err(ValidationError::VariableNotFound { + return Ok(Type::Generic { identifier: identifier.node.clone(), - position: identifier.position, + concrete_type: None, }); }; diff --git a/std/thread.ds b/std/thread.ds index bd2f78b..699e609 100644 --- a/std/thread.ds +++ b/std/thread.ds @@ -1,5 +1,5 @@ thread = { - sleep = fn (milliseconds: int) -> none { - SLEEP milliseconds + sleep = fn (milliseconds: int) { + __SLEEP__ milliseconds } }