mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-12-23 05:36:47 +00:00
Include a constant in the Analysis for prefabs
This commit is contained in:
parent
ebbe056944
commit
e931d94c15
1 changed files with 7 additions and 2 deletions
|
|
@ -719,8 +719,13 @@ impl<'o, 's> AnalyzeProc<'o, 's> {
|
|||
Term::Expr(expr) => self.visit_expression(location, expr, type_hint),
|
||||
Term::Prefab(prefab) => {
|
||||
if let Some(nav) = self.ty.navigate_path(&prefab.path) {
|
||||
// TODO: handle proc/verb paths here
|
||||
assumption_set![Assumption::IsType(true, nav.ty())].into()
|
||||
let ty = nav.ty(); // TODO: handle proc/verb paths here
|
||||
let pop = dm::constants::Pop::from(ty.path.split("/").skip(1).map(ToOwned::to_owned).collect::<Vec<_>>());
|
||||
Analysis {
|
||||
static_ty: StaticType::None,
|
||||
aset: assumption_set![Assumption::IsPath(true, nav.ty())].into(),
|
||||
value: Some(Constant::Prefab(pop)),
|
||||
}
|
||||
} else {
|
||||
error(location, format!("failed to resolve path {}", FormatTypePath(&prefab.path)))
|
||||
.register(self.context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue