Forums

Partial classes and structs

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Partial classes and structs

Postby Charles » Tue Aug 12, 2008 8:53 pm

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Partial classes and structs

Postby hopscc » Tue Aug 26, 2008 4:45 am

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
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: Partial classes and structs

Postby Charles » Thu Aug 28, 2008 1:02 am

Thanks for the report. I'll take a look.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Partial classes and structs

Postby Charles » Thu Aug 28, 2008 1:21 am

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Partial classes and structs

Postby Charles » Thu Aug 28, 2008 1:42 am

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 18 guests

cron