From 47077f9761f593998cf3d0da94dfdadac2233c44 Mon Sep 17 00:00:00 2001 From: Laimonas Turauskas Date: Thu, 22 Aug 2024 14:54:21 +0300 Subject: [PATCH] Make implementations val final. (#377) --- formula/src/main/java/com/instacart/formula/ActionFormula.kt | 2 +- formula/src/main/java/com/instacart/formula/Formula.kt | 2 +- formula/src/main/java/com/instacart/formula/StatelessFormula.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/formula/src/main/java/com/instacart/formula/ActionFormula.kt b/formula/src/main/java/com/instacart/formula/ActionFormula.kt index fe937bea..baec8c59 100644 --- a/formula/src/main/java/com/instacart/formula/ActionFormula.kt +++ b/formula/src/main/java/com/instacart/formula/ActionFormula.kt @@ -7,7 +7,7 @@ package com.instacart.formula */ abstract class ActionFormula : IFormula { // Implements the common API used by the runtime. - override val implementation: Formula = object : Formula() { + final override val implementation: Formula = object : Formula() { override fun initialState(input: Input) = initialValue(input) override fun Snapshot.evaluate(): Evaluation { diff --git a/formula/src/main/java/com/instacart/formula/Formula.kt b/formula/src/main/java/com/instacart/formula/Formula.kt index faa1e443..31c86b69 100644 --- a/formula/src/main/java/com/instacart/formula/Formula.kt +++ b/formula/src/main/java/com/instacart/formula/Formula.kt @@ -14,7 +14,7 @@ package com.instacart.formula * listeners. When it is used to render UI, we call it a render model (Ex: ItemRenderModel). */ abstract class Formula : IFormula { - override val implementation: Formula + final override val implementation: Formula get() = this /** diff --git a/formula/src/main/java/com/instacart/formula/StatelessFormula.kt b/formula/src/main/java/com/instacart/formula/StatelessFormula.kt index 608405bb..0817e985 100644 --- a/formula/src/main/java/com/instacart/formula/StatelessFormula.kt +++ b/formula/src/main/java/com/instacart/formula/StatelessFormula.kt @@ -13,7 +13,7 @@ package com.instacart.formula abstract class StatelessFormula : IFormula { // Implements the common API used by the runtime. - override val implementation = object : Formula() { + final override val implementation = object : Formula() { override fun initialState(input: Input) = Unit override fun Snapshot.evaluate(): Evaluation {