lurenjiauser
V2EX  ›  Kotlin

请大佬帮忙看一眼我这个注解为什么没能抑制 never used 警告?

  •  
  •   lurenjiauser · Jan 27, 2024 · 4849 views
    This topic created in 972 days ago, the information mentioned may be changed or developed.
    @Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
    @Retention(AnnotationRetention.SOURCE)
    @Suppress("unused", "CanBePrivate")
    annotation class Api
    

    还是被警告了

    1 replies  •  2024-01-30 16:59:10 +08:00
    LiYing2016
        1
    LiYing2016  
       Jan 30, 2024
    直接把 `@Suppress` 写在 `fun sendText` 上试试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2496 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:10 · PVG 19:10 · LAX 04:10 · JFK 07:10
    ♥ Do have faith in what you're doing.