zhwguest
V2EX  ›  Kotlin

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

  •  
  •   zhwguest · Jan 27, 2024 · 4023 views
    This topic created in 860 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   ·   Solana   ·   2981 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 04:15 · PVG 12:15 · LAX 21:15 · JFK 00:15
    ♥ Do have faith in what you're doing.