[SRTP] New syntax does not work on 7 RC2
See original GitHub issueRepro steps
module DiagnosticHandlers =
let inline private optionsToIResult< ^o when ^o : (member Validate: unit -> Result< ^o, ValidationErrors>)> (options: ^o) =
match options.Validate() with
| Ok options -> Results.Ok options
| Error errors -> Results.ValidationProblem(errors |> toErrors)
let configuration: HttpHandler =
fun _ context ->
let configuration = context.GetService<IConfiguration>()
Results.MultiResult(seq {
struct ("EventStore", Results.Ok(EventStore.reportConfiguration configuration))
struct ("Postgres", Results.Ok(Postgres.reportConfiguration configuration))
struct (EkataOptions.SectionName, context.RequestServices.GetRequiredService<IOptions<EkataOptions>>().Value |> optionsToIResult)
struct (SambaOptions.SectionName, context.RequestServices.GetRequiredService<IOptions<SambaOptions>>().Value |> optionsToIResult)
struct (StripeOptions.SectionName, context.RequestServices.GetRequiredService<IOptions<StripeOptions>>().Value |> optionsToIResult)
struct (``ThemisDS Options``.SectionName, context.RequestServices.GetRequiredService<IOptions<``ThemisDS Options``>>().Value |> optionsToIResult)
}) |> ofIResult context
Expected behavior
Compiles well
Actual behavior
1> error FS0192 : internal error : destFunTy: not a function type
1>
1> Unhandled Exception: System.Exception: destFunTy: not a function type
1> at FSharp.Compiler.TypedTreeOps.destFunTy(TcGlobals g, TType ty) in D:\a\_work\1\s\src\Compiler\TypedTree\TypedTreeOps.fs:line 818
1> at FSharp.Compiler.IlxGen.ilxClosureApps@4584-1.Invoke(Expr _arg6) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 4585
1> at Microsoft.FSharp.Collections.ListModule.Fold[T,TState](FSharpFunc`2 folder, TState state, FSharpList`1 list) in D:\a\_work\1\s\src\FSharp.Core\list.fs:line 295
1> at FSharp.Compiler.IlxGen.GenIndirectCall(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, TType funcTy, FSharpList`1 tyargs, FSharpList`1 curriedArgs, Range m, sequel sequel) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 4583
1> at FSharp.Compiler.IlxGen.GenCurriedArgsAndIndirectCall(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, TType funcTy, FSharpList`1 tyargs, FSharpList`1 curriedArgs, Range m, sequel sequel) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 4566
1> at FSharp.Compiler.IlxGen.CommitGetStorageSequel[e](cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, Range m, TType ty, FSharpOption`1 localCloInfo, FSharpOption`1 storeSequel) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 9538
1> at FSharp.Compiler.IlxGen.GenGetStorageAndSequel(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, Range m, TType ty, ILType ilTy, ValStorage storage, FSharpOption`1 storeSequel) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 9593
1> at FSharp.Compiler.IlxGen.GenTraitCall(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, TraitConstraintInfo traitInfo, FSharpList`1 argExprs, Range m, Expr expr, sequel sequel) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 5447
1> at FSharp.Compiler.IlxGen.GenExpr@2854.Invoke(Unit unitVar0) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2856
1> at FSharp.Compiler.DiagnosticsLogger.StackGuard.Guard[T](FSharpFunc`2 f) in D:\a\_work\1\s\src\Compiler\Facilities\DiagnosticsLogger.fs:line 837
1> at FSharp.Compiler.IlxGen.GenBindingRhs(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, Val vspec, Expr expr) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 9471
1> at FSharp.Compiler.IlxGen.GenBindingAfterDebugPoint(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, Binding bind, Boolean isStateVar, FSharpOption`1 startMarkOpt) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 8526
1> at FSharp.Compiler.IlxGen.GenLinearExpr(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, Expr expr, sequel sequel, Boolean preSteps, FSharpFunc`2 contf) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 3395
1> at FSharp.Compiler.IlxGen.GenExprAux(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, Expr expr, sequel sequel) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2961
1> at FSharp.Compiler.IlxGen.GenExpr@2854.Invoke(Unit unitVar0) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2856
1> at FSharp.Compiler.DiagnosticsLogger.StackGuard.Guard[T](FSharpFunc`2 f) in D:\a\_work\1\s\src\Compiler\Facilities\DiagnosticsLogger.fs:line 837
1> at FSharp.Compiler.IlxGen.CodeGenMethodForExpr@3102.Invoke(CodeGenBuffer cgbuf, IlxGenEnv eenv) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 3102
1> at FSharp.Compiler.IlxGen.CodeGenThen(cenv cenv, AssemblyBuilder mgbuf, FSharpList`1 entryPointInfo, String methodName, IlxGenEnv eenv, Int32 alreadyUsedArgs, FSharpOption`1 selfArgOpt, FSharpFunc`2 codeGenFunction, Range m) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2743
1> at FSharp.Compiler.IlxGen.CodeGenMethod(cenv cenv, AssemblyBuilder mgbuf, FSharpList`1 entryPointInfo, String methodName, IlxGenEnv eenv, Int32 alreadyUsedArgs, FSharpOption`1 selfArgOpt, FSharpFunc`2 codeGenFunction, Range m) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2778
1> at FSharp.Compiler.IlxGen.CodeGenMethodForExpr(cenv cenv, AssemblyBuilder mgbuf, FSharpList`1 entryPointInfo, String methodName, IlxGenEnv eenv, Int32 alreadyUsedArgs, FSharpOption`1 selfArgOpt, Expr expr0, sequel sequel0) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 3105
1> at FSharp.Compiler.IlxGen.GenMethodForBinding(cenv cenv, AssemblyBuilder mgbuf, IlxGenEnv eenv, Val v, ILMethodSpec mspec, Boolean hasWitnessEntry, Boolean generateWitnessArgs, ILMemberAccess access, FSharpList`1 ctps, FSharpList`1 mtps, FSharpList`1 witnessInfos, FSharpList`1 curriedArgInfos, FSharpList`1 paramInfos, FSharpList`1 argTys, ArgReprInfo retInfo, ValReprInfo valReprInfo, FSharpOption`1 ctorThisValOpt, FSharpOption`1 baseValOpt, FSharpList`1 methLambdaTypars, FSharpList`1 methLambdaVars, Expr methLambdaBody, TType returnTy) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 9078
1> at FSharp.Compiler.IlxGen.GenBindings(cenv cenv, CodeGenBuffer cgbuf, IlxGenEnv eenv, FSharpList`1 binds, FSharpOption`1 stateVarFlagsOpt) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 9434
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, ModuleOrNamespaceContents x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10021
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents@10033.Invoke(IlxGenEnv eenv, ModuleOrNamespaceContents x)
1> at Microsoft.FSharp.Collections.ListModule.Fold[T,TState](FSharpFunc`2 folder, TState state, FSharpList`1 list) in D:\a\_work\1\s\src\FSharp.Core\list.fs:line 295
1> at FSharp.Compiler.IlxGen.GenModuleBinding(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, Range m, ModuleOrNamespaceBinding x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10080
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, ModuleOrNamespaceContents x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10014
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents@10033.Invoke(IlxGenEnv eenv, ModuleOrNamespaceContents x)
1> at Microsoft.FSharp.Collections.ListModule.Fold[T,TState](FSharpFunc`2 folder, TState state, FSharpList`1 list) in D:\a\_work\1\s\src\FSharp.Core\list.fs:line 295
1> at FSharp.Compiler.IlxGen.GenModuleBinding(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, Range m, ModuleOrNamespaceBinding x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10080
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, ModuleOrNamespaceContents x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10014
1> at FSharp.Compiler.IlxGen.GenModuleBinding(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, Range m, ModuleOrNamespaceBinding x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10080
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, ModuleOrNamespaceContents x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10014
1> at FSharp.Compiler.IlxGen.GenModuleBinding(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, Range m, ModuleOrNamespaceBinding x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10080
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents(cenv cenv, CodeGenBuffer cgbuf, QualifiedNameOfFile qname, List`1 lazyInitInfo, IlxGenEnv eenv, ModuleOrNamespaceContents x) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10014
1> at FSharp.Compiler.IlxGen.GenModuleOrNamespaceContents@10033.Invoke(IlxGenEnv eenv, ModuleOrNamespaceContents x)
1> at Microsoft.FSharp.Collections.ListModule.Fold[T,TState](FSharpFunc`2 folder, TState state, FSharpList`1 list) in D:\a\_work\1\s\src\FSharp.Core\list.fs:line 295
1> at FSharp.Compiler.IlxGen.GenImplFileContents@9965.Invoke(Tuple`2 tupledArg) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 9976
1> at FSharp.Compiler.IlxGen.LocalScope[a](String nm, CodeGenBuffer cgbuf, FSharpFunc`2 f) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2813
1> at FSharp.Compiler.IlxGen.GenImplFile@10175-1.Invoke(CodeGenBuffer cgbuf, IlxGenEnv eenv) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10176
1> at FSharp.Compiler.IlxGen.CodeGenThen(cenv cenv, AssemblyBuilder mgbuf, FSharpList`1 entryPointInfo, String methodName, IlxGenEnv eenv, Int32 alreadyUsedArgs, FSharpOption`1 selfArgOpt, FSharpFunc`2 codeGenFunction, Range m) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2743
1> at FSharp.Compiler.IlxGen.CodeGenMethod(cenv cenv, AssemblyBuilder mgbuf, FSharpList`1 entryPointInfo, String methodName, IlxGenEnv eenv, Int32 alreadyUsedArgs, FSharpOption`1 selfArgOpt, FSharpFunc`2 codeGenFunction, Range m) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 2778
1> at FSharp.Compiler.IlxGen.GenImplFile(cenv cenv, AssemblyBuilder mgbuf, FSharpOption`1 mainInfoOpt, IlxGenEnv eenv, CheckedImplFileAfterOptimization implFile) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 10166
1> at FSharp.Compiler.IlxGen.eenv@11555-3.Invoke(IlxGenEnv eenv, CheckedImplFileAfterOptimization implFile)
1> at Microsoft.FSharp.Collections.ListModule.Fold[T,TState](FSharpFunc`2 folder, TState state, FSharpList`1 list) in D:\a\_work\1\s\src\FSharp.Core\list.fs:line 295
1> at FSharp.Compiler.IlxGen.CodegenAssembly(cenv cenv, IlxGenEnv eenv, AssemblyBuilder mgbuf, FSharpList`1 implFiles) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 11555
1> at FSharp.Compiler.IlxGen.GenerateCode(cenv cenv, AnonTypeGenerationTable anonTypeTable, IlxGenEnv eenv, CheckedAssemblyAfterOptimization _arg1, FSharpList`1 assemAttribs, FSharpList`1 moduleAttribs) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 11656
1> at FSharp.Compiler.IlxGen.IlxAssemblyGenerator.GenerateCode(IlxGenOptions codeGenOpts, CheckedAssemblyAfterOptimization typedAssembly, FSharpList`1 assemAttribs, FSharpList`1 moduleAttribs) in D:\a\_work\1\s\src\Compiler\CodeGen\IlxGen.fs:line 11915
1> at FSharp.Compiler.Driver.main4[a,b,c,d,e](FSharpOption`1 tcImportsCapture, FSharpOption`1 dynamicAssemblyCreator, Args`1 _arg1) in D:\a\_work\1\s\src\Compiler\Driver\fsc.fs:line 1153
1> at FSharp.Compiler.Driver.CompileFromCommandLineArguments(CompilationThreadToken ctok, String[] argv, LegacyReferenceResolver legacyReferenceResolver, Boolean bannerAlreadyPrinted, ReduceMemoryFlag reduceMemoryUsage, CopyFSharpCoreFlag defaultCopyFSharpCore, Exiter exiter, DiagnosticsLoggerProvider loggerProvider, FSharpOption`1 tcImportsCapture, FSharpOption`1 dynamicAssemblyCreator) in D:\a\_work\1\s\src\Compiler\Driver\fsc.fs:line 1385
1> at FSharp.Compiler.CommandLineMain.main(String[] argv) in D:\a\_work\1\s\src\fsc\fscmain.fs:line 97
1> at FSharp.Compiler.DiagnosticsLogger.DiagnosticsLoggerExtensions.ReraiseIfWatsonable(Exception exn) in D:\a\_work\1\s\src\Compiler\Facilities\DiagnosticsLogger.fs:line 403
1> at FSharp.Compiler.DiagnosticsLogger.DiagnosticsLoggerExtensions.DiagnosticsLogger.ErrorRecovery(DiagnosticsLogger x, Exception exn, Range m) in D:\a\_work\1\s\src\Compiler\Facilities\DiagnosticsLogger.fs:line 457
1> at FSharp.Compiler.DiagnosticsLogger.errorRecovery(Exception exn, Range m) in D:\a\_work\1\s\src\Compiler\Facilities\DiagnosticsLogger.fs:line 552
1> at FSharp.Compiler.CommandLineMain.main(String[] argv) in D:\a\_work\1\s\src\fsc\fscmain.fs:line 102
1>Done building target "CoreCompile" in project "WebHost.fsproj" -- FAILED.```
**Known workarounds**
Use old syntax
``` F#
match (^o : (member Validate: unit -> Result< ^o, ValidationErrors>) options) with
Related information
Provide any related information (optional):
- Windows 11 Pro 10.0.22621
- .NET Core 7.0.100-rc.2.22477.23
- Visual Studio 17.4.0 Preview 3.0
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Security Guide for Cisco Unified Communications Manager ...
When SRTP encryption is implemented, third-party sniffing tools do not work. Authorized administrators with appropriate authentication can ...
Read more >Security considerations for Voice Over IP Systems
Section 7 explains requirements for call establishment and address translation in a packet-switched telephony system, and the impact of these issues on VOIP....
Read more >Problems to setup encrypted telephony (SIPS/SRTP)
Hello, Yesterday I wanted to switch my 3CX to encrypted telephony, as many of my customers are asking for this. So far so...
Read more >HT818 Firmware Release Notes
Once HT818 is upgraded to 1.0.31.1 or above, downgrading to a lower firmware version is not supported on HW 1.6A. ... 7. KNOWN...
Read more >https://www.itu.int/itu-t/workprog/wp_a5_td.aspx?i...
235.8 refers to the SRTP protocol defined in IETF RFC 3711. -. Complete A.5 justification information can be found in Annex 6. -...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed by https://github.com/dotnet/fsharp/pull/14131
No, that should’ve been fixed, need to do some testing, and will close it.