diff options
Diffstat (limited to 'tests/concepts/texplain.nim')
-rw-r--r-- | tests/concepts/texplain.nim | 144 |
1 files changed, 94 insertions, 50 deletions
diff --git a/tests/concepts/texplain.nim b/tests/concepts/texplain.nim index 4ec848732..8cf04ae82 100644 --- a/tests/concepts/texplain.nim +++ b/tests/concepts/texplain.nim @@ -1,75 +1,92 @@ discard """ cmd: "nim c --verbosity:0 --colors:off $file" nimout: ''' -Hint: texplain [Processing] -texplain.nim(118, 10) Hint: Non-matching candidates for e(y) +texplain.nim(162, 10) Hint: Non-matching candidates for e(y) proc e(i: int): int + first type mismatch at position: 1 + required type for i: int + but expression 'y' is of type: MatchingType -texplain.nim(121, 7) Hint: Non-matching candidates for e(10) +texplain.nim(165, 7) Hint: Non-matching candidates for e(10) proc e(o: ExplainedConcept): int -texplain.nim(84, 6) ExplainedConcept: undeclared field: 'foo' -texplain.nim(84, 6) ExplainedConcept: undeclared field: '.' -texplain.nim(84, 6) ExplainedConcept: expression '.' cannot be called -texplain.nim(84, 5) ExplainedConcept: concept predicate failed -texplain.nim(85, 6) ExplainedConcept: undeclared field: 'bar' -texplain.nim(85, 6) ExplainedConcept: undeclared field: '.' -texplain.nim(85, 6) ExplainedConcept: expression '.' cannot be called -texplain.nim(84, 5) ExplainedConcept: concept predicate failed - -texplain.nim(124, 10) Hint: Non-matching candidates for e(10) + first type mismatch at position: 1 + required type for o: ExplainedConcept + but expression '10' is of type: int literal(10) +texplain.nim(128, 6) ExplainedConcept: undeclared field: 'foo' +texplain.nim(128, 5) ExplainedConcept: concept predicate failed +texplain.nim(129, 6) ExplainedConcept: undeclared field: 'bar' +texplain.nim(128, 5) ExplainedConcept: concept predicate failed + +texplain.nim(168, 10) Hint: Non-matching candidates for e(10) proc e(o: ExplainedConcept): int -texplain.nim(84, 6) ExplainedConcept: undeclared field: 'foo' -texplain.nim(84, 6) ExplainedConcept: undeclared field: '.' -texplain.nim(84, 6) ExplainedConcept: expression '.' cannot be called -texplain.nim(84, 5) ExplainedConcept: concept predicate failed -texplain.nim(85, 6) ExplainedConcept: undeclared field: 'bar' -texplain.nim(85, 6) ExplainedConcept: undeclared field: '.' -texplain.nim(85, 6) ExplainedConcept: expression '.' cannot be called -texplain.nim(84, 5) ExplainedConcept: concept predicate failed - -texplain.nim(128, 20) Error: type mismatch: got <NonMatchingType> + first type mismatch at position: 1 + required type for o: ExplainedConcept + but expression '10' is of type: int literal(10) +texplain.nim(128, 6) ExplainedConcept: undeclared field: 'foo' +texplain.nim(128, 5) ExplainedConcept: concept predicate failed +texplain.nim(129, 6) ExplainedConcept: undeclared field: 'bar' +texplain.nim(128, 5) ExplainedConcept: concept predicate failed + +texplain.nim(172, 20) Error: type mismatch: got <NonMatchingType> but expected one of: -proc e(o: ExplainedConcept): int -texplain.nim(128, 9) template/generic instantiation of `assert` from here -texplain.nim(84, 5) ExplainedConcept: concept predicate failed proc e(i: int): int + first type mismatch at position: 1 + required type for i: int + but expression 'n' is of type: NonMatchingType +proc e(o: ExplainedConcept): int + first type mismatch at position: 1 + required type for o: ExplainedConcept + but expression 'n' is of type: NonMatchingType +texplain.nim(172, 9) template/generic instantiation of `assert` from here +texplain.nim(128, 5) ExplainedConcept: concept predicate failed expression: e(n) -texplain.nim(129, 20) Error: type mismatch: got <NonMatchingType> +texplain.nim(173, 20) Error: type mismatch: got <NonMatchingType> but expected one of: +proc r(i: string): int + first type mismatch at position: 1 + required type for i: string + but expression 'n' is of type: NonMatchingType proc r(o: RegularConcept): int -texplain.nim(129, 9) template/generic instantiation of `assert` from here -texplain.nim(88, 5) RegularConcept: concept predicate failed + first type mismatch at position: 1 + required type for o: RegularConcept + but expression 'n' is of type: NonMatchingType +texplain.nim(173, 9) template/generic instantiation of `assert` from here +texplain.nim(132, 5) RegularConcept: concept predicate failed proc r[T](a: SomeNumber; b: T; c: auto) -proc r(i: string): int + first type mismatch at position: 1 + required type for a: SomeNumber + but expression 'n' is of type: NonMatchingType expression: r(n) -texplain.nim(130, 20) Hint: Non-matching candidates for r(y) -proc r[T](a: SomeNumber; b: T; c: auto) +texplain.nim(174, 20) Hint: Non-matching candidates for r(y) proc r(i: string): int + first type mismatch at position: 1 + required type for i: string + but expression 'y' is of type: MatchingType +proc r[T](a: SomeNumber; b: T; c: auto) + first type mismatch at position: 1 + required type for a: SomeNumber + but expression 'y' is of type: MatchingType -texplain.nim(138, 2) Error: type mismatch: got <MatchingType> +texplain.nim(182, 2) Error: type mismatch: got <MatchingType> but expected one of: proc f(o: NestedConcept) -texplain.nim(88, 6) RegularConcept: undeclared field: 'foo' -texplain.nim(88, 6) RegularConcept: undeclared field: '.' -texplain.nim(88, 6) RegularConcept: expression '.' cannot be called -texplain.nim(88, 5) RegularConcept: concept predicate failed -texplain.nim(89, 6) RegularConcept: undeclared field: 'bar' -texplain.nim(89, 6) RegularConcept: undeclared field: '.' -texplain.nim(89, 6) RegularConcept: expression '.' cannot be called -texplain.nim(88, 5) RegularConcept: concept predicate failed -texplain.nim(92, 5) NestedConcept: concept predicate failed - -expression: f(y) -''' + first type mismatch at position: 1 + required type for o: NestedConcept + but expression 'y' is of type: MatchingType +texplain.nim(132, 6) RegularConcept: undeclared field: 'foo' +texplain.nim(132, 5) RegularConcept: concept predicate failed +texplain.nim(133, 6) RegularConcept: undeclared field: 'bar' +texplain.nim(132, 5) RegularConcept: concept predicate failed +texplain.nim(136, 5) NestedConcept: concept predicate failed + +expression: f(y)''' errormsg: "type mismatch: got <MatchingType>" - line: 138 - - disabled: 32bit """ -# disabled on 32 bit, because the order of suggested alternatives ``r`` differs + + # proc r[T](a: SomeNumber; b: T; c: auto) # proc r(i: string): int # proc r(o: RegularConcept): int @@ -77,7 +94,34 @@ expression: f(y) -# line 80 HERE + + + + + + + + + + + + + + + + + + + + + + + + + + + +# line 124 HERE type ExplainedConcept {.explain.} = concept o |