Skip to content

Commit 8dbed1b

Browse files
authored
fix(FunctionBuilder): remove null type from non-nullable types void and mixed
* fix(FunctionBuilder): return type '?void' is now just 'void' * fix(function): return type '?mixed' is now just 'mixed' Refs: #457
1 parent 3dd870a commit 8dbed1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/builders/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl<'a> FunctionBuilder<'a> {
138138
pub fn returns(mut self, type_: DataType, as_ref: bool, allow_null: bool) -> Self {
139139
self.retval = Some(type_);
140140
self.ret_as_ref = as_ref;
141-
self.ret_as_null = allow_null;
141+
self.ret_as_null = allow_null && type_ != DataType::Void && type_ != DataType::Mixed;
142142
self
143143
}
144144

0 commit comments

Comments
 (0)