Merge the Callback and Function type

There is no need for two of these
This simplify some code

Amend efdecf0a13
This commit is contained in:
Olivier Goffart 2024-10-28 14:36:30 +01:00 committed by GitHub
parent dff19c52da
commit 6bb0e6038f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 72 additions and 135 deletions

View file

@ -273,7 +273,7 @@ impl Expression {
},
Self::CallBackCall { callback, .. } => {
if let Type::Callback(callback) = ctx.property_ty(callback) {
callback.return_type.as_ref().unwrap_or(&Type::Void).clone()
callback.return_type.clone()
} else {
Type::Invalid
}