1 /* 2 * Copyright 2017-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 import kotlinx.atomicfu.* 6 7 class IntArithmetic { 8 private val _x = atomic(0) 9 val x get() = _x.value 10 doWorknull11 fun doWork() { 12 _x.getAndSet(3) 13 _x.compareAndSet(3, 8) 14 } 15 } 16 17 // minimal example that forces ASM to call AtomicFUTransformer.CW.getCommonSuperClass checkTransformerFindCommonSuperClassnull18private fun checkTransformerFindCommonSuperClass() { 19 val (a, b) = 0 to 1 20 if (a == 0) { 21 val c = listOf(a, b) 22 } 23 } 24