zhwguest
V2EX  ›  Kotlin

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

  •  
  •   zhwguest · Jan 27, 2024 · 3925 views
    This topic created in 842 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   ·   5248 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 73ms · UTC 07:41 · PVG 15:41 · LAX 00:41 · JFK 03:41
    ♥ Do have faith in what you're doing.