summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semexprs.nim')
-rwxr-xr-xcompiler/semexprs.nim6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 5dedc9b82..7c147e778 100755
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1573,11 +1573,7 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
     result = semExpr(c, n.sons[0], flags)
   of nkTypeOfExpr:
     var typ = semTypeNode(c, n, nil).skipTypes({tyTypeDesc})
-    typ = makeTypedesc(c, typ)
-    var sym = newSym(skType, getIdent"TypeOfExpr", 
-                     typ.owner, n.info).linkTo(typ)
-    sym.flags.incl(sfAnon)
-    result = newSymNode(sym, n.info)
+    result = symNodeFromType(c, typ, n.info)
   of nkCall, nkInfix, nkPrefix, nkPostfix, nkCommand, nkCallStrLit: 
     # check if it is an expression macro:
     checkMinSonsLen(n, 1)
dded Nimrod version of the compiler' href='/ahoang/Nim/commit/rod/procfind.nim?h=devel&id=e254741541b0389dfb0b675116c76a6a144b90b7'>e25474154 ^
5b28d0820 ^
e25474154 ^




90db9171a ^

e25474154 ^
90db9171a ^
e25474154 ^
90db9171a ^

e25474154 ^
90db9171a ^


e25474154 ^














5cd933a44 ^






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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93