fix tests
This commit is contained in:
parent
a6526695f0
commit
b80d70b0f3
11 changed files with 153 additions and 73 deletions
|
|
@ -1,49 +1,63 @@
|
|||
discard """
|
||||
errormsg: "type mismatch: got <Bar[system.int]>"
|
||||
disabled: "true"
|
||||
disabled: "false"
|
||||
nimout: '''
|
||||
t3330.nim(63, 4) Error: type mismatch: got <Bar[system.int]>
|
||||
t3330.nim(78, 4) Error: type mismatch: got <Bar[system.int]>
|
||||
but expected one of:
|
||||
proc test(foo: Foo[int])
|
||||
t3330.nim(48, 8) Hint: Non-matching candidates for add(k, string, T)
|
||||
first type mismatch at position: 1
|
||||
required type for foo: Foo[int]
|
||||
but expression 'bar' is of type: Bar[system.int]
|
||||
t3330.nim(63, 8) Hint: Non-matching candidates for add(k, string, T)
|
||||
proc add[T](x: var seq[T]; y: openArray[T])
|
||||
first type mismatch at position: 1
|
||||
required type: var seq[T]
|
||||
required type for x: var seq[T]
|
||||
but expression 'k' is of type: Alias
|
||||
proc add(result: var string; x: float)
|
||||
first type mismatch at position: 1
|
||||
required type: var string
|
||||
required type for result: var string
|
||||
but expression 'k' is of type: Alias
|
||||
proc add(x: var string; y: string)
|
||||
first type mismatch at position: 1
|
||||
required type: var string
|
||||
required type for x: var string
|
||||
but expression 'k' is of type: Alias
|
||||
proc add(x: var string; y: cstring)
|
||||
first type mismatch at position: 1
|
||||
required type: var string
|
||||
required type for x: var string
|
||||
but expression 'k' is of type: Alias
|
||||
proc add[T](x: var seq[T]; y: T)
|
||||
first type mismatch at position: 1
|
||||
required type: var seq[T]
|
||||
required type for x: var seq[T]
|
||||
but expression 'k' is of type: Alias
|
||||
proc add(result: var string; x: int64)
|
||||
first type mismatch at position: 1
|
||||
required type: var string
|
||||
required type for result: var string
|
||||
but expression 'k' is of type: Alias
|
||||
proc add(x: var string; y: char)
|
||||
first type mismatch at position: 1
|
||||
required type: var string
|
||||
required type for x: var string
|
||||
but expression 'k' is of type: Alias
|
||||
|
||||
t3330.nim(48, 8) template/generic instantiation of `add` from here
|
||||
t3330.nim(55, 6) Foo: 'bar.value' cannot be assigned to
|
||||
t3330.nim(48, 8) template/generic instantiation of `add` from here
|
||||
t3330.nim(56, 6) Foo: 'bar.x' cannot be assigned to
|
||||
t3330.nim(63, 8) template/generic instantiation of `add` from here
|
||||
t3330.nim(70, 6) Foo: 'bar.value' cannot be assigned to
|
||||
t3330.nim(63, 8) template/generic instantiation of `add` from here
|
||||
t3330.nim(71, 6) Foo: 'bar.x' cannot be assigned to
|
||||
|
||||
expression: test(bar)'''
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## line 60
|
||||
type
|
||||
Foo[T] = concept k
|
||||
add(k, string, T)
|
||||
|
|
|
|||
|
|
@ -2,69 +2,101 @@ 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(158, 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(161, 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
|
||||
first type mismatch at position: 1
|
||||
required type for o: ExplainedConcept
|
||||
but expression '10' is of type: int literal(10)
|
||||
texplain.nim(124, 6) ExplainedConcept: undeclared field: 'foo'
|
||||
texplain.nim(124, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(124, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(124, 5) ExplainedConcept: concept predicate failed
|
||||
texplain.nim(125, 6) ExplainedConcept: undeclared field: 'bar'
|
||||
texplain.nim(125, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(125, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(124, 5) ExplainedConcept: concept predicate failed
|
||||
|
||||
texplain.nim(124, 10) Hint: Non-matching candidates for e(10)
|
||||
texplain.nim(164, 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
|
||||
first type mismatch at position: 1
|
||||
required type for o: ExplainedConcept
|
||||
but expression '10' is of type: int literal(10)
|
||||
texplain.nim(124, 6) ExplainedConcept: undeclared field: 'foo'
|
||||
texplain.nim(124, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(124, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(124, 5) ExplainedConcept: concept predicate failed
|
||||
texplain.nim(125, 6) ExplainedConcept: undeclared field: 'bar'
|
||||
texplain.nim(125, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(125, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(124, 5) ExplainedConcept: concept predicate failed
|
||||
|
||||
texplain.nim(128, 20) Error: type mismatch: got <NonMatchingType>
|
||||
texplain.nim(168, 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
|
||||
first type mismatch at position: 1
|
||||
required type for o: ExplainedConcept
|
||||
but expression 'n' is of type: NonMatchingType
|
||||
texplain.nim(168, 9) template/generic instantiation of `assert` from here
|
||||
texplain.nim(124, 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
|
||||
|
||||
expression: e(n)
|
||||
texplain.nim(129, 20) Error: type mismatch: got <NonMatchingType>
|
||||
texplain.nim(169, 20) Error: type mismatch: got <NonMatchingType>
|
||||
but expected one of:
|
||||
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(169, 9) template/generic instantiation of `assert` from here
|
||||
texplain.nim(128, 5) RegularConcept: concept predicate failed
|
||||
proc r[T](a: SomeNumber; b: T; c: auto)
|
||||
first type mismatch at position: 1
|
||||
required type for a: SomeNumber
|
||||
but expression 'n' is of type: NonMatchingType
|
||||
proc r(i: string): int
|
||||
first type mismatch at position: 1
|
||||
required type for i: string
|
||||
but expression 'n' is of type: NonMatchingType
|
||||
|
||||
expression: r(n)
|
||||
texplain.nim(130, 20) Hint: Non-matching candidates for r(y)
|
||||
texplain.nim(170, 20) Hint: Non-matching candidates for r(y)
|
||||
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
|
||||
proc r(i: string): int
|
||||
first type mismatch at position: 1
|
||||
required type for i: string
|
||||
but expression 'y' is of type: MatchingType
|
||||
|
||||
texplain.nim(138, 2) Error: type mismatch: got <MatchingType>
|
||||
texplain.nim(178, 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
|
||||
first type mismatch at position: 1
|
||||
required type for o: NestedConcept
|
||||
but expression 'y' is of type: MatchingType
|
||||
texplain.nim(128, 6) RegularConcept: undeclared field: 'foo'
|
||||
texplain.nim(128, 6) RegularConcept: undeclared field: '.'
|
||||
texplain.nim(128, 6) RegularConcept: expression '.' cannot be called
|
||||
texplain.nim(128, 5) RegularConcept: concept predicate failed
|
||||
texplain.nim(129, 6) RegularConcept: undeclared field: 'bar'
|
||||
texplain.nim(129, 6) RegularConcept: undeclared field: '.'
|
||||
texplain.nim(129, 6) RegularConcept: expression '.' cannot be called
|
||||
texplain.nim(128, 5) RegularConcept: concept predicate failed
|
||||
texplain.nim(132, 5) NestedConcept: concept predicate failed
|
||||
|
||||
expression: f(y)
|
||||
'''
|
||||
expression: f(y)'''
|
||||
errormsg: "type mismatch: got <MatchingType>"
|
||||
line: 138
|
||||
line: 178
|
||||
|
||||
disabled: 32bit
|
||||
"""
|
||||
|
|
@ -77,7 +109,15 @@ expression: f(y)
|
|||
|
||||
|
||||
|
||||
# line 80 HERE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# line 120 HERE
|
||||
|
||||
type
|
||||
ExplainedConcept {.explain.} = concept o
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue