summaryrefslogtreecommitdiff
path: root/src/mir/check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir/check.cpp')
-rw-r--r--src/mir/check.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mir/check.cpp b/src/mir/check.cpp
index e867c822..7d6b431a 100644
--- a/src/mir/check.cpp
+++ b/src/mir/check.cpp
@@ -599,6 +599,15 @@ void MIR_Validate(const StaticTraitResolve& resolve, const ::HIR::ItemPath& path
// Check that the condition is an enum
),
(Call,
+ if( e.fcn.is_Value() )
+ {
+ ::HIR::TypeRef tmp;
+ const auto& ty = state.get_lvalue_type(tmp, e.fcn.as_Value());
+ if( ! ty.m_data.is_Function() )
+ {
+ //MIR_BUG(state, "Call Fcn::Value with non-function type - " << ty);
+ }
+ }
// Typecheck arguments and return value
)
)