---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 12 Edition"
java_version: 12
chapter: "Chapter 4. The class File Format"
section: "4.10.1.9.areturn"
heading: "areturn"
parent: "4.10.1.9. Type Checking Instructions"
source: https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-4.html#jvms-4.10.1.9.areturn
id: "4.10.1.9.areturn"
url: https://jvm.obfuscated.software/jvms/se12/4.10.1.9.areturn.html
raw: https://jvm.obfuscated.software/jvms/se12/4.10.1.9.areturn.md
---

# areturn

An *areturn* instruction is type safe iff the enclosing method has a declared return type, `ReturnType`, that is a `reference` type, and one can validly pop a type matching `ReturnType` off the incoming operand stack.

```
instructionIsTypeSafe(areturn, Environment, _Offset, StackFrame,
                      afterGoto, ExceptionStackFrame) :-
    thisMethodReturnType(Environment, ReturnType),
    isAssignable(ReturnType, reference),
    canPop(StackFrame, [ReturnType], _PoppedStackFrame),
    exceptionStackFrame(StackFrame, ExceptionStackFrame).
```
