{"record":{"id":"947583c005ffa9c7","repo":"go-delve/delve","slug":"can-not-convert-q-to-s","errorCode":null,"errorMessage":"can not convert %q to %s","messagePattern":"can not convert %q to (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/eval.go","lineNumber":1522,"sourceCode":"\t\treturn\n\t}\n\tx.loadValue(LoadFullValue())\n\tif x.Unreadable != nil {\n\t\tstack.err = x.Unreadable\n\t\treturn\n\t}\n\tif constant.BoolVal(x.Value) == v {\n\t\tstack.opidx = op.Target - 1\n\t}\n}\n\n// Eval type cast expressions\nfunc (scope *EvalScope) evalTypeCast(op *evalop.TypeCast, stack *evalStack) {\n\targv := stack.pop()\n\n\ttyp := godwarf.ResolveTypedef(op.DwarfType)\n\n\tconverr := fmt.Errorf(\"can not convert %q to %s\", astutil.ExprToString(op.Node.Args[0]), typ.String())\n\n\t// compatible underlying types\n\tif typeCastCompatibleTypes(argv.RealType, typ) {\n\t\tptyp, isptr := typ.(*godwarf.PtrType)\n\t\t_, isvoid := argv.DwarfType.(*godwarf.VoidType)\n\t\tif (argv.Kind == reflect.Ptr || isvoid) && argv.loaded && len(argv.Children) > 0 && isptr {\n\t\t\tcv := argv.Children[0]\n\t\t\targv.Children[0] = *newVariable(cv.Name, cv.Addr, ptyp.Type, cv.bi, cv.mem)\n\t\t\targv.Children[0].OnlyAddr = true\n\t\t}\n\t\targv.RealType = typ\n\t\targv.DwarfType = op.DwarfType\n\t\tif isptr {\n\t\t\targv.Kind = reflect.Ptr // could be converting from unsafe.Pointer\n\t\t}\n\t\tstack.push(argv)\n\t\treturn\n\t}","sourceCodeStart":1504,"sourceCodeEnd":1540,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/eval.go#L1504-L1540","documentation":"Error \"can not convert %q to %s\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/proc/eval.go:1522 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}