Skip to content
  • Yorick Peterse's avatar
    Allow object definitions to implement traits · 226855db
    Yorick Peterse authored
    This adds support for newly defined objects immediately implementing a
    trait. This means that instead of having to write this:
    
        import std::conversion::ToString
    
        object Person {}
    
        impl ToString for Person {
          def to_string -> String {
            '...'
          }
        }
    
    You can instead write the following
    
        import std::conversion::ToString
    
        object Person impl ToString {
          def to_string -> String {
            '...'
          }
        }
    226855db