replace Bool type with Bool=True/False + bugfix

Bool is a type alias for True/False

Bugfix:

[[T] String]
{
  [[T] Int]
  // this would use the outer T (String),
  // but now it correctly uses the inner T (Int).
  [T] 1
}
This commit is contained in:
Mark
2024-08-29 15:04:32 +02:00
parent 7f318d9e1c
commit 385019e43c
11 changed files with 81 additions and 76 deletions

View File

@@ -75,7 +75,14 @@ impl Config {
.insert(t.to_string(), Ok(Arc::new(data::Type::new(t))));
};
}
init_d!(data::bool::BoolT);
init_d!(data::bool::TrueT);
init_d!(data::bool::FalseT);
info_check
.scopes
.last_mut()
.unwrap()
.types
.insert("Bool".to_owned(), Ok(Arc::new(data::bool::bool_type())));
init_d!(data::byte::ByteT);
init_d!(data::int::IntT);
init_d!(data::float::FloatT);