title: Kotlin Class Extension
body: <p>I'm just learning Kotlin as a fun side-project for Project Euler.  I just started literally 5 minutes ago, in IntelliJ IDEA.</p>
  
  <p>I have this code:</p>
  
  <pre><code>fun Number.isMultipleOf(n: Number): Boolean {
      return this % n == 0
  }
  
  fun main(args: Array&lt;String&gt;){
      println(10.isMultipleOf(5))
  }
  </code></pre>
  
  <p>The compile error is this:</p>
  
  <pre><code>Kotlin: Unresolved reference.  None of the following candidates is applicable because of receiver type mismatch:
  @Deprecated @InlineOnly public inline operator fun BigDecimal.mod(other: BigDecimal): BigDecimal defined in kotlin
  </code></pre>
  
  <p>I'm experienced in Java, Python, C++ and Swift so I figured Kotlin shouldn't be that much of a challenge.  But WTF is a "receiver type"?</p>
  
  <p>How can I fix this compile error while getting the desired functionality out of the <code>Number</code> class extension?</p>