tconcept2.nim 642 B

12345678910111213141516
  1. SomeNumber = concept a, type T
  2. a.int is int
  3. int.to(T) is type(a)
  4. #[!]#
  5. discard """
  6. $nimsuggest --tester $file
  7. >chk $1
  8. chk;;skUnknown;;;;Hint;;???;;0;;-1;;">> (toplevel): import(dirty): tests/tconcept2.nim [Processing]";;0
  9. chk;;skUnknown;;;;Error;;$file;;1;;2;;"invalid indentation";;0
  10. chk;;skUnknown;;;;Error;;$file;;1;;15;;"the \'concept\' keyword is only valid in \'type\' sections";;0
  11. chk;;skUnknown;;;;Error;;$file;;1;;15;;"invalid indentation";;0
  12. chk;;skUnknown;;;;Error;;$file;;1;;15;;"expression expected, but found \'keyword concept\'";;0
  13. chk;;skUnknown;;;;Error;;$file;;1;;2;;"\'SomeNumber\' cannot be assigned to";;0
  14. """