添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
无邪的灯泡  ·  mybatis xml ...·  1 年前    · 
聪明伶俐的柠檬  ·  深入理解 ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm writing the following nested function where dfsVisit uses the arrays "numCaminos" and "colores" declared in the outer function

However the kotlin compiler is giving me a "variable expected" error on the assignments in lines 31 and 34 specifically, this error doesn't show up on any of the other Array assignments within the nested dfsVisit function. I tried de-nesting the functions and passing the arrays as arguments of dfsVisit but the problem persisted on those 2 assignments specifically. Why could this be happening?

I'm running the Kotlin compiler in Manjaro Linux through the repository package

Note: Sorry for using a picture instead of a code block, the post editor was giving me some formatting issues.

For reference, this answer explains some reasons why posting text is better than images; it also links to this question giving info on how to format code blocks. gidds Mar 24, 2022 at 10:30

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .