mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
temporary bugfix/patch
This commit is contained in:
parent
2742112b09
commit
a377c6e89a
@ -11,7 +11,7 @@ repository = "https://github.com/Dummi26/mers"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# mers_lib = "0.8.1"
|
mers_lib = "0.8.2"
|
||||||
mers_lib = { path = "../mers_lib" }
|
# mers_lib = { path = "../mers_lib" }
|
||||||
clap = { version = "4.3.19", features = ["derive"] }
|
clap = { version = "4.3.19", features = ["derive"] }
|
||||||
colored = "2.1.0"
|
colored = "2.1.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mers_lib"
|
name = "mers_lib"
|
||||||
version = "0.8.1"
|
version = "0.8.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
description = "library to use the mers language in other projects"
|
description = "library to use the mers language in other projects"
|
||||||
|
@ -49,9 +49,16 @@ impl MersType for ReferenceT {
|
|||||||
self.is_same_type_as(target)
|
self.is_same_type_as(target)
|
||||||
}
|
}
|
||||||
fn subtypes(&self, acc: &mut Type) {
|
fn subtypes(&self, acc: &mut Type) {
|
||||||
// we don't call subtypes because (int/string) must stay that so we can assign either
|
// // we don't call subtypes because (int/string) must stay that so we can assign either
|
||||||
// NOTE: this might not be right...?
|
// // NOTE: this might not be right...?
|
||||||
acc.add(Arc::new(self.clone()));
|
// acc.add(Arc::new(self.clone()));
|
||||||
|
// FOR NOW (until we can put the compile-time type in ReferenceT), add all these types, too
|
||||||
|
// TODO: Figure out how to fix
|
||||||
|
// x := if true 1 else 0.5
|
||||||
|
// &x.debug // prints &Int instead of &{Int/Float} at runtime :(
|
||||||
|
for t in self.0.subtypes_type().types {
|
||||||
|
acc.add(Arc::new(Self(Type::newm(vec![t]))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fn as_any(&self) -> &dyn Any {
|
fn as_any(&self) -> &dyn Any {
|
||||||
self
|
self
|
||||||
|
Loading…
Reference in New Issue
Block a user