OOlib icon indicating copy to clipboard operation
OOlib copied to clipboard

Let `protocol` force implemented classes to define constructor

Open glassesneo opened this issue 3 years ago • 0 comments

protocol Fruit:
  proc `new`(title: string, price: int)

class Apple:
  proc `new`(title: string, price: int) =
    discard

glassesneo avatar Apr 20 '22 03:04 glassesneo