Fix a refinement + union types bug

This commit is contained in:
Shunsuke Shibayama 2022-12-05 00:41:37 +09:00
parent 188f8ad965
commit 6cb3231845
12 changed files with 144 additions and 101 deletions

View file

@ -1914,6 +1914,11 @@ impl Expr {
}
}
pub fn to_string_notype(&self) -> String {
let s = self.to_string();
s.split("(:").next().unwrap_or("?").trim_end().to_string()
}
/// 参照するオブジェクト自体が持っている名前(e.g. Int.qual_name == Some("int"), Socket!.qual_name == Some("io.Socket!"))
pub fn qual_name(&self) -> Option<&str> {
match self {