tv3_typeDefinition.nim 574 B

123456789101112131415161718192021222324252627282930313233
  1. # tests v3
  2. type
  3. Foo* = ref object of RootObj
  4. bar*: string
  5. proc test(ff: Foo) =
  6. echo f#[!]#f.bar
  7. type
  8. Fo#[!]#o2* = ref object of RootObj
  9. type
  10. FooGeneric[T] = ref object of RootObj
  11. bar*: T
  12. let fooGeneric = FooGeneric[string]()
  13. echo fo#[!]#oGeneric.bar
  14. # bad type
  15. echo unde#[!]#fined
  16. discard """
  17. $nimsuggest --v3 --tester $file
  18. >type $1
  19. type skType tv3_typeDefinition.Foo Foo $file 4 2 "" 100
  20. >type $2
  21. type skType tv3_typeDefinition.Foo2 Foo2 $file 11 2 "" 100
  22. >type $3
  23. type skType tv3_typeDefinition.FooGeneric FooGeneric $file 14 2 "" 100
  24. >type $4
  25. """