| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Name iterators something human readable
Remove intermediate async procs from stacktraces
Clean async traceback message from reraises message
* Remove unused import/variable
* Fix failing tests
Don't add {.stackTrace: off.} to anonymous procs (They already don't appear in stacktrace)
* Fix failing tests in pragma category
Now check that the nim is a routine type first so we don't run into any assertion defects
* Hide stack trace pragma in docs and update doc tests
User doesn't need to know if something won't appear so this more becomes verbose noise
If this is a bad idea we can always add a `when defined(nimdoc)` switch so we don't add {.stackTrace: off.} to the Future[T] returning proc for docs
|
|
|
|
|
|
|
| |
* Add test case
* Use .toStrLit() on param node first
This means that more complex types are fully rendered
|
|
|
| |
Use unique template name
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implicit return working for asyncdispatch proc
Closes #1discard """
output: '''x as ParameterizedType[T]
x as ParameterizedType[T]
x as ParameterizedType[T]
x as ParameterizedType
x as ParameterizedType
x as CustomTypeClass'''
"""
type ParameterizedType[T] = object
type CustomTypeClass = concept
true
# 3 competing procs
proc a[T](x: ParameterizedType[T]) =
echo "x as ParameterizedType[T]"
proc a(x: ParameterizedType) =
echo "x as ParameterizedType"
proc a(x: CustomTypeClass) =
echo "x as CustomTypeClass"
# the same procs in different order
proc b(x: ParameterizedType) =
echo "x as ParameterizedType"
proc b(x: CustomTypeClass) =
echo "x as CustomTypeClass"
proc b[T](x: ParameterizedType[T]) =
echo "x as ParameterizedType[T]"
# and yet another order
proc c(x: CustomTypeClass) =
echo "x as CustomTypeClass"
proc c(x: ParameterizedType) =
echo "x as ParameterizedType"
proc c[T](x: ParameterizedType[T]) =
echo "x as ParameterizedType[T]"
# remove the most specific one
proc d(x: ParameterizedType) =
echo "x as ParameterizedType"
proc d(x: CustomTypeClass) =
echo "x as CustomTypeClass"
# then shuffle the order again
proc e(x: CustomTypeClass) =
echo "x as CustomTypeClass"
proc e(x: ParameterizedType) =
echo "x as ParameterizedType"
# the least specific one is a match
proc f(x: CustomTypeClass) =
echo "x as CustomTypeClass"
a(ParameterizedType[int]())
b(ParameterizedType[int]())
c(ParameterizedType[int]())
d(ParameterizedType[int]())
e(ParameterizedType[int]())
f(ParameterizedType[int]())
186c68af1fbcc1185d815f52024c4647fe0b'>Disable unused warnings for await in async macro (#14517) | Danil Yarantsev | 2020-05-31 | 1 | -2/+2 |
|
|
|
|
| |
* Disable unused warnings for await in async macro
* Remove used for the error template
|
|
|
|
| |
* add discard warning in manual
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
|
|
|
|
|
| |
* Make await a template
* Generate await inside async/multisync
|
|
|
|
|
|
|
|
|
| |
* Fix https://github.com/nim-lang/Nim/issues/13889
* Add testcase
* Reduce test time
Co-authored-by: Elie Zedeck RANDRIAMIANDRIRAY <elie.zedeck@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* new minor feature: macros for proc types, to be documented
* Finished the implementation and added tests
* [skip ci] Describe the new custom pragmas in the manual and the changelog
Co-authored-by: Zahary Karadjov <zahary@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* fixes overloading resolution for passing owned(Future[string]) to Future[T]
* WIP: make --newruntime work with .async
* memtracker: make it compile again
* make Nimble compile again
|
| |
|
|
|
|
| |
A small change that brings no functional change beside a flatter tree.
|
|
|
| |
Fixes #9816
|
|
|
| |
Fixes #9201
|
| |
|
|
|
|
| |
Fixes #3075
|
|
|
|
|
|
|
|
|
|
| |
* Minor fixes for asyncjs
Mark internal procedures as used
Allow .async. for more node kinds
Make .async. work for nkStmtList
* Fix logic error in both the async macros
|
| |
|
|
|
|
|
| |
This also fixes a compilation error in modules, based only on the
new async module (i.e. not importing the full asyncdispatch)
|
|
|
|
|
|
| |
* fix deprecation warnings in asyncmacro and htmlgen
* removed todo
|
|\
| |
| | |
Fixes #6100.
|
| | |
|
| | |
|
|/ |
|
| |
|