fork download
  1.  
  2. object Main {
  3. def main(args: Array[String]) {
  4. val l = List(new AClass, AnObject, ACompanionExample)
  5. l.map(a => a.autocorrect)
  6. .foreach(println)
  7. }
  8.  
  9. }
  10.  
  11. trait Autocorrector {
  12. def autocorrect: String // this is abstract
  13. }
  14.  
  15. class AClass extends Autocorrector {
  16. def autocorrect = "AClass autocorrect"
  17. }
  18.  
  19. object AnObject extends Autocorrector {
  20. def autocorrect = "AnObject autocorrect"
  21. }
  22.  
  23. class ACompanionExample
  24. object ACompanionExample extends Autocorrector {
  25. def autocorrect = "CompanionExample autocorrect"
  26. }
  27.  
Success #stdin #stdout 0.5s 54464KB
stdin
"tax id": "0x"
"0x752673bf
"const =>0x4338ccf0;,{}
"×0": "0x995983086da846ad652,
"0xf28280baf87f9fd44b3c45f",
 "hash": "mapping(smart contract =>),
0xaa4b1c2bde86ea
"uint symbol contract"; =>
]function
gtag(){dataLayer.push(arguments);}
     gtag(‘js', new Date());
     gtag('config', 'UA-46998878-6',
            {} ": "txid0x"});
     {
    }
  }
],
"string symbol"
"const contract =>()
"console.log(utilis.format.contract();,(_requi
re.root.chain) =>
"tx":
"a914b4b656f4c4b14ee0d098299d1d6eb4
2d2e22adcd87",
       "reqSigs": 619643,
       "type": "scripthash",
     }
   }
 ],
[
 "version": 62868,
 "Txsize”: 9523,
 "Txpush": 48992,
 "Txweight": 781061,
 “”: 524888316,
 "Tx": [compile.0.8.9]
   {control.const.tx.chain}
     "txid":
"59178b02cfcbdee51742a4b2658df35b63
b51115a53cf802bc6646304402206974fd9
4fa593a",
   
"vault"0x688d3d44891e17705375af
281124bb5707251ee4: 1,
       "scriptchain": {
         "txnonce": "00149ef51fb1f5adb44;,
("e20eff758d34ae64fa781fa4f",
       "hex": "1600149ef51fb1f5a"
"db44e20eff758d34ae64a781fa4f"
    },
    "txinwitness": [open"source]
"2f941dbfd031970b8cef69e6f8e97bd4630
44022069a23fcfc421b44c622d93b7639a2
152f941dbfd031970b8cef69e6f8e97bd460
22026cb801f38a1313cf32a8685749546a5
825b1c332ee4409db82f9dc85d99086401"
;,
        "scriptPrivKey": {};,
        "Txid": "OP_ HASH571343227
stdout
AClass autocorrect
AnObject autocorrect
CompanionExample autocorrect