
# No type errors can be detected in this method. first end end class Email # address attr_reader :address def initialize ( address: ) = address end def = ( other ) # `other` has type of `untyped`, which means type checking is skipped. # `contact` has type of `Phone | Email` but in the `when` clause, contact has type of `Phone`.

# With case expression, simple type-case is implemented. # (Steep can skip checking if the methods are implemented.) # name, contacts attr_reader :name attr_reader :contacts def initialize ( name: ) = name = end def guess_country ( ) contacts.

Class Person # annotation is to tell steep that # the `name` and `contacts` methods are defined without def syntax.
