Partial classes and structs
Posted:
Tue Aug 12, 2008 8:53 pm
by Charles
I've added support for partial classes like what is seen in C# and VB. As with C#, both instances of the class must be marked with "partial".
I'll be using this in the compiler itself to push out the C# code generation to a separate file as part of a refactoring to make way for other code generation backends such as CIL, Java, Objective-C, etc.
Re: Partial classes and structs
Posted:
Tue Aug 26, 2008 4:45 am
by hopscc
Pushing the sharpGenerator code out seems to have uncovered a bug related to partial classes and method overloading
( see ticket:40).
Can see it if try to recompile the cobra source with a newly built compiler
comp.bat
cp cobra.exe cobraNu.exe
cobraNu.exe -compile -color -debug -timeit $* -files:files-to-compile.text
Re: Partial classes and structs
Posted:
Thu Aug 28, 2008 1:02 am
by Charles
Thanks for the report. I'll take a look.
Re: Partial classes and structs
Posted:
Thu Aug 28, 2008 1:21 am
by Charles
Fixed. Although now there is a different bug revealed, but I'll take a look at that as well.
Also, I
added .bat files "make-trial" and "comp-trial". These already existed for the unix side.
Re: Partial classes and structs
Posted:
Thu Aug 28, 2008 1:42 am
by Charles
Okay, I fixed the other bug which was related to properties in partial classes. Both bugs are covered by the regression test cases.
I also checked in a new snapshot of the compiler.