Table of Contents
Like most good compilers, Concurnas supports error reporting. Concurnas also supports warnings in the form of a large number of compiler facets designed to help you build 'better' - less buggy, easier to read and maintain software. These warnings are for cases where the outlined problem is not so severe as to warrant compilation failure (an error), but still deserves attention for its likely pathology.
Warnings can be disabled by using the
@SuppressWarnings() annotation. For example, say we have a redefine import warning:
class String(a int)//redefines the default imported class: String
We can disable this warning by attaching the
@SuppressWarnings() annotation to the method or class/actor/trait encapsulating the code triggering the warning:
@SuppressWarnings("redefine-import") class String(a int)//no longer triggers a warning
Disabling multiple warnings?
Multiple warnings may be disabled by passing an array of warnings to disable to the
@SuppressWarnings() annotation. For example:
@SuppressWarnings("all"). Though this is not recommended best practice.
Disabling all warnings?
All warnings may be disabled by using the annotation:
Concurnas offers the following list of warnings. The below strings can be used in conjunction with the aforedescribed
@SuppressWarnings() annotation in order to disable them:
enum-match-non-exhaustive - Match statement on enum is missing entry for enum element.
typedef-arg-use - Argument has been defined in a typedef but omitted from the right hand side declaration.
generic-cast - Attempted object cast to generic type.
redefine-import - Defined class name or variable overrides existing imported class name (including auto imported).
typedef-override - Defined
typedefoverrides existing type.