annotation NoInline

Overview

Indicates to the compiler that it should never inline the annotated method.

@[NoInline]
def foo
  1
end

This has no effect if the method yields, since methods that yield are always inlined.

May not be used together with AlwaysInline.

NOTE The Crystal book has a section about Built-in Annotations: NoInline.

Defined in:

annotations.cr