Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unhandled assert on bad generic instantiation #409

Closed
fowlmouth opened this issue Apr 30, 2013 · 0 comments
Closed

unhandled assert on bad generic instantiation #409

fowlmouth opened this issue Apr 30, 2013 · 0 comments
Labels

Comments

@fowlmouth
Copy link
Contributor

type
  TFoo = object
    x: int

proc bar[T](some: TFoo[T]) =
  echo "Hi"

var some1 = TFoo(x: 42)
bar some1
Error: unhandled exception: f.sons[0].kind == tyGenericBody  [EAssertionFailed]
@Araq Araq closed this as completed May 18, 2013
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Nov 7, 2022
…nim-lang#401 nim-lang#402 nim-lang#403 nim-lang#405 nim-lang#406 nim-lang#407 nim-lang#409 nim-lang#410 nim-lang#411 nim-lang#412 nim-lang#413

392: internal: remove sons from leaf nodes empty/none r=disruptek a=saem

## Summary
- pulls nkEmpty and nkNone into a branch without sons
- ensures more correctness by design

## Details
- various small fixes to get bootstrap working
- no tests failed, so that's a good{?} sign



395: stdlib: remove deprecated modules r=disruptek a=saem

deprecated stdlib module removal:
- removed events, LockFreeHash, parseopt2, and securehash
- associated clean-up in testament
- lib/deprecate/pure now only contains ospaths, an include for os
- remove events related tests

396: lang: remove deprecated c/C octal prefix r=disruptek a=saem

## Summary
- can no longer use 0c1
- this has long since been deprecated and not referenced in the manual


397: macros: remove deprecated TNimSym/TypeKinds r=disruptek a=saem

## Summary
- Removed macros.TNimSym and macros.TypeKinds

## Details
They are not used anywhere in the code base

399: dialect: remove old case object define r=disruptek a=saem

## Summary
- removed old case object define

NB reset magic is still present


401: stdlib: httpcore ==(string, HttpCode):bool removed r=disruptek a=saem

dropped proc from stdlib, it been deprecatd forever

402: stdlib: removed deprecated module oswalkdir r=disruptek a=saem

functionality has long since been moved to `std/os`

403: stdlib: times, remove deprecated procs r=disruptek a=saem

Removed deprecated constructors and setters for `times.DateTime`

Updated associated broken tests.

405: stdlib: remove deprecated os.existsFile/Dir r=disruptek a=saem

fileExists/dirExists are already present

406: pragma: remove the deprecated unroll pragma r=disruptek a=saem

supposedly it was ignored by the compiler, the fewer pragmas the better.

407: strutils: remove deprecated delete proc r=disruptek a=saem

## Summary

- remove deprecated `delete(var string, int, int)`
- removed associated tests
- updated usage of removed proc in rstgen

409: sequtils: remove deprecated delete proc r=disruptek a=saem

remove deprecated `delete[T](var T, int, int)` and its tests

410: algorithm: remove deprecated reversed proc r=disruptek a=saem

## Summary

- remove deprecated `reversed[T](var openArray[T], int, int): seq[T]`
- removed associated tests


411: math: renamed internal c_frexp2 to c_frexp r=disruptek a=saem

internal proc rename, no impact

412: options: remove deprecated UnpackError r=disruptek a=saem

## Summary

Removed UnpackError, was replaced with UnpackDefect a while back

## Details

Defects in general are a bad idea, but less code is good too

413: lang: remove for loop and case statement macros r=disruptek a=saem

There are better ways to do these sorts of things.

Co-authored-by: Saem Ghani <saemghani+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants