To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 42e7c338 authored by Yi Lin's avatar Yi Lin
Browse files

Merge branch 'fix-refcast' into 'develop'

fix

See merge request !36
parents 0c3b46c0 a03a1bfd
...@@ -158,7 +158,7 @@ impl MuType { ...@@ -158,7 +158,7 @@ impl MuType {
pub fn is_funcref(&self) -> bool { pub fn is_funcref(&self) -> bool {
match self.v { match self.v {
MuType_::Struct(_) => true, MuType_::FuncRef(_) => true,
_ => false _ => false
} }
} }
......
...@@ -2725,10 +2725,9 @@ impl<'lb, 'lvm> BundleLoader<'lb, 'lvm> { ...@@ -2725,10 +2725,9 @@ impl<'lb, 'lvm> BundleLoader<'lb, 'lvm> {
impl_to_ty.is_double()) impl_to_ty.is_double())
} }
ConvOp::REFCAST => { ConvOp::REFCAST => {
(impl_from_ty.is_ref() || impl_from_ty.is_iref() || (impl_from_ty.is_ref() && impl_to_ty.is_ref()) ||
impl_from_ty.is_funcref()) && (impl_from_ty.is_iref() && impl_to_ty.is_iref()) ||
(impl_to_ty.is_ref() || impl_to_ty.is_iref() || (impl_from_ty.is_funcref() && impl_to_ty.is_funcref())
impl_to_ty.is_funcref())
} }
ConvOp::PTRCAST => { ConvOp::PTRCAST => {
(impl_from_ty.is_ptr() || impl_from_ty.is_int()) && (impl_from_ty.is_ptr() || impl_from_ty.is_int()) &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment