hi guys, I develop a DSL, one of the methods I ha...
# announcements
a
hi guys, I develop a DSL, one of the methods I have called
to
inside
TuplesKt.class
there is also
to
method and in practice when I test the DSL my method is not resolved but the one from
stdlib
how ot overcome this?
d
If when you import it it is not directly accessible and replacing the
to
from the standard library, then I'm afraid you'll have to find another name for it.
a
hacky way would be to hide
to
using imports and aliases, I can import
to
as
toKt
and then my
to
will be resolved
k
Yeah, although a nice feature,
to
was a very poorly choice to construct a
Pair
. Makes it very difficult to use it in any DSL. On top of that,
Pair
doesn't really convey a conditionality like
to
does unless you are using it in the creation of maps.
l
You could use backticks in the methods name, and call it with them too. Not the most beautiful option but it works