Open buzden opened 6 years ago
fix in #587, let's keep this open to still add a test as described there. Probably by copying cbt/test/simple, adding the suggested classes and calling something like .mainMethods
on the build and check it doesn't throw
Consider I have (accidentially or not) some
class X
which hasdef main(args: Array[String]): Unit
. CBT considers this as one of the variants of possible entry points duringcbt run
unless theclass
isabstract
.This behaviour is not fatal but a little bit annoying when you accidentially have written
class
instead ofobject
and everything works fine withcbt
but does not work with other tools (e.g. running with purescala
runner). In the code it's written that it's done because of dottydoc.The really strange behaviour of
cbt
is when you have a really strange class having both constructor parameters anddef main
, something like this:Having this leads to (guess what):
So, generally, cbt's reflection sublibrary assumes that it works with classes having a constructor with empty parameters list when talking about static methods (
typeStaticMethod(Method)
function).