Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed May 15, 2024
1 parent ea9ce59 commit 5b29fd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vlib/v/checker/checker.v
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,8 @@ fn (mut c Checker) type_implements(typ ast.Type, interface_type ast.Type, pos to
inter_sym.methods
}
// voidptr is an escape hatch, it should be allowed to be passed
if utyp != ast.voidptr_type && utyp != ast.nil_type && utyp != ast.none_type {
if utyp != ast.voidptr_type && utyp != ast.nil_type && !(interface_type.has_flag(.option)
&& utyp == ast.none_type) {
mut are_methods_implemented := true

// Verify methods
Expand Down

0 comments on commit 5b29fd1

Please sign in to comment.