mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-17 01:57:11 +00:00
fixes broken merge
This commit is contained in:
@@ -158,11 +158,15 @@ proc sumGeneric(t: PType): int =
|
||||
t = t.sons[0]
|
||||
inc result
|
||||
inc isvar
|
||||
of tyTypeDesc:
|
||||
t = t.lastSon
|
||||
if t.kind == tyEmpty: break
|
||||
inc result
|
||||
of tyGenericInvocation, tyTuple:
|
||||
result += ord(t.kind == tyGenericInvocation)
|
||||
for i in 0 .. <t.len: result += t.sons[i].sumGeneric
|
||||
break
|
||||
of tyGenericParam, tyExpr, tyStatic, tyStmt, tyTypeDesc: break
|
||||
of tyGenericParam, tyExpr, tyStatic, tyStmt: break
|
||||
of tyBool, tyChar, tyEnum, tyObject, tyProc, tyPointer,
|
||||
tyString, tyCString, tyInt..tyInt64, tyFloat..tyFloat128,
|
||||
tyUInt..tyUInt64:
|
||||
|
||||
@@ -5,7 +5,7 @@ type
|
||||
FBar* = object
|
||||
|
||||
proc new*(_: typedesc[FFoo]): int = 2
|
||||
#proc new*[T](_: typedesc[T]): int = 3
|
||||
#proc new*(_: typedesc): int = 4
|
||||
proc new*[T](_: typedesc[T]): int = 3
|
||||
proc new*(_: typedesc): int = 4
|
||||
proc new*(_: typedesc[seq[Table[int, seq[Table[int, string]]]]]): int = 5
|
||||
proc new*(_: typedesc[seq[Table[int, seq[Table[int, typedesc]]]]]): int = 6
|
||||
|
||||
@@ -10,7 +10,7 @@ type
|
||||
|
||||
|
||||
when isMainModule:
|
||||
# doAssert FBar.new() == 3
|
||||
doAssert FBar.new() == 3
|
||||
|
||||
proc new(_: typedesc[LFoo]): int = 0
|
||||
proc new[T](_: typedesc[T]): int = 1
|
||||
|
||||
Reference in New Issue
Block a user