blob: 5bc55e6855e0d674b579b01d36ad7d25c5ced88b [file] [log] [blame]
// Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package properties
class UserDefinedProperty() {
public var durationInMilliSeconds: Int = 0
var durationInSeconds: Int
get() = durationInMilliSeconds / 1000
set(v) { durationInMilliSeconds = v * 1000 }
}
fun userDefinedProperty_noUseOfProperties() {
UserDefinedProperty()
}
fun userDefinedProperty_useProperties() {
val obj = UserDefinedProperty()
obj.durationInSeconds = 5
println(obj.durationInSeconds)
}