Ticket #367 (closed enhancement: fixed)
Relax class pass warning on partial classes
Reported by: | hopscc | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.6 |
Keywords: | Cc: |
Description
Theres a warning on use of "pass" in a class that already has some box members
(CobraParser.cobra .classPass)
as in
class X is partial pass
where class X is already declared
class X def foo print 'foo.' def main is shared x = X() x.foo
It seems it might be worthwhile to relax this if the class is declared partial which would allow the specification of partial classes as placeholders for additional work (placeholder/reminder for new named methods and fields to be added later)
( This is what is being done in the compiler for some of the backends - classes to be filled out eventually but in interim the partial classes are entered with 'pass' as the only content..
Can see the result if you rebuild the compiler selfhosting (rebuild it with itself)
Get 142 warnings for
warning: Encountered "pass" in a class that already has declared members.
An alternative option would be to introduce a 'todo' or 'tobeimplemented' keyword that could be placed in such classes (same as pass) to note such use as temp placeholders..