Unhandled exception. System.Reflection.AmbiguousMatchException: Ambiguous match found for 'vercos.Argu+CLIArguments CLIArguments get_Tag()'.
at System.DefaultBinder.FindMostDerivedNewSlotMeth(MethodBase[] match, Int32 cMatches)
at System.RuntimeType.GetMethodImplCommon(String name, Int32 genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)
at System.Type.GetMethod(String name, BindingFlags bindingAttr)
at Microsoft.FSharp.Reflection.Impl.getUnionCaseConstructorMethod(Type typ, Int32 tag, BindingFlags bindingFlags) in D:\a\_work\1\s\src\FSharp.Core\reflect.fs:line 602
at Microsoft.FSharp.Reflection.Impl.getUnionCaseConstructorCompiled(Type typ, Int32 tag, BindingFlags bindingFlags) in D:\a\_work\1\s\src\FSharp.Core\reflect.fs:line 615
at Microsoft.FSharp.Reflection.FSharpValue.PreComputeUnionConstructor(UnionCaseInfo unionCase, FSharpOption`1 bindingFlags) in D:\a\_work\1\s\src\FSharp.Core\reflect.fs:line 1370
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Argu.PreCompute.postProcess@648(UnionArgInfo argInfo)
at Argu.PreCompute.checkUnionArgInfo(UnionArgInfo result)
at <StartupCode$Argu>.$ArgumentParser.-cctor@87-1.Invoke(Unit unitVar)
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Argu.ArgumentParser`1..ctor(FSharpOption`1 programName, FSharpOption`1 helpTextMessage, FSharpOption`1 usageStringCharacterWidth, FSharpOption`1 errorHandler, FSharpOption`1 checkStructure)
at Argu.ArgumentParser.Create[Template](FSharpOption`1 programName, FSharpOption`1 helpTextMessage, FSharpOption`1 usageStringCharacterWidth, FSharpOption`1 errorHandler, FSharpOption`1 checkStructure)
at vercos.Argu.Parser.get_parser() in /home/muqiu-han/Workspace/vercos/vercos/Argu.fs:line 62
at vercos.Argu.Parser.Parse(String[] argv) in /home/muqiu-han/Workspace/vercos/vercos/Argu.fs:line 64
at vercos.Main.main(String[] argv) in /home/muqiu-han/Workspace/vercos/vercos/Program.fs:line
Description
When
CLIArgumentscontainsTag, such as:System.Reflection.AmbiguousMatchExceptionwill be thrown at runtime:And if I rename the
Tagto another name, it will work.text:
Related information