elect
10/25/2018, 10:17 AMinline class GLEnum0(val i: Int) : A, B
interface A
interface B
fun whatever(param0: A) {} // boxing?
diesieben07
10/25/2018, 10:18 AMAs a rule of thumb, inline classes are boxed whenever they are used as another type.
elect
10/25/2018, 10:22 AMdiesieben07
10/25/2018, 10:23 AMwhatever
be? It has to accept any object of type A
.elect
10/26/2018, 8:21 AMinterface GLtexture {
val i: Int
val target: TextureTarget
// --- [ glIsTexture ] ---
val valid: Boolean
get() = GL20C.glIsTexture(i)
}
inline class GLtexture1d(override val i: Int) : GLtexture
fun a(tex: GLTexture1d) {
override val target: TextureTarget get() = `1D`
if(tex.isValid) // boxing?
}
diesieben07
10/26/2018, 8:22 AMGLtexture1d
does not implement target
). And secondly, yes, it has to box. What if valid
does stuff with this
? What if it puts this
into a collection, etc.?elect
10/26/2018, 8:29 AMdiesieben07
10/26/2018, 8:39 AM