mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 09:07:21 +00:00
Fix hang on qualified import with builtin name
This commit is contained in:
parent
f69d39dffc
commit
13ba59a4cb
3 changed files with 33 additions and 2 deletions
|
@ -462,6 +462,13 @@ impl<'a, T> PackageQualified<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn unqualified(&self) -> Option<&T> {
|
||||
match self {
|
||||
PackageQualified::Unqualified(name) => Some(name),
|
||||
PackageQualified::Qualified(_, _) => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn package_shorthand(&self) -> Option<&'a str> {
|
||||
match self {
|
||||
PackageQualified::Unqualified(_) => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue