Skip to content

Overriding a function from an included module with contracts leads to errors #243

Open
@indigoviolet

Description

@indigoviolet
ContractError:
It looks like you are trying to use pattern-matching, but
multiple definitions for function '<function name here>' have the same
contract for input parameters:

None => String
None => String

if I do something like:

module Foo
   Contract None => String
   def foo

...

class Bar
   include Foo
    
   def foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions