Forbid subclasses of NativePointed to have backing fields

(this crashes the compiler otherwise)
This commit is contained in:
Svyatoslav Scherbina
2020-11-02 16:40:10 +03:00
committed by Stanislav Erokhin
parent 2ce2565e8f
commit d218b88106
2 changed files with 21 additions and 0 deletions
@@ -0,0 +1,10 @@
import kotlinx.cinterop.*
class Vertex constructor(rawPtr: NativePtr) : CStructVar(rawPtr) {
var x: Float = 0f
var y: Float = 0f
var r: Float = 0f
var g: Float = 0f
var b: Float = 0f
companion object : CStructVar.Type(40, 8)
}