swog icon indicating copy to clipboard operation
swog copied to clipboard

CObj: add optional warning if method returning a <: CObject doesn't use an implicit wrapper

Open jokade opened this issue 5 years ago • 0 comments

As a best practice, methods returning a wrapped C object should always take an implicit wrapper, i.e.

def getFoo()(implicit w: CObjectWrapper[Foo]): Foo = extern

instead of

def getFoo(): Foo = extern

To help enforce this policy, it should be possible to activate warnings/errors if it is broken.

jokade avatar Jan 07 '20 17:01 jokade