summary refs log tree commit diff stats
path: root/compiler/sem.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/sem.nim')
-rw-r--r--compiler/sem.nim9
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim
index 2d69d4213..a90948245 100644
--- a/compiler/sem.nim
+++ b/compiler/sem.nim
@@ -95,15 +95,6 @@ proc inferWithMetatype(c: PContext, formal: PType,
 
 var commonTypeBegin = PType(kind: tyExpr)
 
-proc isEmptyContainer(t: PType): bool =
-  case t.kind
-  of tyExpr, tyNil: result = true
-  of tyArray, tyArrayConstr: result = t.sons[1].kind == tyEmpty
-  of tySet, tySequence, tyOpenArray, tyVarargs:
-    result = t.sons[0].kind == tyEmpty
-  of tyGenericInst: result = isEmptyContainer(t.lastSon)
-  else: result = false
-
 proc commonType*(x, y: PType): PType =
   # new type relation that is used for array constructors,
   # if expressions, etc.:
er7 test' href='/ahoang/Nim/commit/tests/run/titer7.nim?h=devel&id=a6d5707faff21722f22f91c56704c44fc03d47f6'>a6d5707fa ^
3b783f7e1 ^
a6d5707fa ^
3b783f7e1 ^
307a6095f ^
a6d5707fa ^
307a6095f ^
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
49
50
51
52
53