Page 1 of 1

Namespace aliasing

PostPosted: Fri Mar 28, 2014 1:16 pm
by Charles
Thanks to a patch from hops, we now have namespace aliasing. Please test it out.

Examples:
http://cobra-language.com/trac/cobra/br ... lias.cobra
http://cobra-language.com/trac/cobra/br ... lass.cobra

Ticket:
http://cobra-language.com/trac/cobra/ticket/201

Installation instructions:
HowToInstallFromSource

Re: Namespace aliasing

PostPosted: Sat Mar 29, 2014 2:21 am
by hopscc
wiki entry updated

useDirective

Re: Namespace aliasing

PostPosted: Mon Mar 31, 2014 9:40 am
by nerdzero
Hey, this is cool. Is this really just for namespaces though? It looks like you can alias types as well unless I'm not reading the examples correctly.

Re: Namespace aliasing

PostPosted: Mon Mar 31, 2014 11:37 pm
by hopscc
It feeds into the C# alias handling so if that doesnt handle what you are seeing I've probably screwed up the examples
( though I thought I'd run all them)....

Re: Namespace aliasing

PostPosted: Tue Apr 01, 2014 8:17 am
by nerdzero
Okay, well it looks like you can alias types in C# and VB with using/imports statements like you can with namespaces. I did not know that. So, it should work here too then. Looks a little strange to me to alias types that way but I'll take it :)