title: Dalvik Verifier Error: tried to get class from non-ref register v14
body: <p>I am playing around with writting smali and get the following error:</p>
  
  <pre><code>W/dalvikvm( 2798): VFY: tried to get class from non-ref register v14 (type=0)
  W/dalvikvm( 2798): VFY:  rejecting opcode 0x6e at 0x001c
  W/dalvikvm( 2798): VFY:  rejected Lcom/test/Smali1;.doTest(Lc
  om/test/Smali2;Z)Ljava/lang/String;
  W/dalvikvm( 2798): Verifier rejected class Lcom/test/Smali;
  </code></pre>
  
  <p>My smali code:</p>
  
  <pre><code>.method  doTest(Lcom/test/Smali2;Z)Ljava/lang/String;
  .registers 22
  .prologue
  move/16 v16, p2
  move-object/from16 v15, p1
  move-object/from16 v14, p0
  check-cast v15, Lcom/test/Smali2;
  check-cast v14, Lcom/test/Smali1;
  invoke-virtual {v14}, Lcom/test/Smali1;-&gt;test()
  </code></pre>
  
  <p>I tried to find the problem by looking at the CodeVerifier code, but I am not sure why v14 is detected as non-ref register. </p>