summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fix for #5695 make subscript operator overloadable for tuples (#5749)cooldome2017-04-241-3/+3
|
* move the object construction logic to a separate fileZahary Karadjov2017-04-061-277/+1
|
* object construction: test cases and manual additionsZahary Karadjov2017-04-061-10/+8
|
* cleaned up the code and implemented proper error messagesZahary Karadjov2017-04-061-77/+178
|
* fix #4556Zahary Karadjov2017-04-061-55/+164
| | | | | | | | | | | | | | | | | | | | | This implements a number of new safety checks and error messages when object constructors are used: In case objects: * the compiler will prevent you from initializing fields in conflicting branches * When a field from a particular branch is initialized, the compiler will demand that the discriminator field is also supplied with a maching compile-time value In all objects: * When the "requiresInit" pragma is applied to a type, all fields of the type must be initialized when object construction is used. The code will be simplified in a follow up commit.
* Merge remote-tracking branch 'origin/concepts-rebased' into araqAndreas Rumpf2017-03-311-34/+82
|\
| * Working test cases for the sophisticated matrix library example from the manualZahary Karadjov2017-03-241-8/+20
| | | | | | | | | | Fixed the dot operator when used within return types (see tgenericdotrettype) Fixed the matching of generic concepts aliases used with the implicit generics style
| * further improvements to the error messages produced by conceptsZahary Karadjov2017-03-241-5/+6
| |
| * proper error reporting for concepts and the introduction of the {.explain.} ↵Zahary Karadjov2017-03-241-5/+17
| | | | | | | | pragma
| * infer static parameters even when more complicated arithmetic is involvedZahary Karadjov2017-03-241-0/+1
| |
| * support derived values in non-generic user type classesZahary Karadjov2017-03-241-19/+20
| |
| * kill the reportConceptFailures options as it will be replaced by the ↵Zahary Karadjov2017-03-241-4/+1
| | | | | | | | .explain. pragma
| * introduce tyInferred for the unbound concept type paramsZahary Karadjov2017-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Why is tyInferred needed? The bindings in TCandidate are capable of inferring types within a single call expression. In concepts, we need to infer types in the same way, but across the whole body of the concept. Previously, once a concept type param was inferred, it was destructively mutated using t.assignType, but this proved to be problematic in the presence of overloads, because the bindings established while a non-matching overload is tested must be reverted/forgotten. tyInferred offers a non-destructive way to keep track of the inference progress. While introducing new types usually requires a lot of code paths in the compiler to updated, currently tyInferred is only a short-lived type within the concept body pass and it's unlikely to introduce breakage elsewhere in the compiler.
| * support for matching generic types' procs in generic conceptsZahary Karadjov2017-03-241-3/+1
| |
| * support for accessing types and consts defined in concepts with the dot operatorZahary Karadjov2017-03-241-1/+26
| |
| * support for accessing the inferred concept type params with the dot operatorZahary Karadjov2017-03-241-2/+2
| |
| * concept type params inference working in basic examplesZahary Karadjov2017-03-241-1/+3
| |
* | compiler: better error messages (#5613)Andreas Rumpf2017-03-261-7/+7
|/
* Fix generic forward declarations; fixes #4104; fixes #4908 (#5566)zah2017-03-231-1/+0
|
* make semObjConstr robust for nimsuggestAraq2017-03-211-3/+3
|
* mark symbols in getAst context as usedAndreas Rumpf2017-03-201-1/+5
|
* revert getAst handling to not use overloading resolutionAndreas Rumpf2017-03-201-1/+18
|
* overloading resolution for getAst; breaking changeAraq2017-03-181-8/+14
|
* Merge branch 'devel' into faster-nimsuggestAndreas Rumpf2017-03-141-5/+10
|\
| * Fixes #5167 and related problems (#5475)zah2017-03-121-0/+2
| | | | | | | | | | | | | | | | | | This commit returns to a bit less strict checking of the number of macro arguments, because some old immediate macros rely on a behavior where even the arity of the macro is not being checked. It may be better if such macros are just declared to use varargs[expr], but this remains for another day.
| * don't allow casting to non-concrete types; fixes #5428 (#5502)zah2017-03-121-5/+8
| |
* | nimsuggest: more things workAraq2017-03-091-1/+5
|/
* fixes #5467Araq2017-03-071-0/+4
|
* fixes #5430Araq2017-02-261-13/+14
|
* Merge branch 'devel' into faster-nimsuggestAndreas Rumpf2017-02-241-1/+1
|\
| * fixes #5417Andreas Rumpf2017-02-241-1/+1
| |
* | big compiler refactoring; avoid globals for multi method dispatcher generationAndreas Rumpf2017-02-221-23/+22
|/
* fixes #5383Araq2017-02-161-1/+2
|
* fixes #5354Araq2017-02-111-5/+5
|
* nimsuggest works in macrosAndreas Rumpf2017-02-071-0/+2
|
* fixes #5148Araq2016-12-291-1/+1
|
* Used typed/untyped instead of stmt/expr in semQuoteAst. Fixes issue 5120 (#5126)Chris Heller2016-12-221-2/+2
| | | * Use typed/untyped instead of stmt/expr in semQuoteAst. Fixes #5120
* Merge branch 'devel' into sighashesAraq2016-12-171-2/+2
|\
| * Gramma change: casted or Casted to cast or Cast respectivelyjlp7652016-12-171-2/+2
| | | | | | | | past tense of cast is cast not casted :-)
* | more fixesAraq2016-12-031-0/+1
| |
* | Merge branch 'devel' into sighashesAraq2016-12-011-1/+2
|\|
| * fixes #5079Araq2016-11-301-1/+2
| |
* | Merge branch 'devel' into sighashesAraq2016-11-281-1/+1
|\|
| * recursive modules are only detected to improve error messagesAndreas Rumpf2016-11-241-1/+1
| |
* | removed tyArrayConstr completely from the compiler; introduced tyAlias ↵Araq2016-11-141-21/+23
|/ | | | instead in preparation for further bugfixes
* refactoring complete: explicit ident cacheAraq2016-10-311-4/+4
|
* big refactoring: step 1Araq2016-10-311-5/+5
|
* fixes #4875Andreas Rumpf2016-10-201-18/+18
|
* fixes #4845Araq2016-10-081-1/+3
|
* fixes #4626Andreas Rumpf2016-09-131-42/+4
|