hylo icon indicating copy to clipboard operation
hylo copied to clipboard

Implement synthesization of Copyable conformances

Open camio opened this issue 1 year ago • 4 comments

public type Foo : Regular {
  var i : Int
  init(){ &i = 3 }
}

public conformance Foo: Equatable {
  public fun infix== (_ other: Self) -> Bool {
    return true
  }
}

// public conformance Foo: Copyable {
//   public fun copy() -> Self {
//     Foo()
//   }
// }

This results in Fatal error: not implemented. Note that when the lines are uncommented, this works okay.

camio avatar Sep 12 '23 16:09 camio

The problem isn't about partially implemented conformances. It is about the synthesization of Copyable's conformance specifically, as it's not implemented.

kyouko-taiga avatar Sep 13 '23 05:09 kyouko-taiga

Then I think you should change the issue title.

dabrahams avatar Sep 13 '23 18:09 dabrahams

Either way, there should be an error message instead of an illegal instruction.

camio avatar Sep 15 '23 21:09 camio

See also #1078

kyouko-taiga avatar Oct 11 '23 12:10 kyouko-taiga