Skip to content

Commit 56ba46a

Browse files
committed
fix CastTypeMismatch
1 parent f94d882 commit 56ba46a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/emmylua_code_analysis/src/diagnostic/checker/cast_type_mismatch.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ fn cast_type_check(
180180
}
181181
_ => {
182182
if origin_type.is_table() {
183-
if target_type.is_table() || target_type.is_custom_type() {
183+
if target_type.is_table()
184+
|| target_type.is_custom_type()
185+
|| target_type.is_generic()
186+
{
184187
return Ok(());
185188
}
186189
} else if origin_type.is_custom_type() {

0 commit comments

Comments
 (0)