79756265

Date: 2025-09-04 22:15:15
Score: 1
Natty:
Report link

Is the NavHost.kt from Android file rewriting NavHost??

No.

How / why is this working??? Again, ABC() gives errors unless I comment out the latter ones.

You answered this yourself in your own question: "and each one takes different arguments". Your multiple ABC() function definitions all have the same signature (same arguments, same return type). The NavHost() function definitions each have a distinct signature, specifically different arguments.

So, had you tried:

fun ABC(something: String){
    println("ABC")
}

fun ABC(anotherSomething: Int){
    println("DEF")
}

fun ABC(andNow: Boolean, forSomething: Float, completelyDifferent: Double){
    println("GHI")
}

...then all three of your ABC() functions would have distinct signatures, and you should not get a Conflicting overloads compiler error.

In Kotlin Multi Platform and JetPack Compose, why and how is NavHost importing from the same file with 9 versions of the same object, yet no errors?

Note that NavHost() is a function, not an object.

Reasons:
  • Blacklisted phrase (1): ???
  • RegEx Blacklisted phrase (0.5): why is this
  • RegEx Blacklisted phrase (2): working?
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is the
  • High reputation (-2):
Posted by: CommonsWare