Specifying Type bug.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Specifying Type bug.

laurence taylor
If you have two packaged types, it is possible to specify one by using the full path.
If, however one type is packaged and the other isn't, in the case where the packaged type becomes the default, what way is there of specifying the unpackaged type?
The concrete example here is where one is using haxe.macro.Type and Type;
If one returns a call to Type from a macro and the caller context is using haxe.macro.Type, the program won't work, and there is no way of knowing which order the imports are in.

regards,
Laurence

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Specifying Type bug.

Jan_Flanders


On Sun, Dec 4, 2011 at 10:58 AM, Laurence Taylor <[hidden email]> wrote:
If you have two packaged types, it is possible to specify one by using the full path.
If, however one type is packaged and the other isn't, in the case where the packaged type becomes the default, what way is there of specifying the unpackaged type?
The concrete example here is where one is using haxe.macro.Type and Type;
If one returns a call to Type from a macro and the caller context is using haxe.macro.Type, the program won't work, and there is no way of knowing which order the imports are in.

regards,
Laurence

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Specifying Type bug.

laurence taylor
I tried the StdType hack, but I was using it Context.parse in a macro ( I believe building a Constant would have the same effect), so the resolution would depend on the calling context, which I wouldn't have control over used by others. Should have checked the archives, thanks for the info.

regards,
Laurence

On Sun, Dec 4, 2011 at 3:49 PM, Jan Flanders <[hidden email]> wrote:


On Sun, Dec 4, 2011 at 10:58 AM, Laurence Taylor <[hidden email]> wrote:
If you have two packaged types, it is possible to specify one by using the full path.
If, however one type is packaged and the other isn't, in the case where the packaged type becomes the default, what way is there of specifying the unpackaged type?
The concrete example here is where one is using haxe.macro.Type and Type;
If one returns a call to Type from a macro and the caller context is using haxe.macro.Type, the program won't work, and there is no way of knowing which order the imports are in.

regards,
Laurence

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org