File: tmultim7.nim

package info (click to toggle)
nim 0.19.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 462,356 kB
  • sloc: sh: 11,089; ansic: 4,699; makefile: 706; python: 309; sql: 297; asm: 141; xml: 13
file content (48 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

# bug #3431

type
  Lexer = object
    buf*: string
    pos*: int
    lastchar*: char

  ASTNode = object

method init*(self: var Lexer; buf: string) {.base.} =
  self.buf = buf
  self.pos = 0
  self.lastchar = self.buf[0]

method init*(self: var ASTNode; val: string) =
  discard


# bug #3370
type
  RefTestA*[T] = ref object of RootObj
    data*: T

method tester*[S](self: S): bool =
  true

type
  RefTestB* = RefTestA[(string, int)]

method tester*(self: RefTestB): bool =
  true

type
  RefTestC = RefTestA[string]

method tester*(self: RefTestC): bool =
  false


# bug #3468

type X = ref object of RootObj
type Y = ref object of RootObj

method draw*(x: X) {.base.} = discard
method draw*(y: Y) {.base.} = discard