Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

432
Visualizações
IntelliJ/Kotlin: What does the `^use` hint mean?

I'm using Kotlin in IntelliJ. I've written a fairly typical recursive function with a couple streams to zip up some files. I'm seeing a ^use and I don't know what IntelliJ is trying to tell me. (Hovering over such things usually teaches me something I didn't know about the language or warns me about a common mistake, but this provides no details)

Here is the screenshot of my function with an arrow pointing to the the hint.

The hint <code>^use</code> in front of a call to the file input stream copyTo extension function

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This hint marks an expression that is a return value of a lambda, also saying which function the lambda is passed to. It reads as 'returned from the lambda passed to use { ... }'.

As the last expression in each lambda is the return value, this hint helps finding which lambda the expression is actually returned from.

You can disable these hints in the IDE preferences: Editor → General → Appearance → Show parameter hints – Configure → Language: Kotlin → Show lambda return expression hints (also available from the hint's right click menu), the other kinds of inline hints are also set up there.

UPD: In IntelliJ IDEA 2019.3 and newer, these options are placed under Editor → Inlay Hints → Kotlin.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda