From 0beb1f4b15b2179c7098c89330594a29da90b5d9 Mon Sep 17 00:00:00 2001 From: MchKosticyn Date: Sun, 10 Dec 2023 23:27:25 +0300 Subject: [PATCH] [style] fixed style --- VSharp.SILI.Core/ArrayInitialization.fs | 6 +++--- VSharp.SILI.Core/TypeSolverUtils.fs | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VSharp.SILI.Core/ArrayInitialization.fs b/VSharp.SILI.Core/ArrayInitialization.fs index 138c16cd2..9dbe7d065 100644 --- a/VSharp.SILI.Core/ArrayInitialization.fs +++ b/VSharp.SILI.Core/ArrayInitialization.fs @@ -14,10 +14,10 @@ module internal ArrayInitialization = | 1uy -> True() | _ -> __unreachable__() let private byteTermCreator (rawData : byte []) index = - rawData.[index] |> makeNumber + rawData[index] |> makeNumber let private signedByteTermCreator (rawData : byte []) index = - rawData.[index] |> sbyte |> makeNumber + rawData[index] |> sbyte |> makeNumber let private charTermCreator (rawData : byte []) index = BitConverter.ToChar(rawData, index) |> makeNumber @@ -93,7 +93,7 @@ module internal ArrayInitialization = match arrayRef.term, Memory.tryTermToObj state handleTerm with | HeapRef(address, typ), Some(:? RuntimeFieldHandle as rfh) -> commonInitializeArray state address typ rfh - | _ -> internalfailf "initializeArray: case for (arrayRef = %O), (handleTerm = %O) is not implemented" arrayRef handleTerm + | _ -> internalfailf $"initializeArray: case for (arrayRef = {arrayRef}), (handleTerm = {handleTerm}) is not implemented" let allocateOptimizedArray state (fieldInfo : FieldInfo) = let arrayType = typeof.MakeArrayType() diff --git a/VSharp.SILI.Core/TypeSolverUtils.fs b/VSharp.SILI.Core/TypeSolverUtils.fs index 6c2c387cf..9a9afe3b6 100644 --- a/VSharp.SILI.Core/TypeSolverUtils.fs +++ b/VSharp.SILI.Core/TypeSolverUtils.fs @@ -656,6 +656,7 @@ and genericCandidate private ( let supertypeDef = TypeUtils.getTypeDef supertype let supertypeDefArgs = TypeUtils.getGenericArgs supertypeDef let supertypeArgs = TypeUtils.getGenericArgs supertype + // TODO: need to check non-generic interfaces? let index = interfaces |> Array.tryFindIndex (fun t -> t = supertypeDef || t.IsGenericType && t.GetGenericTypeDefinition() = supertypeDef) match index with | Some index ->