# 8.2 Inline的问题

Inline 不会改变函数的行为，但会缩短程序中的函数调用链，这对于错误信息的展示是不友好的。以上述代码为例，当参数 `base=0` 时， 理想状况下程序应该汇报的错误代码位置在函数 `sum()` 内，而非 Inline 之后的 `doSum()` 中。因此编译器在 Inline 时必须维持原先代码的结构，并将其与 Inline 之后的代码关联起来，这会引入额外的复杂度。

另外一点是对某个函数进行 Inline 时，编译器会将所有调用该函数的地方进行替换，这会导致程序体积变大，最终的可执行文件也会变大。因此内联操作并不是越多越好，编译器需要找到一种平衡。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gocompiler.shizhz.me/8.-golang-bian-yi-qi-inline/8.2-inline-de-wen-ti.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
