Details
Description
This is a strict mode warning (or to enable individually).
To avoid unnoticed/unwanted binary-breakage, and facilitate API documentability, this warns when a visible method (public|protected) has its return type, or one of its argument type, not explicitely declared.
Testcase:
""" BCW0024-1.boo(16,5): BCW0024: WARNING: Visible property does not declare return type explicitely. BCW0024-1.boo(28,5): BCW0024: WARNING: Visible property does not declare return type explicitely. BCW0024-1.boo(38,19): BCW0024: WARNING: Visible method does not declare return type explicitely. BCW0024-1.boo(44,9): BCW0024: WARNING: Visible method does not declare 's' argument type explicitely. """ macro enableBCW0024disableBCW0014: Context.Parameters.EnableWarning("BCW0024") Context.Parameters.DisableWarning("BCW0014") #unused privates enableBCW0024disableBCW0014 interface IFoo: Good as int: get Bad: #! get class Foo: Good as bool: get: return true private NotSoGood: get: return true Bad: #! get: return true protected def GoodMeth() as bool: return true internal def NotSoGoodMeth(): return false protected def BadMeth(): #! return false def GoodMethArg(s as string) as bool: pass def BadMethArg(s) as bool: #! pass def GoodVoid() as void: pass
Issue Links
| This issue is depended upon by: | ||||
| BOO-1115 | Strict mode |
|
|
|
Landed in rev. 3182