fix bugs with dot & call operators [backport] (#20931)
* better error messages for dot operators [backport] fixes #13063 * also fixes #7777 * fix #6981 and #9831 too * fix * minor improvement * sus test fixes * make test multiplatform lol * fix nimsuggest test, extra improvements
This commit is contained in:
parent
f31dc63169
commit
555c5ed1a7
6 changed files with 156 additions and 49 deletions
|
|
@ -13,14 +13,8 @@ proc e(o: ExplainedConcept): int
|
|||
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, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(128, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(128, 6) ExplainedConcept: expression '' has no type (or is ambiguous)
|
||||
texplain.nim(128, 5) ExplainedConcept: concept predicate failed
|
||||
texplain.nim(129, 6) ExplainedConcept: undeclared field: 'bar'
|
||||
texplain.nim(129, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(129, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(129, 6) ExplainedConcept: expression '' has no type (or is ambiguous)
|
||||
texplain.nim(128, 5) ExplainedConcept: concept predicate failed
|
||||
|
||||
texplain.nim(168, 10) Hint: Non-matching candidates for e(10)
|
||||
|
|
@ -29,14 +23,8 @@ proc e(o: ExplainedConcept): int
|
|||
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, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(128, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(128, 6) ExplainedConcept: expression '' has no type (or is ambiguous)
|
||||
texplain.nim(128, 5) ExplainedConcept: concept predicate failed
|
||||
texplain.nim(129, 6) ExplainedConcept: undeclared field: 'bar'
|
||||
texplain.nim(129, 6) ExplainedConcept: undeclared field: '.'
|
||||
texplain.nim(129, 6) ExplainedConcept: expression '.' cannot be called
|
||||
texplain.nim(129, 6) ExplainedConcept: expression '' has no type (or is ambiguous)
|
||||
texplain.nim(128, 5) ExplainedConcept: concept predicate failed
|
||||
|
||||
texplain.nim(172, 20) Error: type mismatch: got <NonMatchingType>
|
||||
|
|
@ -88,14 +76,8 @@ proc f(o: NestedConcept)
|
|||
required type for o: NestedConcept
|
||||
but expression 'y' is of type: MatchingType
|
||||
texplain.nim(132, 6) RegularConcept: undeclared field: 'foo'
|
||||
texplain.nim(132, 6) RegularConcept: undeclared field: '.'
|
||||
texplain.nim(132, 6) RegularConcept: expression '.' cannot be called
|
||||
texplain.nim(132, 6) RegularConcept: expression '' has no type (or is ambiguous)
|
||||
texplain.nim(132, 5) RegularConcept: concept predicate failed
|
||||
texplain.nim(133, 6) RegularConcept: undeclared field: 'bar'
|
||||
texplain.nim(133, 6) RegularConcept: undeclared field: '.'
|
||||
texplain.nim(133, 6) RegularConcept: expression '.' cannot be called
|
||||
texplain.nim(133, 6) RegularConcept: expression '' has no type (or is ambiguous)
|
||||
texplain.nim(132, 5) RegularConcept: concept predicate failed
|
||||
texplain.nim(136, 5) NestedConcept: concept predicate failed
|
||||
|
||||
|
|
@ -121,7 +103,25 @@ expression: f(y)'''
|
|||
|
||||
|
||||
|
||||
# line 120 HERE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# line 124 HERE
|
||||
|
||||
type
|
||||
ExplainedConcept {.explain.} = concept o
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue