<Can you force a compiler warning or error in Kotl...
# stackoverflow
u
Can you force a compiler warning or error in Kotlin/Java? Having a background in iOS development, I'm quite used to using this directive for intentionally triggering a compiler warning (in Swift): #warning("This will output as a warning during compilation") or this one to trigger an error: #error("This will output as an error during compilation") This is very useful if, for example, I need to defer attention to the code fragment in question, or when using conditional compiler directives. I really miss this feature during Android development (in...