Dico
01/26/2019, 9:39 PM*
import.
The reality is that the first rule seems to take priority over the second.
I think it should be the other way around.
What do you think?import a.*
import <http://b.GL|b.GL>
fun bindBuffer() = GL.bindBuffer()
if a
package contains a property named GL
, it will take precedence.robstoll
01/26/2019, 9:45 PMbindBuffer
function defined on the companion of b.GL ?Dico
01/26/2019, 9:46 PMrobstoll
01/26/2019, 9:47 PMa
has a bindBuffer function? If so, then I would say that's the correct behaviour as it is nearer in terms of scopingDico
01/26/2019, 9:47 PMbindBuffer()
, and I would argue that its presence should not matter.
what do you mean by nearer in terms of scoping exactly?robstoll
01/26/2019, 9:50 PMclass A {
companion object {
fun foo() {}
}
}
class B
fun foo() {
val A = B()
A.foo()
}
Dico
01/26/2019, 9:51 PMb.GL.bindBuffer()
in this caserobstoll
01/26/2019, 9:56 PMDico
01/26/2019, 9:57 PMrobstoll
01/26/2019, 10:01 PMb.GL.Companion as GL
Dico
01/26/2019, 10:14 PMGL
is a java class with static functions.robstoll
01/26/2019, 10:17 PM