You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
Does anyone knows how it should be solved?
I know that URL object accept string as parameter URL(String spec)
but I don't know how to implement that in my case.
Thank you in advance
The text was updated successfully, but these errors were encountered:
lukavucko
changed the title
How to variable with type URL can consume String?
How I can pass String to variable type URL?
May 14, 2020
Hello! First of all, I got to remind you about Kotlin/Native issue tracker migration(see #4079). Bugs should be reported to the YouTrack, also one can ask for the community help on the #kotlin-native slack channel. Some known questions are answered on the StackOverflow, ask the new one can be done here.
About this particular question. As far as I can see, you're trying to use java.net.URL class, correct? This class is not available for Kotlin/Native. The whole point of Kotlin/Native is to provide programming with Kotlin but without JVM used. Therefore, no Java packages will be available for it.
If it's not Kotlin/Native, you can probably do something like url = URL(spec = "http://www.countries-list.info/Download-List/download.txt").
Hi,
I got something like this:
Now in my test I want to pass this:
url = "http://www.countries-list.info/Download-List/download.txt"
but of course I got this error:
^ Type mismatch: inferred type is String but URL? was expected
Does anyone knows how it should be solved?
I know that URL object accept string as parameter URL(String spec)
but I don't know how to implement that in my case.
Thank you in advance
The text was updated successfully, but these errors were encountered: