diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-01-27 01:17:34 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2017-03-24 17:03:55 +0200 |
commit | c605d575746f45a722542c67ece0fcd133ba9799 (patch) | |
tree | 7c4d6ef0aacda47c724eca178d0eab72d7df3032 /compiler | |
parent | d6d548c32f4d60bd4f89c377fb94bfc57ad4cbfd (diff) | |
download | Nim-c605d575746f45a722542c67ece0fcd133ba9799.tar.gz |
restore compilation and make all concepts tests green
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ccgtypes.nim | 3 | ||||
-rw-r--r-- | compiler/options.nim | 4 | ||||
-rw-r--r-- | compiler/sigmatch.nim | 8 |
3 files changed, 8 insertions, 7 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index d62eab8ac..9915ad355 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -790,7 +790,8 @@ proc getTypeDescAux(m: BModule, origTyp: PType, check: var IntSet): Rope = of 1, 2, 4, 8: addf(m.s[cfsTypes], "typedef NU$2 $1;$n", [result, rope(s*8)]) else: addf(m.s[cfsTypes], "typedef NU8 $1[$2];$n", [result, rope(getSize(t))]) - of tyGenericInst, tyDistinct, tyOrdinal, tyTypeDesc, tyAlias: + of tyGenericInst, tyDistinct, tyOrdinal, tyTypeDesc, tyAlias, + tyUserTypeClass, tyUserTypeClassInst, tyInferred: result = getTypeDescAux(m, lastSon(t), check) else: internalError("getTypeDescAux(" & $t.kind & ')') diff --git a/compiler/options.nim b/compiler/options.nim index 063dff826..c4a57f41c 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -72,8 +72,8 @@ type # please make sure we have under 32 options TGlobalOptions* = set[TGlobalOption] const - harmlessOptions* = {optForceFullMake, optNoLinking, optReportConceptFailures, - optRun, optUseColors, optStdout} + harmlessOptions* = {optForceFullMake, optNoLinking, optRun, + optUseColors, optStdout} type TCommands* = enum # Nim's commands diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index a40f8ee66..bbcf25903 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -701,7 +701,7 @@ proc matchUserTypeClass*(c: PContext, m: var TCandidate, # We need to put them in the current sigmatch's binding table in order for them # to be resolvable while matching the rest of the parameters for p in typeParams: - put(m.bindings, p[1], p[0].typ) + put(m, p[1], p[0].typ) if ff.kind == tyUserTypeClassInst: result = generateTypeInstance(c, m.bindings, Concept.sym.info, ff) @@ -831,7 +831,7 @@ proc inferStaticsInRange(c: var TCandidate, var rhs = r var inferred = inferStaticParam(exp, rhs) if inferred != nil: - put(c.bindings, inferred, inferred) + put(c, inferred, inferred) return isGeneric else: failureToInferStaticParam exp @@ -1612,8 +1612,8 @@ proc paramTypesMatchAux(m: var TCandidate, f, a: PType, if a.kind == tyStatic: if m.callee.kind == tyGenericBody and - argType.n == nil and - tfGenericTypeParam notin argType.flags: + a.n == nil and + tfGenericTypeParam notin a.flags: return newNodeIT(nkType, argOrig.info, makeTypeFromExpr(c, arg)) else: var evaluated = c.semTryConstExpr(c, arg) |