Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [golo-dev] Importing unions (Vincent)

Actually, the struct type is not resolved either, but a factory function is injected in the module for structs. So in your example you don't call the struct constructor but the factory function. Such method is not defined for unions to keep the class namespace and allows to define several unions with the values having the same name in the same module.

Le 7 mars 2018 18:12:55 GMT+01:00, Vincent <vvanderleun@xxxxxxxxxxxx> a écrit :
>Hi,
>
>That works indeed, thanks again! 
>
>IIRC structs are compiled to XXX.types.YYY as well and as my example
>shows, those can be resolved simply by importing the module, right? So
>as a user I did not expect this.
>
>But for the time being I'm happy I can continue :)
>
>PS: I needed AND/OR logical operations again, I'm looking at the code
>and see if I can contribute this to the runtime library, as we
>discussed long ago on this list. I'll check the Eclipse contribution
>agreement.
>
>Best regards,
>Vincent
>
>
>> You're welcome Vincent,
>> 
>> did you try to import 'test2.types.Union2' ?
>> 
>> http://golo-lang.org/documentation/next/#_jvm_existence_2
>> 
>> regards,
>> Sylvain.
>> 
>_______________________________________________
>golo-dev mailing list
>golo-dev@xxxxxxxxxxx
>To change your delivery options, retrieve your password, or unsubscribe
>from this list, visit
>https://dev.eclipse.org/mailman/listinfo/golo-dev

-- 
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.


Back to the top