diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ast.nim | 6 | ||||
-rw-r--r-- | compiler/ccgtrav.nim | 2 | ||||
-rw-r--r-- | compiler/ccgtypes.nim | 2 | ||||
-rw-r--r-- | compiler/semstmts.nim | 7 |
4 files changed, 9 insertions, 8 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index b0aca2d74..d8f9fc36c 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -1036,9 +1036,9 @@ proc newNode*(kind: TNodeKind): PNode = new(result) result.kind = kind #result.info = UnknownLineInfo() inlined: - result.info.fileIndex = int32(- 1) - result.info.col = int16(- 1) - result.info.line = int16(- 1) + result.info.fileIndex = int32(-1) + result.info.col = int16(-1) + result.info.line = int16(-1) when defined(useNodeIds): result.id = gNodeId if result.id == nodeIdToDebug: diff --git a/compiler/ccgtrav.nim b/compiler/ccgtrav.nim index 4215a84b1..7a2e221ee 100644 --- a/compiler/ccgtrav.nim +++ b/compiler/ccgtrav.nim @@ -66,7 +66,7 @@ proc genTraverseProc(c: var TTraversalClosure, accessor: Rope, typ: PType) = var p = c.p case typ.kind - of tyGenericInst, tyGenericBody, tyTypeDesc, tyAlias, tyDistinct: + of tyGenericInst, tyGenericBody, tyTypeDesc, tyAlias, tyDistinct, tyInferred: genTraverseProc(c, accessor, lastSon(typ)) of tyArray: let arraySize = lengthOrd(typ.sons[0]) diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 4c85294b2..80383ea84 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -119,7 +119,7 @@ proc scopeMangledParam(p: BProc; param: PSym) = const irrelevantForBackend = {tyGenericBody, tyGenericInst, tyGenericInvocation, - tyDistinct, tyRange, tyStatic, tyAlias} + tyDistinct, tyRange, tyStatic, tyAlias, tyInferred} proc typeName(typ: PType): Rope = let typ = typ.skipTypes(irrelevantForBackend) diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 564ab7ac3..0dd67b184 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1295,7 +1295,7 @@ proc semOverride(c: PContext, s: PSym, n: PNode) = localError(n.info, errGenerated, "cannot bind another '" & s.name.s & "' to: " & typeToString(obj)) noError = true - if not noError: + if not noError and sfSystemModule notin s.owner.flags: localError(n.info, errGenerated, "signature for '" & s.name.s & "' must be proc[T: object](x: var T)") else: @@ -1351,8 +1351,9 @@ proc semOverride(c: PContext, s: PSym, n: PNode) = localError(n.info, errGenerated, "cannot bind another '" & s.name.s & "' to: " & typeToString(obj)) return - localError(n.info, errGenerated, - "signature for '" & s.name.s & "' must be proc[T: object](x: var T; y: T)") + if sfSystemModule notin s.owner.flags: + localError(n.info, errGenerated, + "signature for '" & s.name.s & "' must be proc[T: object](x: var T; y: T)") else: if sfOverriden in s.flags: localError(n.info, errGenerated, |