├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml └── workflows │ ├── bisects.yml │ ├── ci_docs.yml │ ├── ci_packages.yml │ ├── ci_publish.yml │ └── stale.yml ├── .gitignore ├── azure-pipelines.yml ├── bin ├── empty.txt ├── nim-gdb └── nim-gdb.bat ├── build └── empty.txt ├── build_all.bat ├── build_all.sh ├── changelog.md ├── changelogs ├── changelog_0_18_1.md ├── changelog_0_19_0.md ├── changelog_0_20_0.md ├── changelog_0_20_2.md ├── changelog_1_0_0.md ├── changelog_1_0_2.md ├── changelog_1_2_0.md ├── changelog_1_4_0.md ├── changelog_1_6_0.md ├── changelog_2_0_0.md ├── changelog_2_0_0_details.md ├── changelog_2_2_0.md ├── changelog_X_XX_X.md └── readme.md ├── ci ├── action.nim ├── build_autogen.bat └── funs.sh ├── compiler ├── aliasanalysis.nim ├── aliases.nim ├── ast.nim ├── astalgo.nim ├── astmsgs.nim ├── astyaml.nim ├── bitsets.nim ├── btrees.nim ├── cbuilderbase.nim ├── cbuilderdecls.nim ├── cbuilderexprs.nim ├── cbuilderstmts.nim ├── ccgcalls.nim ├── ccgexprs.nim ├── ccgliterals.nim ├── ccgmerge_unused.nim ├── ccgreset.nim ├── ccgstmts.nim ├── ccgthreadvars.nim ├── ccgtrav.nim ├── ccgtypes.nim ├── ccgutils.nim ├── cgen.nim ├── cgendata.nim ├── cgmeth.nim ├── closureiters.nim ├── cmdlinehelper.nim ├── commands.nim ├── compiler.nimble ├── concepts.nim ├── condsyms.nim ├── debuginfo.nim ├── debugutils.nim ├── depends.nim ├── dfa.nim ├── docgen.nim ├── docgen2.nim ├── enumtostr.nim ├── errorhandling.nim ├── evalffi.nim ├── evaltempl.nim ├── expanddefaults.nim ├── extccomp.nim ├── filter_tmpl.nim ├── filters.nim ├── gorgeimpl.nim ├── guards.nim ├── hlo.nim ├── ic │ ├── bitabs.nim │ ├── cbackend.nim │ ├── dce.nim │ ├── design.rst │ ├── ic.nim │ ├── iclineinfos.nim │ ├── integrity.nim │ ├── navigator.nim │ ├── packed_ast.nim │ ├── replayer.nim │ └── rodfiles.nim ├── idents.nim ├── importer.nim ├── index.nim ├── injectdestructors.nim ├── installer.ini ├── int128.nim ├── isolation_check.nim ├── jsgen.nim ├── jstypes.nim ├── lambdalifting.nim ├── layeredtable.nim ├── layouter.nim ├── lexer.nim ├── liftdestructors.nim ├── liftlocals.nim ├── lineinfos.nim ├── linter.nim ├── llstream.nim ├── lookups.nim ├── lowerings.nim ├── macrocacheimpl.nim ├── magicsys.nim ├── main.nim ├── mangleutils.nim ├── modulegraphs.nim ├── modulepaths.nim ├── modules.nim ├── msgs.nim ├── nifgen.nim ├── nilcheck.nim ├── nim.cfg ├── nim.nim ├── nimblecmd.nim ├── nimconf.nim ├── nimeval.nim ├── nimlexbase.nim ├── nimpaths.nim ├── nimsets.nim ├── nodejs.nim ├── nodekinds.nim ├── nversion.nim ├── optimizer.nim ├── options.nim ├── packagehandling.nim ├── packages.nim ├── parampatterns.nim ├── parser.nim ├── passaux.nim ├── passes.nim ├── pathutils.nim ├── patterns.nim ├── pipelines.nim ├── pipelineutils.nim ├── platform.nim ├── plugins │ ├── active.nim │ ├── customast.nim │ ├── itersgen.nim │ ├── locals.nim │ └── plugins.nimble ├── pluginsupport.nim ├── pragmas.nim ├── prefixmatches.nim ├── procfind.nim ├── pushpoppragmas.nim ├── readme.md ├── renderer.nim ├── renderverbatim.nim ├── reorder.nim ├── rodutils.nim ├── ropes.nim ├── saturate.nim ├── scriptconfig.nim ├── sem.nim ├── semcall.nim ├── semdata.nim ├── semexprs.nim ├── semfields.nim ├── semfold.nim ├── semgnrc.nim ├── seminst.nim ├── semmacrosanity.nim ├── semmagic.nim ├── semobjconstr.nim ├── semparallel.nim ├── sempass2.nim ├── semstmts.nim ├── semstrictfuncs.nim ├── semtempl.nim ├── semtypes.nim ├── semtypinst.nim ├── sighashes.nim ├── sigmatch.nim ├── sinkparameter_inference.nim ├── sizealignoffsetimpl.nim ├── sourcemap.nim ├── spawn.nim ├── suggest.nim ├── suggestsymdb.nim ├── syntaxes.nim ├── tccgen.nim ├── transf.nim ├── trees.nim ├── treetab.nim ├── typeallowed.nim ├── types.nim ├── typesrenderer.nim ├── varpartitions.nim ├── vm.nim ├── vmconv.nim ├── vmdef.nim ├── vmdeps.nim ├── vmgen.nim ├── vmhooks.nim ├── vmmarshal.nim ├── vmops.nim ├── vmprofiler.nim ├── vtables.nim └── wordrecg.nim ├── config ├── build_config.txt ├── config.nims ├── nim.cfg ├── nimdoc.cfg ├── nimdoc.tex.cfg └── rename.rules.cfg ├── copying.txt ├── doc ├── advopt.txt ├── apis.md ├── astspec.txt ├── backends.md ├── basicopt.txt ├── contributing.md ├── destructors.md ├── docgen.md ├── docgen_sample.nim ├── docs.md ├── docstyle.md ├── drnim.md ├── effects.txt ├── estp.md ├── filelist.txt ├── filters.md ├── grammar.txt ├── hcr.md ├── idetools.md ├── intern.md ├── keywords.txt ├── koch.md ├── lib.md ├── manual.md ├── manual │ └── var_t_return.md ├── manual_experimental.md ├── manual_experimental_strictnotnil.md ├── markdown_rst.md ├── mm.md ├── mytest.cfg ├── nep1.md ├── nimc.md ├── nimdoc.cls ├── nimdoc.css ├── nimgrep.md ├── nimgrep_cmdline.txt ├── niminst.md ├── nims.md ├── nimsuggest.md ├── overview.md ├── packaging.md ├── pegdocs.txt ├── readme.txt ├── refc.md ├── regexprs.txt ├── rstcommon.rst ├── sets_fragment.txt ├── spawn.txt ├── subexes.txt ├── testament.md ├── tools.md ├── tut1.md ├── tut2.md └── tut3.md ├── drnim ├── drnim.nim ├── nim.cfg └── tests │ ├── config.nims │ ├── tbasic_array_index.nim │ ├── tensures.nim │ ├── tphi.nim │ └── tsetlen_invalidates.nim ├── icons ├── koch-amd64-windows-vcc.res ├── koch-i386-windows-vcc.res ├── koch.ico ├── koch.rc ├── koch.res ├── koch_icon.o ├── nim-amd64-windows-vcc.res ├── nim-i386-windows-vcc.res ├── nim.ico ├── nim.rc ├── nim.res └── nim_icon.o ├── koch.nim ├── koch.nim.cfg ├── lib ├── arch │ └── x86 │ │ ├── amd64.S │ │ └── i386.S ├── core │ ├── hotcodereloading.nim │ ├── locks.nim │ ├── macrocache.nim │ ├── macros.nim │ ├── rlocks.nim │ └── typeinfo.nim ├── cycle.h ├── deprecated │ └── pure │ │ ├── future.nim │ │ ├── mersenne.nim │ │ ├── ospaths.nim │ │ ├── oswalkdir.nim │ │ └── sums.nim ├── deps.txt ├── experimental │ └── diff.nim ├── genode │ ├── alloc.nim │ ├── constructibles.nim │ ├── entrypoints.nim │ ├── env.nim │ └── signals.nim ├── genode_cpp │ ├── signals.h │ ├── syslocks.h │ └── threads.h ├── impure │ ├── nre.nim │ ├── nre │ │ ├── .gitignore │ │ └── private │ │ │ └── util.nim │ ├── rdstdin.nim │ └── re.nim ├── js │ ├── asyncjs.nim │ ├── dom.nim │ ├── jsconsole.nim │ ├── jscore.nim │ ├── jsffi.nim │ └── jsre.nim ├── nimbase.h ├── nimhcr.nim ├── nimhcr.nim.cfg ├── nimrtl.nim ├── nimrtl.nim.cfg ├── packages │ └── docutils │ │ ├── dochelpers.nim │ │ ├── docutils.nimble.old │ │ ├── highlite.nim │ │ ├── rst.nim │ │ ├── rstast.nim │ │ ├── rstgen.nim │ │ └── rstidx.nim ├── posix │ ├── epoll.nim │ ├── inotify.nim │ ├── kqueue.nim │ ├── linux.nim │ ├── posix.nim │ ├── posix_freertos_consts.nim │ ├── posix_haiku.nim │ ├── posix_linux_amd64.nim │ ├── posix_linux_amd64_consts.nim │ ├── posix_macos_amd64.nim │ ├── posix_nintendoswitch.nim │ ├── posix_nintendoswitch_consts.nim │ ├── posix_openbsd_amd64.nim │ ├── posix_other.nim │ ├── posix_other_consts.nim │ ├── posix_utils.nim │ └── termios.nim ├── pure │ ├── algorithm.nim │ ├── async.nim │ ├── asyncdispatch.nim │ ├── asyncdispatch.nim.cfg │ ├── asyncfile.nim │ ├── asyncfutures.nim │ ├── asynchttpserver.nim │ ├── asyncmacro.nim │ ├── asyncnet.nim │ ├── asyncstreams.nim │ ├── base64.nim │ ├── bitops.nim │ ├── browsers.nim │ ├── cgi.nim │ ├── collections │ │ ├── chains.nim │ │ ├── critbits.nim │ │ ├── deques.nim │ │ ├── hashcommon.nim │ │ ├── heapqueue.nim │ │ ├── intsets.nim │ │ ├── lists.nim │ │ ├── rtarrays.nim │ │ ├── sequtils.nim │ │ ├── setimpl.nim │ │ ├── sets.nim │ │ ├── sharedlist.nim │ │ ├── sharedtables.nim │ │ ├── tableimpl.nim │ │ └── tables.nim │ ├── colors.nim │ ├── complex.nim │ ├── concurrency │ │ ├── atomics.nim │ │ ├── cpuinfo.nim │ │ ├── cpuload.nim │ │ ├── threadpool.nim │ │ └── threadpool.nim.cfg │ ├── cookies.nim │ ├── coro.nim │ ├── coro.nimcfg │ ├── cstrutils.nim │ ├── distros.nim │ ├── dynlib.nim │ ├── encodings.nim │ ├── endians.nim │ ├── fenv.nim │ ├── hashes.nim │ ├── htmlgen.nim │ ├── htmlparser.nim │ ├── httpclient.nim │ ├── httpcore.nim │ ├── includes │ │ └── unicode_ranges.nim │ ├── ioselects │ │ ├── ioselectors_epoll.nim │ │ ├── ioselectors_kqueue.nim │ │ ├── ioselectors_poll.nim │ │ └── ioselectors_select.nim │ ├── json.nim │ ├── lenientops.nim │ ├── lexbase.nim │ ├── logging.nim │ ├── marshal.nim │ ├── math.nim │ ├── md5.nim │ ├── memfiles.nim │ ├── mimetypes.nim │ ├── nativesockets.nim │ ├── net.nim │ ├── nimprof.nim │ ├── nimprof.nim.cfg │ ├── oids.nim │ ├── options.nim │ ├── os.nim │ ├── osproc.nim │ ├── parsecfg.nim │ ├── parsecsv.nim │ ├── parsejson.nim │ ├── parseopt.nim │ ├── parsesql.nim │ ├── parseutils.nim │ ├── parsexml.nim │ ├── pathnorm.nim │ ├── pegs.nim │ ├── prelude.nim │ ├── random.nim │ ├── rationals.nim │ ├── reservedmem.nim │ ├── ropes.nim │ ├── segfaults.nim │ ├── selectors.nim │ ├── ssl_certs.nim │ ├── ssl_config.nim │ ├── stats.nim │ ├── streams.nim │ ├── streamwrapper.nim │ ├── strformat.nim │ ├── strmisc.nim │ ├── strscans.nim │ ├── strtabs.nim │ ├── strutils.nim │ ├── sugar.nim │ ├── terminal.nim │ ├── times.nim │ ├── typetraits.nim │ ├── unicode.nim │ ├── unidecode │ │ ├── gen.py │ │ ├── unidecode.dat │ │ └── unidecode.nim │ ├── unittest.nim │ ├── uri.nim │ ├── volatile.nim │ ├── xmlparser.nim │ └── xmltree.nim ├── std │ ├── appdirs.nim │ ├── assertions.nim │ ├── cmdline.nim │ ├── compilesettings.nim │ ├── decls.nim │ ├── dirs.nim │ ├── editdistance.nim │ ├── effecttraits.nim │ ├── enumerate.nim │ ├── enumutils.nim │ ├── envvars.nim │ ├── exitprocs.nim │ ├── files.nim │ ├── formatfloat.nim │ ├── genasts.nim │ ├── importutils.nim │ ├── isolation.nim │ ├── jsbigints.nim │ ├── jsfetch.nim │ ├── jsformdata.nim │ ├── jsheaders.nim │ ├── jsonutils.nim │ ├── logic.nim │ ├── monotimes.nim │ ├── objectdollar.nim │ ├── oserrors.nim │ ├── outparams.nim │ ├── packedsets.nim │ ├── paths.nim │ ├── private │ │ ├── asciitables.nim │ │ ├── bitops_utils.nim │ │ ├── decode_helpers.nim │ │ ├── digitsutils.nim │ │ ├── dragonbox.nim │ │ ├── gitutils.nim │ │ ├── globs.nim │ │ ├── jsutils.nim │ │ ├── miscdollars.nim │ │ ├── ntpath.nim │ │ ├── osappdirs.nim │ │ ├── oscommon.nim │ │ ├── osdirs.nim │ │ ├── osfiles.nim │ │ ├── ospaths2.nim │ │ ├── osseps.nim │ │ ├── ossymlinks.nim │ │ ├── schubfach.nim │ │ ├── since.nim │ │ ├── strimpl.nim │ │ ├── syslocks.nim │ │ ├── threadtypes.nim │ │ ├── underscored_calls.nim │ │ ├── win_getsysteminfo.nim │ │ └── win_setenv.nim │ ├── setutils.nim │ ├── sha1.nim │ ├── socketstreams.nim │ ├── stackframes.nim │ ├── staticos.nim │ ├── strbasics.nim │ ├── symlinks.nim │ ├── syncio.nim │ ├── sysatomics.nim │ ├── sysrand.nim │ ├── tasks.nim │ ├── tempfiles.nim │ ├── time_t.nim │ ├── typedthreads.nim │ ├── varints.nim │ ├── vmutils.nim │ ├── widestrs.nim │ ├── with.nim │ ├── wordwrap.nim │ └── wrapnils.nim ├── stdlib.nimble ├── system.nim ├── system │ ├── alloc.nim │ ├── ansi_c.nim │ ├── arc.nim │ ├── arithmetics.nim │ ├── assign.nim │ ├── avltree.nim │ ├── basic_types.nim │ ├── bitmasks.nim │ ├── cellseqs_v1.nim │ ├── cellseqs_v2.nim │ ├── cellsets.nim │ ├── cgprocs.nim │ ├── channels_builtin.nim │ ├── chcks.nim │ ├── comparisons.nim │ ├── compilation.nim │ ├── coro_detection.nim │ ├── countbits_impl.nim │ ├── ctypes.nim │ ├── cyclebreaker.nim │ ├── deepcopy.nim │ ├── dollars.nim │ ├── dyncalls.nim │ ├── embedded.nim │ ├── exceptions.nim │ ├── excpt.nim │ ├── fatal.nim │ ├── formatfloat.nim │ ├── gc.nim │ ├── gc_common.nim │ ├── gc_hooks.nim │ ├── gc_interface.nim │ ├── gc_ms.nim │ ├── gc_regions.nim │ ├── hti.nim │ ├── inclrtl.nim │ ├── indexerrors.nim │ ├── indices.nim │ ├── integerops.nim │ ├── iterators.nim │ ├── iterators_1.nim │ ├── jssys.nim │ ├── memalloc.nim │ ├── memory.nim │ ├── memtracker.nim │ ├── mm │ │ ├── boehm.nim │ │ ├── go.nim │ │ ├── malloc.nim │ │ └── none.nim │ ├── mmdisp.nim │ ├── nimscript.nim │ ├── orc.nim │ ├── osalloc.nim │ ├── platforms.nim │ ├── profiler.nim │ ├── rawquits.nim │ ├── repr.nim │ ├── repr_impl.nim │ ├── repr_v2.nim │ ├── reprjs.nim │ ├── seqs_v2.nim │ ├── seqs_v2_reimpl.nim │ ├── setops.nim │ ├── sets.nim │ ├── stacktraces.nim │ ├── strmantle.nim │ ├── strs_v2.nim │ ├── sysstr.nim │ ├── threadids.nim │ ├── threadimpl.nim │ ├── threadlocalstorage.nim │ └── timers.nim ├── system_overview.rst ├── windows │ ├── registry.nim │ └── winlean.nim └── wrappers │ ├── linenoise │ ├── LICENSE.txt │ ├── README.markdown │ ├── linenoise.c │ ├── linenoise.h │ └── linenoise.nim │ ├── openssl.nim │ ├── pcre.nim │ └── tinyc.nim ├── nim.nimble ├── nimdoc ├── extlinks │ ├── project │ │ ├── doc │ │ │ └── manual.md │ │ ├── expected │ │ │ ├── _._ │ │ │ │ ├── util.html │ │ │ │ └── util.idx │ │ │ ├── doc │ │ │ │ ├── manual.html │ │ │ │ └── manual.idx │ │ │ ├── main.html │ │ │ ├── main.idx │ │ │ ├── sub │ │ │ │ ├── submodule.html │ │ │ │ └── submodule.idx │ │ │ └── theindex.html │ │ ├── main.nim │ │ └── sub │ │ │ └── submodule.nim │ └── util.nim ├── rst2html │ ├── expected │ │ └── rst_examples.html │ └── source │ │ └── rst_examples.rst ├── rsttester.nim ├── test_doctype │ ├── expected │ │ └── test_doctype.html │ └── test_doctype.nim ├── test_out_index_dot_html │ ├── expected │ │ ├── foo.idx │ │ ├── index.html │ │ └── theindex.html │ └── foo.nim ├── tester.nim └── testproject │ ├── expected │ ├── nimdoc.out.css │ ├── subdir │ │ └── subdir_b │ │ │ ├── utils.html │ │ │ └── utils.idx │ ├── testproject.html │ ├── testproject.idx │ └── theindex.html │ ├── subdir │ └── subdir_b │ │ ├── utils.nim │ │ ├── utils_helpers.nim │ │ └── utils_overview.rst │ ├── testproject.nim │ └── testproject.nimble ├── nimpretty ├── nimpretty.nim ├── nimpretty.nim.cfg ├── tester.nim └── tests │ ├── exhaustive.nim │ ├── expected │ ├── exhaustive.nim │ ├── simple.nim │ ├── simple2.nim │ ├── simple3.nim │ ├── simple4.nim │ ├── tevil_spaces.nim │ └── wrong_ind.nim │ ├── simple.nim │ ├── simple2.nim │ ├── simple3.nim │ ├── simple4.nim │ ├── tevil_spaces.nim │ └── wrong_ind.nim ├── nimsuggest ├── config.nims ├── crashtester.nim ├── nimsuggest.nim ├── nimsuggest.nim.cfg ├── nimsuggest.nimble ├── procmonitor.nim ├── sexp.nim ├── tester.nim └── tests │ ├── fixtures │ ├── mclass_macro.nim │ ├── mdep_v1.nim │ ├── mdep_v2.nim │ ├── mfakeassert.nim │ ├── minclude_import.nim │ ├── minclude_include.nim │ ├── minclude_types.nim │ └── mstrutils.nim │ ├── module_20265.nim │ ├── t20265_1.nim │ ├── t20265_2.nim │ ├── t20440.nim │ ├── t20440.nims │ ├── t21185.nim │ ├── t21923.nim │ ├── t22448.nim │ ├── taccent_highlight.nim │ ├── tarrowcrash.nim │ ├── tcallstrlit_highlight.nim │ ├── tcase.nim │ ├── tchk1.nim │ ├── tchk2.nim │ ├── tchk_compiles.nim │ ├── tcon1.nim │ ├── tcon_variable.nim │ ├── tconcept1.nim │ ├── tconcept2.nim │ ├── tcursor_at_end.nim │ ├── tdef1.nim │ ├── tdef2.nim │ ├── tdef_forward.nim │ ├── tdef_let.nim │ ├── tdot1.nim │ ├── tdot2.nim │ ├── tdot3.nim │ ├── tdot4.nim │ ├── tenum_field.nim │ ├── tfatal1.nim │ ├── tgeneric_highlight.nim │ ├── tgenerics.nim │ ├── tic.nim │ ├── timport1.nim │ ├── timport2.nim │ ├── timport3.nim │ ├── timport_highlight.nim │ ├── tinclude.nim │ ├── tmacro_highlight.nim │ ├── tno_deref.nim │ ├── tobj_highlight.nim │ ├── top_highlight.nim │ ├── tqualified_highlight.nim │ ├── tsetter_highlight.nim │ ├── tsi_highlight.nim │ ├── tsug_accquote.nim │ ├── tsug_enum.nim │ ├── tsug_pragmas.nim │ ├── tsug_recursive.nim │ ├── tsug_regression.nim │ ├── tsug_template.nim │ ├── tsug_typedecl.nim │ ├── ttempl_inst.nim │ ├── ttemplate_highlight.nim │ ├── ttype_decl.nim │ ├── ttype_highlight.nim │ ├── tuse.nim │ ├── tuse_enum.nim │ ├── tuse_structure.nim │ ├── tv3.nim │ ├── tv3_con.nim │ ├── tv3_definition.nim │ ├── tv3_forward_definition.nim │ ├── tv3_generics.nim │ ├── tv3_globalSymbols.nim │ ├── tv3_import.nim │ ├── tv3_outline.nim │ ├── tv3_typeDefinition.nim │ ├── twithin_macro.nim │ └── twithin_macro_prefix.nim ├── readme.md ├── security.md ├── testament ├── azure.nim ├── backend.nim ├── caasdriver.nim ├── categories.nim ├── htmlgen.nim ├── important_packages.nim ├── lib │ ├── readme.md │ └── stdtest │ │ ├── netutils.nim │ │ ├── specialpaths.nim │ │ ├── testutils.nim │ │ └── unittest_light.nim ├── specs.nim ├── testament.nim ├── testament.nim.cfg ├── testamenthtml.nimf └── tests │ └── shouldfail │ ├── tccodecheck.nim │ ├── tcolumn.nim │ ├── terrormsg.nim │ ├── texitcode1.nim │ ├── tfile.nim │ ├── tline.nim │ ├── tmaxcodesize.nim │ ├── tnimout.nim │ ├── tnimoutfull.nim │ ├── tnotenoughretries.nim │ ├── toutput.nim │ ├── toutputsub.nim │ ├── treject.nim │ ├── tsortoutput.nim │ ├── ttimeout.nim │ └── tvalgrind.nim ├── tests ├── alias │ ├── t19349.nim │ └── talias.nim ├── align │ ├── globalalignas.nim │ ├── talign.nim │ └── tillegalalign.nim ├── alloc │ ├── tmembug.nim │ └── tmembug2.nim ├── arc │ ├── amodule.nim │ ├── bmodule.nim │ ├── cmodule.nim │ ├── dmodule.nim │ ├── m24764.nim │ ├── nim.cfg │ ├── t14383.nim │ ├── t14472.nim │ ├── t14864.nim │ ├── t15909.nim │ ├── t16033.nim │ ├── t16458.nim │ ├── t16558.nim │ ├── t17025.nim │ ├── t17173.nim │ ├── t17812.nim │ ├── t18645.nim │ ├── t18971.nim │ ├── t18977.nim │ ├── t19231.nim │ ├── t19364.nim │ ├── t19401.nim │ ├── t19402.nim │ ├── t19435.nim │ ├── t19457.nim │ ├── t19862.nim │ ├── t20456.nim │ ├── t20588.nim │ ├── t21184.nim │ ├── t22218.nim │ ├── t22237.nim │ ├── t22478.nim │ ├── t22787.nim │ ├── t23247.nim │ ├── t24402.nim │ ├── t24764.nim │ ├── t24806.nim │ ├── t9650.nim │ ├── taliased_reassign.nim │ ├── tamemfiles.nim │ ├── tamodule.nim │ ├── tarc_macro.nim │ ├── tarc_orc.nim │ ├── tarcmisc.nim │ ├── tasyncawait.nim │ ├── tasyncleak.nim │ ├── tasyncleak2.nim │ ├── tasyncleak3.nim │ ├── tasyncleak4.nim │ ├── tasyncorc.nim │ ├── tcaseobj.nim │ ├── tcaseobjcopy.nim │ ├── tclosureiter.nim │ ├── tcomputedgoto.nim │ ├── tcomputedgotocopy.nim │ ├── tconst_to_sink.nim │ ├── tcontrolflow.nim │ ├── tcursor_field_obj_constr.nim │ ├── tcursor_on_localvar.nim │ ├── tcursorloop.nim │ ├── tcustomtrace.nim │ ├── tdeepcopy.nim │ ├── tdestroy_in_loopcond.nim │ ├── tdup.nim │ ├── testfile.txt │ ├── texceptions.nim │ ├── texplicit_sink.nim │ ├── tfuncobj.nim │ ├── thamming_orc.nim │ ├── thamming_thinout.nim │ ├── thard_alignment.nim │ ├── thavlak_orc_stress.nim │ ├── theavy_recursion.nim │ ├── timportedobj.nim │ ├── tinvalidenumtostr.nim │ ├── titeration_doesnt_copy.nim │ ├── tkeys_lent.nim │ ├── tmalloc.nim │ ├── tmarshal.nim │ ├── tmove_regression.nim │ ├── tmovebug.nim │ ├── tmovebugcopy.nim │ ├── tnewseq_legacy.nim │ ├── tnodestroyexplicithook.nim │ ├── top_no_cursor2.nim │ ├── topenarray.nim │ ├── topt_cursor.nim │ ├── topt_cursor2.nim │ ├── topt_no_cursor.nim │ ├── topt_refcursors.nim │ ├── topt_wasmoved_destroy_pairs.nim │ ├── torc_basic_test.nim │ ├── torc_selfcycles.nim │ ├── torcbench.nim │ ├── torcmisc.nim │ ├── tpartialtupleunpacking1.nim │ ├── tpartialtupleunpacking2.nim │ ├── tphantomgeneric1.nim │ ├── tphantomgeneric2.nim │ ├── tref_cast_error.nim │ ├── trepr.nim │ ├── trtree.nim │ ├── tshared_ptr_crash.nim │ ├── tstrformat.nim │ ├── tstringliteral.nim │ ├── tthread.nim │ ├── tunref_cycle.nim │ ├── tvalgrind.nim │ ├── tweave.nim │ ├── tweavecopy.nim │ └── twrong_sinkinference.nim ├── array │ ├── t15117.nim │ ├── t20248.nim │ ├── t9932.nim │ ├── tarray.nim │ ├── tarraycons.nim │ ├── tarraycons_ptr_generic2.nim │ ├── tarrayplus.nim │ ├── tgenericindex.nim │ ├── tidx_lit_err1.nim │ ├── tidx_lit_err2.nim │ ├── tidx_lit_err3.nim │ ├── tindexconv.nim │ ├── tinvalidarrayaccess.nim │ ├── tinvalidarrayaccess2.nim │ ├── tlargeindex.nim │ └── troofregression2.txt ├── assert │ ├── config.nims │ ├── panicoverride.nim │ ├── t21195.nim │ ├── tassert.nim │ ├── tassert2.nim │ ├── tassert_c.nim │ ├── tunittests.nim │ └── tuserassert.nim ├── assign │ ├── moverload_asgn2.nim │ ├── tassign.nim │ ├── tobject_assign.nim │ ├── toverload_asgn2.nim │ └── tvariantasgn.nim ├── ast_pattern_matching.nim ├── astoverload │ └── tastoverload1.nim ├── astspec │ └── tastspec.nim ├── async │ ├── hello.txt │ ├── nim.cfg │ ├── t11558.nim │ ├── t12221.nim │ ├── t13889.nim │ ├── t14820.nim │ ├── t15148.nim │ ├── t15804.nim │ ├── t17045.nim │ ├── t20111.nim │ ├── t21447.nim │ ├── t21893.nim │ ├── t22210.nim │ ├── t22210_2.nim │ ├── t23212.nim │ ├── t24895.nim │ ├── t3075.nim │ ├── t6846.nim │ ├── t7192.nim │ ├── t7758.nim │ ├── t8982.nim │ ├── t9201.nim │ ├── tacceptcloserace.nim │ ├── tasyncRecvLine.nim │ ├── tasync_forward.nim │ ├── tasync_gcsafe.nim │ ├── tasync_gcunsafe.nim │ ├── tasync_in_seq_constr.nim │ ├── tasync_misc.nim │ ├── tasync_noasync.nim │ ├── tasync_nofuture.nim │ ├── tasync_traceback.nim │ ├── tasync_traceback2.nim │ ├── tasyncall.nim │ ├── tasyncawait.nim │ ├── tasyncclosestall.nim │ ├── tasyncconnect.nim │ ├── tasyncdial.nim │ ├── tasyncdiscard.nim │ ├── tasynceagain.nim │ ├── tasyncexceptions.nim │ ├── tasyncfile.nim │ ├── tasyncfilewrite.nim │ ├── tasyncintemplate.nim │ ├── tasyncnetudp.nim │ ├── tasyncrecursion.nim │ ├── tasyncsend4757.nim │ ├── tasyncssl.nim │ ├── tasynctry.nim │ ├── tawaitsemantics.nim │ ├── tbreak_must_exec_finally.nim │ ├── tcallbacks.nim │ ├── tdiscardableproc.nim │ ├── testmanyasyncevents.nim │ ├── tfuturestream.nim │ ├── tfuturevar.nim │ ├── tgeneric_async.nim │ ├── tgenericasync.nim │ ├── tioselectors.nim │ ├── tioselectors.nim.cfg │ ├── tjsandnativeasync.nim │ ├── tlambda.nim │ ├── tmultisync.nim │ ├── tnestedpfuturetypeparam.nim │ ├── tnewasyncudp.nim │ ├── tnimcall_to_closure.nim │ ├── tpendingcheck.nim │ ├── tpolltimeouts.nim │ ├── treturn_await.nim │ ├── ttemplateinasync.nim │ ├── tupcoming_async.nim │ └── twinasyncrw.nim ├── avr │ ├── nim.cfg │ ├── panicoverride.nim │ └── thello.nim ├── benchmarks │ ├── readme.md │ └── ttls.nim ├── c │ ├── tcompile.c │ ├── tcompile.nim │ ├── temit.nim │ ├── timportedsize.nim │ └── treservedcidentsasfields.nim ├── casestmt │ ├── t18964.nim │ ├── t7699.nim │ ├── tcase_issues.nim │ ├── tcaseexpr1.nim │ ├── tcaseoverlaprange.nim │ ├── tcaseoverlaprange2.nim │ ├── tcasestmt.nim │ ├── tcomputedgoto.nim │ ├── tcstring.nim │ ├── tincompletecaseobject.nim │ ├── tincompletecaseobject2.nim │ ├── tlinearscanend.nim │ └── trangeexhaustiveness.nim ├── cast │ └── tcast.nim ├── ccgbugs │ ├── m1 │ │ └── defs.nim │ ├── m19445.c │ ├── m2 │ │ └── defs.nim │ ├── mstatic_assert.nim │ ├── mymodule.nim │ ├── pkg8616 │ │ ├── rtarray.nim │ │ └── scheduler.nim │ ├── t10128.nim │ ├── t10964.nim │ ├── t13062.nim │ ├── t13902.nim │ ├── t15428.nim │ ├── t16027.nim │ ├── t16374.nim │ ├── t19445.nim │ ├── t19585.nim │ ├── t20139.nim │ ├── t20141.nim │ ├── t20787.nim │ ├── t21116.nim │ ├── t21972.nim │ ├── t21995.nim │ ├── t22462.nim │ ├── t23796.nim │ ├── t2procs.nim │ ├── t5296.nim │ ├── t5345.nim │ ├── t6279.nim │ ├── t6756.nim │ ├── t7079.nim │ ├── t8616.nim │ ├── t8781.nim │ ├── t8967.nim │ ├── t9098.nim │ ├── t9286.nim │ ├── t9578.nim │ ├── t9655.nim │ ├── taddhigh.nim │ ├── taddrconvs.nim │ ├── targ_lefttoright.nim │ ├── tarray_equality.nim │ ├── tassign_nil_strings.nim │ ├── tborrowmagic.nim │ ├── tbug1081.nim │ ├── tbug21505.nim │ ├── tcapture_static.nim │ ├── tccgen1.nim │ ├── tccgissues.nim │ ├── tcgbug.nim │ ├── tclosureeq.nim │ ├── tcodegenbug1.nim │ ├── tcodegenbug_bool.nim │ ├── tcodegendecllambda.nim │ ├── tcompile_time_var_at_runtime.nim │ ├── tctypes.nim │ ├── tcvarargs.nim │ ├── tdeepcopy_addr_rval.nim │ ├── tderefblock.nim │ ├── tescaping_temps.nim │ ├── tforward_decl_only.nim │ ├── tgeneric_closure.nim │ ├── tgeneric_smallobj_asgn_opt.nim │ ├── thtiobj.nim │ ├── timportc_distinct.nim │ ├── tissues.nim │ ├── tlvalueconv.nim │ ├── tmangle.nim │ ├── tmangle_field.nim │ ├── tmarkerproc_regression.nim │ ├── tmissing_ccgtrav_unique_type.nim │ ├── tmissingbracket.nim │ ├── tmissingderef.nim │ ├── tmissingderef2.nim │ ├── tmissinginit.nim │ ├── tmissingvolatile.nim │ ├── tnil_type.nim │ ├── tnoalias.nim │ ├── tnocodegen_for_compiletime.nim │ ├── tobjconstr_bad_aliasing.nim │ ├── tobjconstr_outoforder.nim │ ├── tobjconstr_regression.nim │ ├── topenarraycast.nim │ ├── tpartialcs.nim │ ├── tprogmem.nim │ ├── trecursive_table.nim │ ├── trefseqsort.nim │ ├── tresult_of_array.nim │ ├── tret_arg_init.nim │ ├── tsamename3.nim │ ├── tsequence_outoforder.nim │ ├── tsighash_typename_regression.nim │ ├── tstringslice.nim │ ├── tunioninit.nim │ ├── tunsafeaddr.nim │ ├── tuple_canon.nim │ ├── tuplecast.nim │ ├── tvararrayiter.nim │ ├── tweakopenarray.nim │ ├── twrong_discriminant_check.nim │ ├── twrong_method.nim │ ├── twrong_rc_for_refarray.nim │ ├── twrong_string_asgn.nim │ ├── twrong_tupleconv.nim │ ├── twrongrefcounting.nim │ ├── xarray9578.nim │ ├── xoa9578.nim │ ├── xseq9578.nim │ ├── xtuple9578.nim │ └── xua9578.nim ├── ccgbugs2 │ ├── tcodegen.nim │ └── tinefficient_const_table.nim ├── closure │ ├── t11042.nim │ ├── t15594.nim │ ├── t1641.nim │ ├── t19095.nim │ ├── t20152.nim │ ├── t8550.nim │ ├── t9334.nim │ ├── tboehmdeepcopy.nim │ ├── tcapture.nim │ ├── tclosure.nim │ ├── tclosure_issues.nim │ ├── texplicit_dummy_closure.nim │ ├── tinfer_closure_for_nestedproc.nim │ ├── tinvalidclosure.nim │ ├── tinvalidclosure2.nim │ ├── tinvalidclosure3.nim │ ├── tinvalidclosure4.nim │ ├── tinvalidclosure5.nim │ ├── tmacrobust1512.nim │ ├── tnested.nim │ ├── tstmtlist.nim │ ├── ttimeinfo.nim │ └── uclosures.nim ├── codegen │ └── titaniummangle.nim ├── collections │ ├── tactiontable.nim │ ├── tcollections.nim │ ├── tcollections_to_string.nim │ ├── thashsets.nim │ ├── tseq.nim │ ├── ttables.nim │ └── ttablesthreads.nim ├── compileoption │ ├── texperimental.nim │ └── texperimental.nims ├── compiler │ ├── nim.cfg │ ├── samplelib.nim │ ├── t12684.nim │ ├── tasciitables.nim │ ├── tasm.nim │ ├── tasm2.nim │ ├── tbtrees.nim │ ├── tcmdlineclib.nim │ ├── tcmdlineclib.nims │ ├── tcmdlinecpuamd64.nim │ ├── tcmdlinecpuamd64.nim.cfg │ ├── tcmdlineoswin.nim │ ├── tcmdlineoswin.nim.cfg │ ├── tcppCompileToNamespace.nim │ ├── tdebugutils.nim │ ├── tgrammar.nim │ ├── tint128.nim │ ├── tnimblecmd.nim │ ├── tpathutils.nim │ ├── tprefixmatches.nim │ └── tunittest_light.nim ├── compilerapi │ ├── exposed.nim │ ├── invalid.nim │ ├── myscript.nim │ └── tcompilerapi.nim ├── compiles │ ├── mstaticlib.nim │ ├── t8630.nim │ ├── tcompiles.nim │ ├── tevilcompiles.nim │ ├── trecursive_generic_in_compiles.nim │ └── tstaticlib.nim ├── concepts │ ├── conceptsv2_helper.nim │ ├── conceptv2negative │ │ ├── tmarrget.nim │ │ └── tmissingbind.nim │ ├── libs │ │ ├── trie.nim │ │ └── trie_database.nim │ ├── matrix.nim │ ├── matrixalgo.nim │ ├── mvarconcept.nim │ ├── t18409.nim │ ├── t19730.nim │ ├── t20237.nim │ ├── t3330.nim │ ├── t4982.nim │ ├── t5888lib │ │ ├── ca.nim │ │ └── opt.nim │ ├── t8012.nim │ ├── t8558.nim │ ├── t976.nim │ ├── tcomparable.nim │ ├── tconcept_old.nim │ ├── tconceptinclosure.nim │ ├── tconcepts.nim │ ├── tconcepts_issues.nim │ ├── tconcepts_overload_precedence.nim │ ├── tconceptsv2.nim │ ├── templatesinconcepts.nim │ ├── texplain.nim │ ├── tintypesection.nim │ ├── titerable.nim │ ├── tmanual.nim │ ├── tmapconcept.nim │ ├── tmatrixconcept.nim │ ├── tmatrixlib.nim │ ├── tmodifiersinplace.nim │ ├── tmonoid.nim │ ├── trandomvars.nim │ ├── trandomvars2.nim │ ├── treversable.nim │ ├── tseqofconcept.nim │ ├── tspec.nim │ ├── tstackconcept.nim │ ├── tswizzle.nim │ ├── ttrieconcept.nim │ ├── tuninstantiated.nim │ ├── tusertypeclasses.nim │ ├── tusertypeclasses2.nim │ ├── tvarconcept.nim │ ├── tvectorspace.nim │ └── twrapconcept.nim ├── config.nims ├── constructors │ ├── a.nim │ ├── b.nim │ ├── t18990.nim │ ├── t5965_1.nim │ ├── t5965_2.nim │ ├── tconstr1.nim │ ├── tconstr2.nim │ └── tinvalid_construction.nim ├── consts │ ├── taddressable_consts.nim │ └── taddressable_consts2.nim ├── controlflow │ ├── tblock1.nim │ ├── tcontrolflow.nim │ ├── tstatret.nim │ ├── tunamedbreak.nim │ ├── tunreachable.nim │ └── tunreachable2.nim ├── converter │ ├── m18986.nim │ ├── mdontleak.nim │ ├── t18986.nim │ ├── t21531.nim │ ├── t7097.nim │ ├── t7098.nim │ ├── t9165.nim │ ├── tconvcolors.nim │ ├── tconvert.nim │ ├── tconverter.nim │ ├── tconverter_unique_ptr.nim │ ├── tconverter_with_constraint.nim │ ├── tconverter_with_varargs.nim │ ├── tdeprecatedconverter.nim │ ├── tdontleak.nim │ ├── texplicit_conversion.nim │ ├── tgenericconverter.nim │ ├── tgenericconverter2.nim │ ├── tgenericconverterbindings1.nim │ ├── tgenericconverterbindings2.nim │ ├── tgenericconverterbindings3.nim │ ├── tgenericconverterbindings4.nim │ ├── tgenericconverterbindings5.nim │ ├── tgenericconverterbindings6.nim │ ├── tor_in_converter.nim │ ├── ttypeconverter1.nim │ └── tvargenericconverter.nim ├── coroutines │ ├── texceptions.nim │ ├── texceptions.nim.cfg │ ├── tgc.nim │ ├── tgc.nim.cfg │ ├── titerators.nim │ ├── titerators.nim.cfg │ ├── twait.nim │ └── twait.nim.cfg ├── cpp │ ├── 23962.h │ ├── amodule.nim │ ├── enum.hpp │ ├── fam.h │ ├── foo.c │ ├── mexportc.nim │ ├── t10148.nim │ ├── t10241.nim │ ├── t12946.nim │ ├── t22679.nim │ ├── t22680.nim │ ├── t22712.nim │ ├── t23306.nim │ ├── t23434.nim │ ├── t23657.nim │ ├── t23962.nim │ ├── t4834.nim │ ├── t6986.nim │ ├── t8241.nim │ ├── t9013.nim │ ├── tasync_cpp.nim │ ├── tcasts.nim │ ├── tcodegendecl.nim │ ├── tconstructor.nim │ ├── tcovariancerules.nim │ ├── tcppraise.nim │ ├── tdont_init_instantiation.nim │ ├── tembarrassing_generic_bug.nim │ ├── temitlist.nim │ ├── tempty_generic_obj.nim │ ├── tenum_set.nim │ ├── tevalorder.nim │ ├── texportc.nim │ ├── tfam.nim │ ├── tgen_prototype_for_importc.nim │ ├── tget_subsystem.nim │ ├── timportedtypecrash.nim │ ├── tinitializers.nim │ ├── tmanual_exception.nim │ ├── tmember.nim │ ├── tmember_forward_declaration.nim │ ├── tnativesockets.nim │ ├── tnoinitfield.nim │ ├── torc.nim │ ├── tpassbypragmas.nim │ ├── treturn_array.nim │ ├── tretvar.nim │ ├── tsigbreak.nim │ ├── tstaticvar_via_typedesc.nim │ ├── ttemplatetype.nim │ ├── tterminate_handler.nim │ ├── tthread_createthread.nim │ ├── ttypeinfo1.nim │ ├── ttypeinfo2.nim │ ├── tvector_iterator.nim │ ├── tvectorseq.nim │ ├── tvirtual.nim │ └── virtualptr.nim ├── defer │ └── t22309.nim ├── destructor │ ├── const_smart_ptr.nim │ ├── helper.nim │ ├── nim.cfg │ ├── objFile.nim │ ├── smart_ptr.nim │ ├── t12037.nim │ ├── t16607.nim │ ├── t17198.nim │ ├── t23748.nim │ ├── t23837.nim │ ├── t5342.nim │ ├── t7346.nim │ ├── t9440.nim │ ├── tarc.nim │ ├── tarc2.nim │ ├── tarc3.nim │ ├── tarctypesections.nim │ ├── tarray_indexing.nim │ ├── tasync_prototype.nim │ ├── tasync_prototype_cyclic.nim │ ├── tatomicptrs.nim │ ├── tbintree2.nim │ ├── tcaseobj_transitions.nim │ ├── tcast.nim │ ├── tcomplexobjconstr.nim │ ├── tconst_smart_ptr.nim │ ├── tconsume_twice.nim │ ├── tcustomseqs.nim │ ├── tcustomstrings.nim │ ├── tcycle1.nim │ ├── tcycle2.nim │ ├── tcycle3.nim │ ├── tdangingref_simple.nim │ ├── tdestructor.nim │ ├── tdestructor3.nim │ ├── tdestructor_too_late.nim │ ├── tdistinctseq.nim │ ├── tdont_return_unowned_from_owned.nim │ ├── terror_module.nim │ ├── texceptions.nim │ ├── texplicit_move.nim │ ├── tfinalizer.nim │ ├── tgcdestructors.nim │ ├── tgcleak4.nim │ ├── tglobaldestructor.nim │ ├── tgotoexc_leak.nim │ ├── tgotoexceptions.nim │ ├── tgotoexceptions2.nim │ ├── tgotoexceptions3.nim │ ├── tgotoexceptions4.nim │ ├── tgotoexceptions5.nim │ ├── tgotoexceptions6.nim │ ├── tgotoexceptions7.nim │ ├── tgotoexceptions8.nim │ ├── tinvalid_rebind.nim │ ├── tinvalid_rebind_nonempty.nim │ ├── tmatrix.nim │ ├── tmisc_destructors.nim │ ├── tmove.nim │ ├── tmove_objconstr.nim │ ├── tnewruntime_misc.nim │ ├── tnewruntime_strutils.nim │ ├── tnonvardestructor.nim │ ├── tobjfield_analysis.nim │ ├── topt.nim │ ├── topttree.nim │ ├── towned_binary_tree.nim │ ├── tprevent_assign.nim │ ├── tprevent_assign2.nim │ ├── tprevent_assign3.nim │ ├── trecursive.nim │ ├── tselect.nim │ ├── tsetjmp_raise.nim │ ├── tsimpleclosure.nim │ ├── tsink.nim │ ├── ttuple.nim │ ├── turn_destroy_into_finalizer.nim │ ├── tuse_ownedref_after_move.nim │ ├── tuse_result_prevents_sinks.nim │ ├── tv2_cast.nim │ ├── tv2_raise.nim │ ├── twasmoved.nim │ ├── twasmoved_error.nim │ ├── twidgets.nim │ └── twidgets_unown.nim ├── dir with space │ ├── more spaces │ │ └── mspace.nim │ └── tspace.nim ├── discard │ ├── t23677.nim │ ├── tdiscardable.nim │ ├── tfinallyerrmsg.nim │ ├── tillegaldiscard.nim │ ├── tillegaldiscardtypes.nim │ ├── tneedsdiscard.nim │ ├── tneedsdiscard_in_for.nim │ └── tvoidcontext.nim ├── distinct │ ├── t7165.nim │ ├── tborrow.nim │ ├── tcomplexaddressableconv.nim │ ├── tdistinct.nim │ ├── tdistinct_issues.nim │ ├── tinvalidborrow.nim │ ├── tnil.nim │ └── typeclassborrow.nim ├── dll │ ├── client.nim │ ├── client.nim.cfg │ ├── nimhcr_0.nim │ ├── nimhcr_0_1.nim │ ├── nimhcr_0_2.nim │ ├── nimhcr_0_3.nim │ ├── nimhcr_0_4.nim │ ├── nimhcr_0_5.nim │ ├── nimhcr_0_6.nim │ ├── nimhcr_1.nim │ ├── nimhcr_1_1.nim │ ├── nimhcr_1_2.nim │ ├── nimhcr_1_3.nim │ ├── nimhcr_2.nim │ ├── nimhcr_2_1.nim │ ├── nimhcr_2_2.nim │ ├── nimhcr_2_3.nim │ ├── nimhcr_basic.nim │ ├── nimhcr_integration.nim │ ├── nimhcr_unit.nim │ ├── nimhcr_unit.nim.cfg │ ├── server.nim │ ├── server.nim.cfg │ ├── test_nimhcr_integration.bat │ ├── test_nimhcr_integration.sh │ └── visibility.nim ├── dummy.txt ├── effects │ ├── tcast_as_pragma.nim │ ├── tdiagnostic_messages.nim │ ├── teffects1.nim │ ├── teffects10.nim │ ├── teffects11.nim │ ├── teffects12.nim │ ├── teffects13.nim │ ├── teffects14.nim │ ├── teffects15.nim │ ├── teffects16.nim │ ├── teffects17.nim │ ├── teffects18.nim │ ├── teffects19.nim │ ├── teffects2.nim │ ├── teffects3.nim │ ├── teffects4.nim │ ├── teffects5.nim │ ├── teffects6.nim │ ├── teffects7.nim │ ├── teffects8.nim │ ├── teffects9.nim │ ├── teffectsmisc.nim │ ├── tfuncs_cannot_mutate.nim │ ├── tfuncs_cannot_mutate2.nim │ ├── tfuncs_cannot_mutate3.nim │ ├── tfuncs_cannot_mutate_simple.nim │ ├── tgcsafe.nim │ ├── tgcsafe2.nim │ ├── tgcsafe3.nim │ ├── thooks.nim │ ├── tlaxeffects.nim │ ├── tnestedprocs.nim │ ├── tnosideeffect.nim │ ├── tsidee1.nim │ ├── tsidee2.nim │ ├── tsidee3.nim │ ├── tsidee4.nim │ ├── tstrict_caseobjects.nim │ ├── tstrict_effects.nim │ ├── tstrict_effects2.nim │ ├── tstrict_effects3.nim │ ├── tstrict_effects_sort.nim │ ├── tstrict_funcs.nim │ ├── tstrict_funcs_imports.nim │ ├── tstrict_funcs_imports_js.nim │ └── tstrictfuncs_misc.nim ├── enum │ ├── m16462_1.nim │ ├── m16462_2.nim │ ├── mcrossmodule.nim │ ├── t16462.nim │ ├── t21863.nim │ ├── tambiguousoverloads.nim │ ├── tcrossmodule.nim │ ├── tenum.nim │ ├── tenum_duplicate.nim │ ├── tenum_invalid.nim │ ├── tenum_no_rtti.nim │ ├── tenum_self.nim │ ├── tenumfieldpragma.nim │ ├── tenumfieldpragmanoannot.nim │ ├── tenumitems.nim │ ├── tenumitems2.nim │ ├── tenummix.nim │ ├── toverloadable_enums.nim │ ├── toverloadedname.nim │ ├── tpure_enums_conflict.nim │ ├── tpure_enums_conflict_legacy.nim │ ├── tredefinition.nim │ └── ttypenameconflict.nim ├── errmsgs │ ├── m8794.nim │ ├── mambparam1.nim │ ├── mambparam2.nim │ ├── mambparam3.nim │ ├── mambtype1.nim │ ├── mambtype2.nim │ ├── mb.nim │ ├── mc.nim │ ├── t10251.nim │ ├── t10376.nim │ ├── t10489_a.nim │ ├── t10489_b.nim │ ├── t10542.nim │ ├── t10594.nim │ ├── t10734.nim │ ├── t10735.nim │ ├── t1154.nim │ ├── t12844.nim │ ├── t14444.nim │ ├── t16654.nim │ ├── t17460.nim │ ├── t18327.nim │ ├── t18886.nim │ ├── t18983.nim │ ├── t19224.nim │ ├── t19882.nim │ ├── t19882_2.nim │ ├── t21257.nim │ ├── t22097.nim │ ├── t22284.nim │ ├── t22753.nim │ ├── t22852.nim │ ├── t22996.nim │ ├── t23060.nim │ ├── t23355.nim │ ├── t23419.nim │ ├── t23435.nim │ ├── t23536.nim │ ├── t24258.nim │ ├── t2614.nim │ ├── t4756.nim │ ├── t5167_1.nim │ ├── t5167_2.nim │ ├── t5167_3.nim │ ├── t5167_4.nim │ ├── t5167_5.nim │ ├── t5282.nim │ ├── t5870.nim │ ├── t6281.nim │ ├── t6483.nim │ ├── t6499.nim │ ├── t6608.nim │ ├── t8064.nim │ ├── t8339.nim │ ├── t8434.nim │ ├── t8610.nim │ ├── t8794.nim │ ├── t9768.nim │ ├── t9908_01.nim │ ├── t9908_02.nim │ ├── ta.nim │ ├── tambparam.nim │ ├── tambparam_legacy.nim │ ├── tambtype.nim │ ├── tambtypegeneric.nim │ ├── tassignunpack.nim │ ├── tcall_with_default_arg.nim │ ├── tcannot_capture_builtin.nim │ ├── tcant_overload_by_return_type.nim │ ├── tcase_stmt.nim │ ├── tconceptconstraint.nim │ ├── tconcisetypemismatch.nim │ ├── tconstinfo.nim │ ├── tconsttypemismatch.nim │ ├── tdeclaredlocs.nim │ ├── tdetailed_position.nim │ ├── tdistinct_nil.nim │ ├── tdont_show_system.nim │ ├── temptysetparam.nim │ ├── tforwardraises.nim │ ├── tgcsafety.nim │ ├── tgeneral_excepts.nim │ ├── tgenericconstraint.nim │ ├── tgenericmismatchsegfault.nim │ ├── tgenericmismatchsegfault_legacy.nim │ ├── tinconsistentgensym.nim │ ├── tinteger_literals.nim │ ├── tinvalidinout.nim │ ├── tmacroerrorproc.nim │ ├── tmake_tuple_visible.nim │ ├── tmetaobjectfields.nim │ ├── tmultiple_finally.nim │ ├── tnested_empty_seq.nim │ ├── tnested_generic_instantiation.nim │ ├── tnested_generic_instantiation2.nim │ ├── tnnodeadd.nim │ ├── tnnodeindex.nim │ ├── tnnodeindexkind.nim │ ├── tnon_concrete_cast.nim │ ├── tnoop.nim │ ├── tobjectvariants.nim │ ├── tproc_mismatch.nim │ ├── tproper_stacktrace.nim │ ├── tproper_stacktrace2.nim │ ├── tproper_stacktrace3.nim │ ├── trecursiveproctype1.nim │ ├── trecursiveproctype2.nim │ ├── trecursiveproctype3.nim │ ├── trecursiveproctype4.nim │ ├── trecursiveproctype5.nim │ ├── trecursiveproctype6.nim │ ├── treportunused.nim │ ├── tshow_asgn.nim │ ├── tsigmatch.nim │ ├── tsigmatch2.nim │ ├── tsimpletypecheck.nim │ ├── tstaticexprnotype.nim │ ├── tstaticexprscope.nim │ ├── tstaticresult.nim │ ├── tsubscriptmismatch.nim │ ├── tsubscriptmismatch_legacy.nim │ ├── ttemplateaslambda.nim │ ├── ttupleindexoutofbounds.nim │ ├── ttypeAllowed.nim │ ├── tuncheckedarrayvar.nim │ ├── tundeclared_field.nim │ ├── tundeclared_routine.nim │ ├── tundeclared_routine_compiles.nim │ ├── tuninstobjconstr.nim │ ├── tunknown_named_parameter.nim │ ├── tunresolvedinnerproc.nim │ ├── tuntypedoverload.nim │ ├── twrong_at_operator.nim │ ├── twrong_explicit_typeargs.nim │ ├── twrong_explicit_typeargs_legacy.nim │ ├── twrongcolon.nim │ └── twrongdefinetype.nim ├── exception │ ├── m21261.nim │ ├── m22469.nim │ ├── t13115.nim │ ├── t18620.nim │ ├── t20613.nim │ ├── t21261.nim │ ├── t22008.nim │ ├── t22469.nim │ ├── t9657.nim │ ├── tcontinuexc.nim │ ├── tcpp_imported_exc.nim │ ├── tcpp_imported_exc2.nim │ ├── tdefer1.nim │ ├── tdont_overwrite_typename.nim │ ├── testindexerroroutput.nims │ ├── texcas.nim │ ├── texception_inference.nim │ ├── texceptionbreak.nim │ ├── texceptions.nim │ ├── texceptions2.nim │ ├── texcpt1.nim │ ├── texcsub.nim │ ├── tfinally.nim │ ├── tfinally2.nim │ ├── tfinally3.nim │ ├── tfinally4.nim │ ├── tnestedreturn.nim │ ├── tnestedreturn2.nim │ ├── treraise.nim │ ├── tsetexceptions.nim │ ├── tshow_real_exception_name.nim │ ├── tunhandledexc.nim │ └── twrongexc.nim ├── exprs │ ├── t22604.nim │ ├── texprstmt.nim │ ├── thighCString.nim │ ├── tifexpr_typeinference.nim │ ├── tresultwarning.nim │ ├── tstmtexp.nim │ └── tstmtexprs.nim ├── float │ ├── tfloat1.nim │ ├── tfloat2.nim │ ├── tfloat3.nim │ ├── tfloat4.nim │ ├── tfloat5.nim │ ├── tfloat7.nim │ ├── tfloatmod.nim │ ├── tfloatnan.nim │ ├── tfloatrange.nim │ ├── tfloats.nim │ ├── tissue5821.nim │ └── tlenientops.nim ├── fragmentation │ ├── data.nim │ ├── tfragment_alloc.nim │ └── tfragment_gc.nim ├── gc │ ├── bintrees.nim │ ├── closureleak.nim │ ├── cyclecollector.nim │ ├── cycleleak.nim │ ├── foreign_thr.nim │ ├── gcbench.nim │ ├── gcemscripten.nim │ ├── gcleak.nim │ ├── gcleak2.nim │ ├── gcleak3.nim │ ├── gcleak4.nim │ ├── gcleak5.nim │ ├── gctest.nim │ ├── gctest.nim.cfg │ ├── growobjcrash.nim │ ├── panicoverride.nim │ ├── refarrayleak.nim │ ├── stackrefleak.nim │ ├── tdisable_orc.nim │ ├── tfinalizers.nim │ ├── thavlak.nim │ ├── tlists.nim │ ├── trace_globals.nim │ ├── tregionleak.nim │ ├── tstandalone.nim │ └── weakrefs.nim ├── generics │ ├── m14509.nim │ ├── m22373a.nim │ ├── m22373b.nim │ ├── m3770.nim │ ├── mbind_bracket.nim │ ├── mclosed_sym.nim │ ├── mdotlookup.nim │ ├── mfriends.nim │ ├── mmodule_same_as_proc.nim │ ├── module_with_generics.nim │ ├── mopensymimport1.nim │ ├── mopensymimport2.nim │ ├── moverloading_typedesc.nim │ ├── mpragma1.nim │ ├── mpragma2.nim │ ├── mtypenodes.nim │ ├── muninstantiatedgenericcalls.nim │ ├── t12938.nim │ ├── t13525.nim │ ├── t14193.nim │ ├── t14509.nim │ ├── t1500.nim │ ├── t17509.nim │ ├── t18823.nim │ ├── t18859.nim │ ├── t19848.nim │ ├── t20996.nim │ ├── t21742.nim │ ├── t21760.nim │ ├── t21958.nim │ ├── t22373.nim │ ├── t22826.nim │ ├── t23186.nim │ ├── t23790.nim │ ├── t23853.nim │ ├── t23854.nim │ ├── t23855.nim │ ├── t2tables.nim │ ├── t3770.nim │ ├── t4668.nim │ ├── t500.nim │ ├── t5602_inheritence.nim │ ├── t5926.nim │ ├── t6060.nim │ ├── t6137.nim │ ├── t6637.nim │ ├── t7141.nim │ ├── t7446.nim │ ├── t7839.nim │ ├── t8270.nim │ ├── taliashijack.nim │ ├── tarc_misc.nim │ ├── tbadcache.nim │ ├── tbaddeprecated.nim │ ├── tbadgenericlambda.nim │ ├── tbindoncevsbindmany.nim │ ├── tbintree.nim │ ├── tbracketinstantiation.nim │ ├── tcalltype.nim │ ├── tcan.nim │ ├── tcannot_pass_empty_seq_to_generic.nim │ ├── tconstraints.nim │ ├── tcritical.nim │ ├── texplicitgeneric1.nim │ ├── texplicitgeneric2.nim │ ├── tfakecovariance.nim │ ├── tforwardgeneric.nim │ ├── tforwardgenericconstrained.nim │ ├── tfriends.nim │ ├── tgeneric0.nim │ ├── tgeneric3.nim │ ├── tgeneric_recursionlimit.nim │ ├── tgenericbodyreturn1.nim │ ├── tgenericbodyreturn2.nim │ ├── tgenericbodyreturn3.nim │ ├── tgenericdotrettype.nim │ ├── tgenericlambda.nim │ ├── tgenericmatcher.nim │ ├── tgenericprocvar.nim │ ├── tgenerics_issues.nim │ ├── tgenerics_various.nim │ ├── tgenerictmpl2.nim │ ├── tgenericvariant.nim │ ├── tgenericwhen.nim │ ├── tgensyminst.nim │ ├── timpl_ast.nim │ ├── timplicit_and_explicit.nim │ ├── timports.nim │ ├── tinheritable_importcpp.nim │ ├── tlateboundgenericparams.nim │ ├── tlateboundstatic.nim │ ├── tmacroinjectedsym.nim │ ├── tmacroinjectedsymwarning.nim │ ├── tmapping_generic_alias.nim │ ├── tmetafield.nim │ ├── tnestedissues.nim │ ├── tnestedtemplate.nim │ ├── tnullary_generics.nim │ ├── tobjecttyperel.nim │ ├── tobjecttyperel2.nim │ ├── topensymimport.nim │ ├── toptions.nim │ ├── toverloading_typedesc.nim │ ├── tparam_binding.nim │ ├── tparser_generator.nim │ ├── tpointerprocs.nim │ ├── tpragma.nim │ ├── tprevent_double_bind.nim │ ├── trecursivegenerics.nim │ ├── treentranttypes.nim │ ├── treturn_inference.nim │ ├── tstatic_constrained.nim │ ├── tsubclassgenericerror.nim │ ├── ttemplateparamcall.nim │ ├── tthread_generic.nim │ ├── ttypeofstatic.nim │ ├── tuninstantiated_failure.nim │ ├── tuninstantiatedgenericcalls.nim │ ├── tunique_type.nim │ ├── tvarseq_caching.nim │ ├── twrong_field_caching.nim │ ├── twrong_floatlit_type.nim │ └── twrong_generic_object.nim ├── global │ ├── a_module.nim │ ├── globalaux.nim │ ├── globalaux2.nim │ ├── t15005.nim │ ├── t21896.nim │ ├── t3505.nim │ ├── t5958.nim │ ├── tglobal.nim │ ├── tglobal2.nim │ ├── tglobal3.nim │ └── tglobalforvar.nim ├── ic │ ├── config.nims │ ├── mbaseobj.nim │ ├── mcompiletime_counter.nim │ ├── mdefconverter.nim │ ├── mimports.nim │ ├── mimportsb.nim │ ├── tcompiletime_counter.nim │ ├── tconverter.nim │ ├── tgenericinst.nim │ ├── tgenerics.nim │ ├── thallo.nim │ ├── timports.nim │ ├── tmethods.nim │ └── tstdlib_import_changed.nim ├── import │ ├── buzz │ │ └── m21496.nim │ ├── fizz │ │ └── m21496.nim │ ├── t21496.nim │ ├── t22065.nim │ ├── t22208.nim │ ├── t23167.nim │ ├── tduplicate_imports.nim │ └── tpushunusedwarning.nim ├── import_in_config │ ├── nim.cfg │ ├── other.nim │ └── tmain.nim ├── importalls │ ├── m1.nim │ ├── m2.nim │ ├── m3.nim │ ├── m4.nim │ ├── mt0.nim │ ├── mt1.nim │ ├── mt2.nim │ ├── mt3.nim │ ├── mt4.nim │ ├── mt4b.nim │ ├── mt5.nim │ ├── mt6.nim │ ├── mt7.nim │ ├── mt8.nim │ ├── mt9.nim │ └── tmain2.nim ├── init │ ├── t8314.nim │ ├── tcompiles.nim │ ├── tinitchecks_v2.nim │ ├── tlet.nim │ ├── tlet_uninit2.nim │ ├── tlet_uninit3.nim │ ├── tlet_uninit4.nim │ ├── toutparam_subtype.nim │ ├── toutparams.nim │ ├── tproveinit.nim │ ├── treturns.nim │ ├── tuninit1.nim │ ├── tuninit2.nim │ └── tzeroarray.nim ├── int │ ├── t1.nim │ ├── tarithm.nim │ ├── tashr.nim │ ├── tdiv.nim │ ├── tints.nim │ ├── tunsigned64mod.nim │ ├── tunsignedcmp.nim │ ├── tunsignedcomp.nim │ ├── tunsignedconv.nim │ ├── tunsignedinc.nim │ ├── tunsignedmisc.nim │ ├── twrongexplicitvarconv.nim │ └── twrongvarconv.nim ├── isolate │ ├── tisolate.nim │ ├── tisolate2.nim │ └── tisolated_lock.nim ├── iter │ ├── t1550.nim │ ├── t16076.nim │ ├── t20891.nim │ ├── t21306.nim │ ├── t21737.nim │ ├── t22148.nim │ ├── t22548.nim │ ├── t22619.nim │ ├── t24863.nim │ ├── t2771.nim │ ├── tanoniter1.nim │ ├── tarrayiter.nim │ ├── tchainediterators.nim │ ├── tclosureiters.nim │ ├── tcountup.nim │ ├── tfoldedaddr.nim │ ├── tgeniteratorinblock.nim │ ├── timplicit_auto.nim │ ├── titer.nim │ ├── titer10.nim │ ├── titer11.nim │ ├── titer12.nim │ ├── titer13.nim │ ├── titer14.nim │ ├── titer2.nim │ ├── titer3.nim │ ├── titer4.nim │ ├── titer5.nim │ ├── titer6.nim │ ├── titer7.nim │ ├── titer8.nim │ ├── titer9.nim │ ├── titer_issues.nim │ ├── titer_no_tuple_unpack.nim │ ├── titerable.nim │ ├── titerautoerr1.nim │ ├── titerautoerr2.nim │ ├── titerautoerr3.nim │ ├── titerconcat.nim │ ├── titeropenarray.nim │ ├── titerovl.nim │ ├── titerslice.nim │ ├── titertypedesc.nim │ ├── titervaropenarray.nim │ ├── tmoditer.nim │ ├── tnestedclosures.nim │ ├── tpermutations.nim │ ├── treciter.nim │ ├── tscheduler.nim │ ├── tshallowcopy_closures.nim │ ├── tsubscript.nim │ ├── ttypeofclosureiter.nim │ ├── twrap_walkdir.nim │ ├── twrongiter.nim │ └── tyieldintry.nim ├── js.html ├── js.nim ├── js │ ├── readme.md │ ├── t11166.nim │ ├── t11353.nim │ ├── t11354.nim │ ├── t11697.nim │ ├── t12223.nim │ ├── t12303.nim │ ├── t12672.nim │ ├── t14153.nim │ ├── t14570.nim │ ├── t17177.nim │ ├── t20233.nim │ ├── t20235.nim │ ├── t21209.nim │ ├── t21209.nims │ ├── t21247.nim │ ├── t21439.nim │ ├── t6612.nim │ ├── t7109.nim │ ├── t7127.nim │ ├── t7224.nim │ ├── t7249.nim │ ├── t7534.nim │ ├── t8231.nim │ ├── t8821.nim │ ├── t8914.nim │ ├── t9410.nim │ ├── tarrayboundscheck.nim │ ├── tasyncjs.nim │ ├── tasyncjs_bad.nim │ ├── tasyncjs_pragma.nim │ ├── tbasics.nim │ ├── tbigint_backend.nim │ ├── tbyvar.nim │ ├── tclosures.nim │ ├── tcodegendeclproc.nim │ ├── tcodegendeclvar.nim │ ├── tconsole.nim │ ├── tcopying.nim │ ├── tcsymbol.nim │ ├── tdanger.nim │ ├── tderef.nim │ ├── tdiscard.nim │ ├── tdollar_float.nim │ ├── temptyseq.nim │ ├── tenumhole.nim │ ├── tenumnegkey.nim │ ├── tenumoffset.nim │ ├── test1.nim │ ├── test2.nim │ ├── testmagic.nim │ ├── testobjs.nim │ ├── testtojsstr.nim │ ├── tfieldchecks.nim │ ├── tfloatround.nim │ ├── tglobal.nim │ ├── timplicit_nodecl.nim │ ├── tindexdefect.nim │ ├── tint64litgen.nim │ ├── tjsffi.nim │ ├── tjsffi_old.nim │ ├── tjshello.nim │ ├── tjshello_stacktrace.nim │ ├── tjsnimscombined.nim │ ├── tjsnimscombined.nims │ ├── tlent.nim │ ├── tmangle.nim │ ├── tmodify_cstring.nim │ ├── tnativeexc.nim │ ├── tneginthash.nim │ ├── tnilstrs.nim │ ├── tobjfieldbyvar.nim │ ├── tos.nim │ ├── trefbyvar.nim │ ├── trepr.nim │ ├── treprinifexpr.nim │ ├── tseqops.nim │ ├── tsourcemap.nim │ ├── tstdlib_imports.nim │ ├── tstdlib_various.nim │ ├── tstreams.nim │ ├── tstring_assignment.nim │ ├── tstringitems.nim │ ├── ttempgen.nim │ ├── tthismangle.nim │ ├── ttryexceptnewsyntax.nim │ ├── ttypedarray.nim │ ├── tunion.nim │ ├── tunittest_error.nim │ ├── tunittest_error2.nim │ ├── tvarargs.nim │ └── twritestacktrace.nim ├── lent │ ├── t16898.nim │ ├── t17621.nim │ ├── tbasic_lent_check.nim │ ├── tlent_from_var.nim │ ├── tnot_allowed_lent.nim │ ├── tnot_allowed_lent2.nim │ └── tvm.nim ├── let │ ├── t7936.nim │ ├── timportc.nim │ ├── timportc2.nim │ ├── tlet.nim │ └── tlet2.nim ├── lexer │ ├── mlexerutils.nim │ ├── tcustom_numeric_literals.nim │ ├── tident.nim │ ├── tind1.nim │ ├── tindent1.nim │ ├── tintegerliterals.nim │ ├── tinvalidintegerliteral1.nim │ ├── tinvalidintegerliteral2.nim │ ├── tinvalidintegerliteral3.nim │ ├── titerwrongexport.nim │ ├── tlexer.nim │ ├── tlexermisc.nim │ ├── tlexerspaces.nim │ ├── tmissingnl.nim │ ├── trawstr.nim │ ├── tstrlits.nim │ ├── tunary_minus.nim │ ├── tunderscores.nim │ └── tunicode_operators.nim ├── lookups │ ├── issue_23032 │ │ └── deep_scope.nim │ ├── issue_23172 │ │ └── m23172.nim │ ├── mambsym1.nim │ ├── mambsym2.nim │ ├── mambsym3.nim │ ├── mambsym4.nim │ ├── mambsys1.nim │ ├── mambsys2.nim │ ├── mambtype1.nim │ ├── mambtype2.nim │ ├── mbind3.nim │ ├── mdisambsym1.nim │ ├── mdisambsym2.nim │ ├── mdisambsym3.nim │ ├── mmacroamb.nim │ ├── t23032.nim │ ├── t23172.nim │ ├── t23749.nim │ ├── tambiguousemit.nim │ ├── tambprocvar.nim │ ├── tambsym.nim │ ├── tambsym2.nim │ ├── tambsym3.nim │ ├── tambsymmanual.nim │ ├── tambsys.nim │ ├── tambtype.nim │ ├── tbind.nim │ ├── tbind_for_generics.nim │ ├── tdisambsym.nim │ ├── tenumlocalsym.nim │ ├── test.nim │ ├── tgensym.nim │ ├── tgensymgeneric.nim │ ├── tinvalidbindtypedesc.nim │ ├── tkoeniglookup.nim │ ├── tmacroamb.nim │ ├── tmoduleclash1.nim │ ├── tmoduleclash2.nim │ ├── tnicerrorforsymchoice.nim │ ├── told_bind_expr.nim │ ├── tredef.nim │ └── tundeclaredmixin.nim ├── m14634.nim ├── macros │ ├── m18235.nim │ ├── macro_bug.nim │ ├── mparsefile.nim │ ├── t14227.nim │ ├── t14329.nim │ ├── t14511.nim │ ├── t14847.nim │ ├── t15691.nim │ ├── t15751.nim │ ├── t16758.nim │ ├── t17836.nim │ ├── t18203.nim │ ├── t18235.nim │ ├── t19766_20114.nim │ ├── t20067.nim │ ├── t20435.nim │ ├── t21593.nim │ ├── t23032_1.nim │ ├── t23032_2.nim │ ├── t23547.nim │ ├── t23784.nim │ ├── t7454.nim │ ├── t7875.nim │ ├── t8997.nim │ ├── tastrepr.nim │ ├── tbindsym.nim │ ├── tcasestmtmacro.nim │ ├── tclosuremacro.nim │ ├── tcollect.nim │ ├── tcomplexecho.nim │ ├── tcprag.nim │ ├── tdumpast.nim │ ├── tdumpast2.nim │ ├── tdumpastgen.nim │ ├── tdumptree.nim │ ├── tescape_var_into_quotedo_as_const.nim │ ├── texpectIdent1.nim │ ├── texpectIdent2.nim │ ├── tfail_parse.nim │ ├── tforloop_macro1.nim │ ├── tgetimpl.nim │ ├── tgetraiseslist.nim │ ├── tgettype.nim │ ├── tgettype2.nim │ ├── tgettype3.nim │ ├── tgettypeinst.nim │ ├── tgettypeinst7737.nim │ ├── tincremental.nim │ ├── tinvalidtypesym.nim │ ├── tisexported.nim │ ├── tlocktypednode1.nim │ ├── tlocktypednode2.nim │ ├── tlocktypednode3.nim │ ├── tmacro1.nim │ ├── tmacro2.nim │ ├── tmacro3.nim │ ├── tmacro4.nim │ ├── tmacro5.nim │ ├── tmacro6.nim │ ├── tmacro7.nim │ ├── tmacro8.nim │ ├── tmacroaspragma.nim │ ├── tmacrogenerics.nim │ ├── tmacrogensym.nim │ ├── tmacrogetimpl.nim │ ├── tmacros1.nim │ ├── tmacros_issues.nim │ ├── tmacros_various.nim │ ├── tmacrostmt.nim │ ├── tmacrotypes.nim │ ├── tmemit.nim │ ├── tmsginfo.nim │ ├── tnewlit.nim │ ├── tnewproc.nim │ ├── tnodecompare.nim │ ├── tparsefile.nim │ ├── tprocgettype.nim │ ├── tprochelpers.nim │ ├── tquotedo.nim │ ├── tquotewords.nim │ ├── trecmacro.nim │ ├── treturnsempty.nim │ ├── tsame_name_497.nim │ ├── tsametype.nim │ ├── tslice.nim │ ├── tstaticparamsmacro.nim │ ├── tstringinterp.nim │ ├── tstructuredlogging.nim │ ├── ttemplatesymbols.nim │ ├── ttryparseexpr.nim │ ├── ttypedsymchoice.nim │ ├── ttypenodes.nim │ ├── tvarargsuntyped.nim │ ├── tvtable.nim │ ├── twrapiterator.nim │ ├── typesafeprintf.nim │ └── typesapi2.nim ├── manyloc │ ├── argument_parser │ │ ├── argument_parser.nim │ │ ├── ex_wget.nim │ │ └── ex_wget.nim.cfg │ ├── keineschweine │ │ ├── README.md │ │ ├── TODO.md │ │ ├── client_settings.json │ │ ├── dependencies │ │ │ ├── chipmunk │ │ │ │ └── chipmunk.nim │ │ │ ├── enet │ │ │ │ ├── enet.nim │ │ │ │ ├── testclient.nim │ │ │ │ └── testserver.nim │ │ │ ├── genpacket │ │ │ │ ├── genpacket_enet.nim │ │ │ │ ├── macro_dsl.nim │ │ │ │ └── streams_enh.nim │ │ │ ├── nake │ │ │ │ ├── nake.nim │ │ │ │ └── nakefile.nim │ │ │ └── sfml │ │ │ │ ├── README.md │ │ │ │ ├── sfml.nim │ │ │ │ ├── sfml_audio.nim │ │ │ │ ├── sfml_colors.nim │ │ │ │ └── sfml_vector.nim │ │ ├── enet_server │ │ │ ├── enet_client.nim │ │ │ ├── enet_server.nim │ │ │ ├── nakefile.nim │ │ │ ├── nim.cfg │ │ │ ├── server_settings.json │ │ │ └── server_utils.nim │ │ ├── keineschweine.nim │ │ ├── keineschweine.nim.cfg │ │ ├── lib │ │ │ ├── animations.nim │ │ │ ├── client_helpers.nim │ │ │ ├── estreams.nim │ │ │ ├── game_objects.nim │ │ │ ├── gl.nim │ │ │ ├── glext.nim │ │ │ ├── glu.nim │ │ │ ├── glut.nim │ │ │ ├── glx.nim │ │ │ ├── idgen.nim │ │ │ ├── input_helpers.nim │ │ │ ├── map_filter.nim │ │ │ ├── math_helpers.nim │ │ │ ├── sfml_stuff.nim │ │ │ ├── sg_assets.nim │ │ │ ├── sg_gui.nim │ │ │ ├── sg_packets.nim │ │ │ ├── sound_buffer.nim │ │ │ ├── vehicles.nim │ │ │ ├── wingl.nim │ │ │ └── zlib_helpers.nim │ │ └── server │ │ │ ├── dirserver_settings.json │ │ │ ├── nim.cfg │ │ │ ├── old_dirserver.nim │ │ │ ├── old_server_utils.nim │ │ │ ├── old_sg_server.nim │ │ │ └── sg_lobby.nim │ ├── nake │ │ ├── nake.nim │ │ ├── nakefile.nim │ │ └── nakefile.nim.cfg │ ├── named_argument_bug │ │ ├── gui.nim │ │ ├── main.nim │ │ ├── main.nim.cfg │ │ └── tri_engine │ │ │ ├── config.nim │ │ │ ├── gfx │ │ │ ├── color.nim │ │ │ ├── gl │ │ │ │ ├── gl.nim │ │ │ │ ├── primitive.nim │ │ │ │ └── shader.nim │ │ │ └── tex.nim │ │ │ ├── math │ │ │ ├── circle.nim │ │ │ ├── rect.nim │ │ │ └── vec.nim │ │ │ └── tri_engine.nim │ ├── packages │ │ ├── noconflicts.nim │ │ ├── noconflicts.nim.cfg │ │ ├── os.nim │ │ ├── package1 │ │ │ ├── p1.babel │ │ │ └── strutils.nim │ │ └── package2 │ │ │ ├── p2.babel │ │ │ └── strutils.nim │ ├── standalone │ │ ├── barebone.nim │ │ ├── barebone.nim.cfg │ │ └── panicoverride.nim │ └── standalone2 │ │ ├── panicoverride.nim │ │ ├── tavr.nim │ │ └── tavr.nim.cfg ├── metatype │ ├── tbindtypedesc.nim │ ├── tcompositetypeclasses.nim │ ├── tcps.nim │ ├── tmatrix1.nim │ ├── tmatrix2.nim │ ├── tmatrix3.nim │ ├── tmatrix4.nim │ ├── tmeta_typeclasses.nim │ ├── tmetatype_issues.nim │ ├── tmetatype_various.nim │ ├── tmetatypematrix.nim │ ├── tsemistatic.nim │ ├── tshacontext.nim │ ├── tstatic_generic_typeclass.nim │ ├── tstaticparammacro.nim │ ├── tstaticparams.nim │ ├── tstaticvector.nim │ ├── ttensor.nim │ ├── ttypedesc1.nim │ ├── ttypedesc2.nim │ ├── ttypedesc3.nim │ ├── ttypedescnotnimnode.nim │ ├── ttypeselectors.nim │ ├── ttypetraits.nim │ ├── tunresolved_return_type.nim │ ├── tvoid_must_not_match.nim │ ├── twildtypedesc.nim │ ├── twrong_same_type.nim │ ├── tymatrix.nim │ ├── typeclassinference.nim │ ├── typedesc_as_value.nim │ └── utypeclasses.nim ├── method │ ├── mmultim3.nim │ ├── t20515.nim │ ├── t22673.nim │ ├── tcompilegenerics.nim │ ├── tgeneric_methods.nim │ ├── tmapper.nim │ ├── tmethod.nim │ ├── tmethod_issues.nim │ ├── tmethod_various.nim │ ├── tmethods_old.nim │ ├── tmultim.nim │ ├── tmultimjs.nim │ ├── tnildispatcher.nim │ ├── treturn_var_t.nim │ ├── tsingle_methods.nim │ └── tvtable.nim ├── misc │ ├── 99bottles.nim │ ├── m15316.nim │ ├── m15955.nim │ ├── m15955_main.nim │ ├── m20149.nim │ ├── m20456.nims │ ├── mbackend.nim │ ├── mbetterrun.nim │ ├── mfield_defect.nim │ ├── mimportc.nim │ ├── minit.nim │ ├── mjsondoc.nim │ ├── modulea.nim │ ├── msizeof5.nim │ ├── msizeof5.nim.cfg │ ├── mtlsemulation.h │ ├── mvarious.nim │ ├── parsecomb.nim │ ├── t11634.nim │ ├── t12480.nim │ ├── t12869.nim │ ├── t14667.nim │ ├── t15351.nim │ ├── t15955.nim │ ├── t16244.nim │ ├── t16264.nim │ ├── t16541.nim │ ├── t17286.nim │ ├── t18077.nim │ ├── t18079.nim │ ├── t19046.nim │ ├── t20253.nim │ ├── t20289.nim │ ├── t20456_2.nim │ ├── t20883.nim │ ├── t21109.nim │ ├── t21443.nim │ ├── t23240.nim │ ├── t3482.nim │ ├── t3907.nim │ ├── t5540.nim │ ├── t6549.nim │ ├── t8404.nim │ ├── t8545.nim │ ├── t9039.nim │ ├── t9091.nim │ ├── t9710.nim │ ├── t99bott.nim │ ├── tack.nim │ ├── taddr.nim │ ├── tapp_lib_staticlib.nim │ ├── tbug1217bracketquotes.nim │ ├── tbug511622.nim │ ├── tcast.nim │ ├── tcharinc.nim │ ├── tcmdline.nim │ ├── tconv.nim │ ├── tcsharpusingstatement.nim │ ├── tdangerisrelease.nim │ ├── tdefine.nim │ ├── tdllvar.nim │ ├── teventemitter.nim │ ├── tfib.nim │ ├── tfilter.nim │ ├── thallo.nim │ ├── theaproots.nim │ ├── tinit.nim │ ├── tinout.nim │ ├── tinvalidnewseq.nim │ ├── tissue710.nim │ ├── tjoinable.nim │ ├── tlastmod.nim │ ├── tloops.nim │ ├── tmemoization.nim │ ├── tmissingnilcheck.nim │ ├── tmodulea.nim │ ├── tnoforward.nim │ ├── tnolen.nim │ ├── tparedef.nim │ ├── tparsecombnum.nim │ ├── tparseopt.nim │ ├── tpos.nim │ ├── tprep.nim │ ├── tquicksort.nim │ ├── tradix.nim │ ├── trfc405.nim │ ├── trunner.nim │ ├── trunner_special.nim │ ├── tsamename.nim │ ├── tsamename2.nim │ ├── tsemfold.nim │ ├── tshadow_magic_type.nim │ ├── tsimplesort.nim │ ├── tsizeof.nim │ ├── tsizeof2.nim │ ├── tsizeof3.nim │ ├── tsizeof4.nim │ ├── tsortdev.nim │ ├── tstrace.nim │ ├── tstrange.nim │ ├── tstrdesc.nim │ ├── tstrdist.nim │ ├── ttlsemulation.nim │ ├── tvarious.nim │ ├── tvarious1.nim │ ├── tvarnums.nim │ ├── tvcc.nim │ └── åäö.nim ├── mmaptest.nim ├── modules │ ├── UpperCased.nim │ ├── a │ │ ├── module_name_clashes.nim │ │ └── utils.nim │ ├── b │ │ ├── module_name_clashes.nim │ │ └── utils.nim │ ├── definitions.nim │ ├── m9627 │ │ ├── a.nim │ │ └── b.nim │ ├── mexport2a.nim │ ├── mexport2b.nim │ ├── mexporta.nim │ ├── mexportb.nim │ ├── mforwarded_pure_enum.nim │ ├── mforwarded_pure_enum2.nim │ ├── mimport_in_config.nim │ ├── mincludeprefix.nim │ ├── mincludetemplate.nim │ ├── mmodule_same_proc.nim │ ├── mmodule_same_proc_client.nim │ ├── mnamspc1.nim │ ├── mnamspc2.nim │ ├── mnotuniquename.nim │ ├── mopaque.nim │ ├── morder_depa.nim │ ├── morder_depb.nim │ ├── mrange.nim │ ├── mrecmod.nim │ ├── mrecmod2.nim │ ├── proxy_module.nim │ ├── seq.nim │ ├── t8665.nim │ ├── t9627.nim │ ├── tambig_range.nim │ ├── tcanimport.nim │ ├── texplicit_system_import.nim │ ├── texport.nim │ ├── texport2.nim │ ├── tfowarded_pure_enum.nim │ ├── timport_in_config.nim │ ├── timport_in_config.nim.cfg │ ├── timportas.nim │ ├── timportexcept.nim │ ├── tincludeas.nim │ ├── tincludeprefix.nim │ ├── tincludetemplate.nim │ ├── tmismatchedvisibility.nim │ ├── tmodule_name_clashes.nim │ ├── tmodule_same_proc.nim │ ├── tmodulesymtype.nim │ ├── tnamspc.nim │ ├── tnotuniquename.nim │ ├── tnotuniquename2.nim │ ├── tnotuniquename_dir │ │ └── mnotuniquename.nim │ ├── topaque.nim │ ├── torder_dep.nim │ ├── trecinca.nim │ ├── trecincb.nim │ ├── trecmod.nim │ ├── trecmod2.nim │ ├── treorder.nim │ ├── tselfimport.nim │ ├── tseq.nim │ ├── tstrutils_insert_sep.nim │ ├── tuppercased.nim │ └── tutils_ab.nim ├── msgs │ ├── mdeprecated3.nim │ ├── mspellsuggest.nim │ ├── mused2a.nim │ ├── mused2b.nim │ ├── mused2c.nim │ ├── mused3.nim │ ├── mused3a.nim │ ├── mused3b.nim │ ├── tdeprecated1.nim │ ├── tdeprecated2.nim │ ├── tdeprecated3.nim │ ├── tdeprecatedequalhook.nim │ ├── texpandmacro.nim │ ├── thints_off.nim │ ├── tspellsuggest.nim │ ├── tspellsuggest2.nim │ ├── tspellsuggest3.nim │ ├── tused2.nim │ └── twarningaserror.nim ├── navigator │ ├── minclude.nim │ ├── tincludefile.nim │ └── tnav1.nim ├── newconfig │ ├── bar │ │ ├── config.nims │ │ ├── mfoo.nim │ │ ├── mfoo.nim.cfg │ │ ├── mfoo.nims │ │ └── nim.cfg │ ├── foo2 │ │ └── mfoo2.customext │ ├── mconfigcheck.nims │ ├── mymath.nim │ ├── tfoo.nim │ └── tfoo.nims ├── nimble │ ├── nimbleDir │ │ ├── linkedPkgs │ │ │ ├── pkgA-0.1.0 │ │ │ │ └── pkgA.nimble-link │ │ │ ├── pkgB-#head │ │ │ │ └── pkgB.nimble-link │ │ │ └── pkgB-0.1.0 │ │ │ │ └── pkgB.nimble-link │ │ └── simplePkgs │ │ │ ├── pkgA-0.1.0 │ │ │ ├── pkgA.nimble │ │ │ └── pkgA │ │ │ │ └── module.nim │ │ │ ├── pkgB-#head │ │ │ ├── pkgB.nimble │ │ │ └── pkgB │ │ │ │ └── module.nim │ │ │ ├── pkgB-0.1.0 │ │ │ ├── pkgB.nimble │ │ │ └── pkgB │ │ │ │ └── module.nim │ │ │ ├── pkgC-#aa11 │ │ │ ├── pkgC.nimble │ │ │ └── pkgC │ │ │ │ └── module.nim │ │ │ └── pkgC-#head │ │ │ ├── pkgC.nimble │ │ │ └── pkgC │ │ │ └── module.nim │ ├── readme.md │ ├── tnimblepath.nim │ ├── tnimblepathdollar.nim │ ├── tnimblepathdollar.nims │ ├── tnimblepathdollar_fault.nim │ ├── tnimblepathdollar_fault.nims │ └── tnimblepathlink.nim ├── nimdoc │ ├── imp.nim │ ├── m13129.nim │ ├── readme.md │ ├── sub │ │ ├── imp.nim │ │ ├── imp2.nim │ │ └── mmain.nim │ ├── t15916.nim │ ├── t17615.nim │ └── trunnableexamples.nim ├── niminaction │ ├── Chapter1 │ │ └── various1.nim │ ├── Chapter2 │ │ ├── explicit_discard.nim │ │ ├── no_def_eq.nim │ │ ├── no_iterator.nim │ │ ├── no_seq_type.nim │ │ ├── resultaccept.nim │ │ ├── resultreject.nim │ │ └── various2.nim │ ├── Chapter3 │ │ ├── ChatApp │ │ │ ├── readme.markdown │ │ │ └── src │ │ │ │ ├── client.nim │ │ │ │ ├── client.nim.cfg │ │ │ │ ├── protocol.nim │ │ │ │ └── server.nim │ │ ├── various3.nim │ │ └── various3.nim.cfg │ ├── Chapter6 │ │ └── WikipediaStats │ │ │ ├── concurrency.nim │ │ │ ├── concurrency.nim.cfg │ │ │ ├── concurrency_regex.nim │ │ │ ├── concurrency_regex.nim.cfg │ │ │ ├── naive.nim │ │ │ ├── parallel_counts.nim │ │ │ ├── parallel_counts.nim.cfg │ │ │ ├── race_condition.nim │ │ │ ├── race_condition.nim.cfg │ │ │ ├── sequential_counts.nim │ │ │ ├── unguarded_access.nim │ │ │ └── unguarded_access.nim.cfg │ ├── Chapter7 │ │ └── Tweeter │ │ │ ├── Tweeter.nimble │ │ │ ├── public │ │ │ └── style.css │ │ │ ├── src │ │ │ ├── createDatabase.nim │ │ │ ├── database.nim │ │ │ ├── tweeter.nim │ │ │ └── views │ │ │ │ ├── general.nim │ │ │ │ └── user.nim │ │ │ └── tests │ │ │ ├── database_test.nim │ │ │ └── database_test.nims │ ├── Chapter8 │ │ ├── canvas │ │ │ ├── canvas.nim │ │ │ └── canvas_test.nim │ │ ├── sdl │ │ │ ├── sdl.nim │ │ │ └── sdl_test.nim │ │ └── sfml │ │ │ ├── sfml.nim │ │ │ └── sfml_test.nim │ └── Chapter9 │ │ └── configurator │ │ └── configurator.nim ├── notnil │ ├── tmust_compile.nim │ ├── tnotnil.nim │ ├── tnotnil1.nim │ ├── tnotnil2.nim │ ├── tnotnil3.nim │ ├── tnotnil4.nim │ ├── tnotnil5.nim │ ├── tnotnil_in_generic.nim │ ├── tnotnil_in_objconstr.nim │ └── tparse.nim ├── objects │ ├── m19342.c │ ├── mobjconstr_msgs.nim │ ├── mobject_default_value.nim │ ├── t12753.nim │ ├── t17437.nim │ ├── t19342.nim │ ├── t19342_2.nim │ ├── t20972.nim │ ├── t22301.nim │ ├── t24847.nim │ ├── t3734.nim │ ├── t4318.nim │ ├── tdefaultfieldscheck.nim │ ├── tdefaultrangetypescheck.nim │ ├── tgenericdefaultvalue.nim │ ├── tgenericsubtype.nim │ ├── tillegal_recursion.nim │ ├── tillegal_recursion2.nim │ ├── tillegal_recursion3.nim │ ├── tobj_asgn_dont_slice.nim │ ├── tobjconstr.nim │ ├── tobjconstr2.nim │ ├── tobjconstr_msgs.nim │ ├── tobjcov.nim │ ├── tobject.nim │ ├── tobject3.nim │ ├── tobject_default_value.nim │ ├── tobjects_issues.nim │ ├── tobjects_various.nim │ ├── tobjpragma.nim │ ├── toop1.nim │ ├── trefobjfieldoverload.nim │ ├── trequireinit.nim │ ├── tunsafenew.nim │ ├── tunsafenew2.nim │ └── twhen1.nim ├── objvariant │ ├── t14581.nim │ ├── tadrdisc.nim │ ├── tcheckedfield1.nim │ ├── tconstobjvariant.nim │ ├── tconstructionorder.nim │ ├── tcorrectcheckedfield.nim │ ├── temptycaseobj.nim │ ├── tfloatrangeobj.nim │ ├── tnon_zero_discrim_err.nim │ ├── treassign.nim │ ├── trt_discrim.nim │ ├── trt_discrim_err0.nim │ ├── trt_discrim_err1.nim │ ├── trt_discrim_err2.nim │ ├── trt_discrim_err3.nim │ ├── tvariantstack.nim │ └── tyaoption.nim ├── openarray │ ├── t6163.nim │ ├── t8259.nim │ ├── topena1.nim │ ├── topenarray.nim │ ├── topenarrayrepr.nim │ ├── topenlen.nim │ ├── tptrarrayderef.nim │ └── tuncheckedarray.nim ├── options │ └── tnimbasepattern.nim ├── osproc │ ├── passenv.nim │ ├── tclose.nim │ ├── texecps.nim │ ├── texitsignal.nim │ ├── tnoexe.nim │ ├── treadlines.nim │ ├── twaitforexit.nim │ └── tworkingdir.nim ├── overflow │ ├── tdistinct_range.nim │ ├── toverflow.nim │ ├── toverflow2.nim │ ├── toverflow_reorder.nim │ ├── tovfint.nim │ ├── trangechecks.nim │ └── twronginference.nim ├── overload │ ├── importA.nim │ ├── importB.nim │ ├── issue22142 │ │ ├── tfail_implicit_ambiguous.nim │ │ ├── tfail_nested_pointers.nim │ │ ├── tfail_object_is_generic.nim │ │ ├── tfail_typeclass_var_invar.nim │ │ └── tissue22142_shouldpass.nim │ ├── m19737.nim │ ├── mvaruintconv.nim │ ├── t19737.nim │ ├── t23249.nim │ ├── t23755.nim │ ├── t7416.nim │ ├── t8829.nim │ ├── tambiguousexplicitgeneric.nim │ ├── tcompoundinheritance.nim │ ├── tconverter_to_string.nim │ ├── texplicitgenericdiscard.nim │ ├── tgenericalias.nim │ ├── tgenericrangedisamb.nim │ ├── tissue966.nim │ ├── tnamedparamoverloading.nim │ ├── tor_isnt_better.nim │ ├── toverl.nim │ ├── toverl4.nim │ ├── toverload_issues.nim │ ├── toverload_various.nim │ ├── tparam_forwarding.nim │ ├── tproc_types_dont_like_subtypes.nim │ ├── tspec.nim │ ├── tstatic_with_converter.nim │ ├── tsubtypegenericconstraint.nim │ ├── tsystemcmp.nim │ ├── tuntypedarg.nim │ ├── tvartypeclass.nim │ └── tvaruintconv.nim ├── package │ ├── stdlib │ │ ├── stdlib.nimble │ │ └── system.nim │ └── tstdlib_name_not_special.nim ├── package_level_objects │ ├── definefoo.nim │ ├── mypackage.nimble │ ├── tusefoo.nim │ └── tusefoo2.nim ├── parallel │ ├── nim.cfg │ ├── t10913.nim │ ├── t5000.nim │ ├── t7535.nim │ ├── t9691.nim │ ├── tarray_of_channels.nim │ ├── tblocking_channel.nim │ ├── tconvexhull.nim │ ├── tdeepcopy.nim │ ├── tdeepcopy2.nim │ ├── tdisjoint_slice1.nim │ ├── tflowvar.nim │ ├── tforstmt.nim │ ├── tgc_unsafe.nim │ ├── tgc_unsafe2.nim │ ├── tguard1.nim │ ├── tguard2.nim │ ├── tinvalid_array_bounds.nim │ ├── tinvalid_counter_usage.nim │ ├── tlet_spawn.nim │ ├── tmissing_deepcopy.nim │ ├── tnon_disjoint_slice1.nim │ ├── tparfind.nim │ ├── tpi.nim │ ├── tptr_to_ref.nim │ ├── treadafterwrite.nim │ ├── tsendtwice.nim │ ├── tsimple_array_checks.nim │ ├── tsysspawn.nim │ ├── tsysspawnbadarg.nim │ ├── tuseafterdef.nim │ └── twaitany.nim ├── parser │ ├── t12274.nim │ ├── t15667.nim │ ├── t19430.nim │ ├── t19662.nim │ ├── t20922.nim │ ├── tbinarynotindented.nim │ ├── tbinarynotsameline.nim │ ├── tcommand_as_expr.nim │ ├── tcommandequals.nim │ ├── tcommandindent.nim │ ├── tdo.nim │ ├── tdoc_comments.nim │ ├── tdomulttest.nim │ ├── tdotlikeoperators.nim │ ├── tdoublenotnil.nim │ ├── tifexprs.nim │ ├── tifextracolon.nim │ ├── tinvcolonlocation1.nim │ ├── tinvcolonlocation2.nim │ ├── tinvcolonlocation3.nim │ ├── tinvifstmt.nim │ ├── tinvwhen.nim │ ├── tletcolon.nim │ ├── tmultiline_comments.nim │ ├── toprprec.nim │ ├── tparsenewcaseobject.nim │ ├── tpostexprblocks.nim │ ├── tprecedence.nim │ ├── tprocexprasstmt.nim │ ├── tproctype_pragmas.nim │ ├── tstatementoperators.nim │ ├── tstmtlistexprempty.nim │ ├── tstmtlistexprindent.nim │ ├── tstmtlists.nim │ ├── ttry.nim │ ├── ttupleunpack.nim │ ├── ttypeclasses.nim │ ├── ttypecommandcomma.nim │ ├── ttypecommandindent1.nim │ ├── ttypecommandindent2.nim │ ├── ttypecommandindent3.nim │ ├── ttypeexprobject.nim │ ├── ttypeexprs.nim │ ├── ttypemodifiers.nim │ ├── ttypeof.nim │ ├── ttypesectioncalls.nim │ ├── twhen_in_enum.nim │ └── twrongcmdsyntax.nim ├── pragmas │ ├── cfunction.c │ ├── custom_pragma.nim │ ├── foobar.nim │ ├── monoff1.nim │ ├── mpushexperimental.nim │ ├── mqualifiedmacro.nim │ ├── t12558.nim │ ├── t12640.nim │ ├── t13306.nim │ ├── t22713.nim │ ├── t4384.nim │ ├── t5149.nim │ ├── t6448.nim │ ├── t8741.nim │ ├── tbitsize.nim │ ├── tcompile_missing_file.nim │ ├── tcompile_pragma.nim │ ├── tcustom_pragma.nim │ ├── tdeprecated.nim │ ├── thintprocessing.nim │ ├── tinvalid_user_pragma.nim │ ├── tinvalidcustompragma.nim │ ├── titeratormacro.nim │ ├── tlocks.nim │ ├── tnoreturn.nim │ ├── tonoff1.nim │ ├── tonoff2.nim │ ├── tparamcustompragma.nim │ ├── tpostfixcustompragma.nim │ ├── tpragmablock.nim │ ├── tpragmas_misc.nim │ ├── tpragmas_reorder.nim │ ├── tpush.nim │ ├── tpushexperimental.nim │ ├── tpushnotes.nim │ ├── tpushuserpragma.nim │ ├── tqualifiedmacro.nim │ ├── treorder.nim │ ├── tsym_as_pragma.nim │ ├── ttypedef_macro.nim │ ├── tundeclaredgenericmacro.nim │ ├── tused.nim │ ├── tuserpragma.nim │ ├── tuserpragma2.nim │ ├── tuserpragmaargs.nim │ ├── tvar_macro.nim │ ├── twarning_off.nim │ └── warn_module.nim ├── proc │ ├── mdefaultprocparam.nim │ ├── msugarcrash1.nim │ ├── t15949.nim │ ├── t17157.nim │ ├── t19795.nim │ ├── t23874.nim │ ├── tanonprocresem.nim │ ├── tcolonisproc.nim │ ├── tdefaultprocparam.nim │ ├── tdefaultvalueconv.nim │ ├── texplicitgenericconstraint.nim │ ├── texplicitgenericcount.nim │ ├── texplicitgenericcountverbose.nim │ ├── texplicitgenerics.nim │ ├── tfunc_type.nim │ ├── tgenericdefaultparam.nim │ ├── tillegalreturntype.nim │ ├── tinferlambdareturn.nim │ ├── tlambdadonotation.nim │ ├── tlambdapragma.nim │ ├── tnamedparams.nim │ ├── tnamedparams2.nim │ ├── tnamedparams3.nim │ ├── tparamsindefault.nim │ ├── tproc.nim │ ├── tprocredef.nim │ ├── tprocvar.nim │ ├── tprocvarmismatch.nim │ ├── trecursivereturntype.nim │ ├── tstaticsignature.nim │ ├── tsugarcrash1.nim │ ├── tunderscoreparam.nim │ ├── twrongdefaultvalue.nim │ ├── twrongdefaultvalue2.nim │ ├── typed.nim │ └── untyped.nim ├── range │ ├── compilehelpers.nim │ ├── t19678.nim │ ├── tcompiletime_range_checks.nim │ ├── tenums.nim │ ├── texplicitvarconv.nim │ ├── tintypeclass.nim │ ├── toutofrangevarconv.nim │ ├── trange.nim │ ├── tsubrange.nim │ ├── tsubrange2.nim │ └── tsubrange3.nim ├── readme.md ├── realtimeGC │ ├── shared.nim │ └── tmain.nim ├── rectest.nim ├── refc │ ├── t18616.nim │ └── tsinkbug.nim ├── sandwich │ ├── config.nims │ ├── generic_library.nim │ ├── helper_module.nim │ ├── mcontext_thread_local.nim │ ├── mdollar1.nim │ ├── mdollar2.nim │ ├── mdollar3.nim │ ├── mfiles.nim │ ├── mhandles.nim │ ├── mitems.nim │ ├── mlistdeques.nim │ ├── mobjhash.nim │ ├── module_using_generic_library.nim │ ├── mqueuecontainer.nim │ ├── msetin.nim │ ├── msetiter1.nim │ ├── msetiter2.nim │ ├── mstatic.nim │ ├── mtasks.nim │ ├── tcontext_thread_local.nim │ ├── tdollar.nim │ ├── tfilehandles.nim │ ├── titems.nim │ ├── tmain.nim │ ├── tobjhash.nim │ ├── tqueuecontainer.nim │ ├── tsethash.nim │ ├── tsetin.nim │ ├── tsetiter1.nim │ ├── tsetiter2.nim │ └── tstatic.nim ├── sets │ ├── m17385.nim │ ├── t13764.nim │ ├── t15435.nim │ ├── t17385.nim │ ├── t20997.nim │ ├── t2669.nim │ ├── t5792.nim │ ├── thugeset.nim │ ├── tnewsets.nim │ ├── trangeincompatible.nim │ ├── tsets.nim │ ├── tsets_various.nim │ └── twrongenumrange.nim ├── showoff │ ├── tdrdobbs_examples.nim │ ├── tformatopt.nim │ ├── tgenericmacrotypes.nim │ ├── thello2.nim │ ├── thtml1.nim │ ├── thtml2.nim │ ├── tonce.nim │ └── tquasiquote.nim ├── specialops │ ├── tcallops.nim │ ├── tcallprecedence.nim │ ├── tdotops.nim │ ├── terrmsgs.nim │ ├── tmismatch.nim │ ├── tnewseq.nim │ ├── tsetter.nim │ ├── tsetterfallback1.nim │ ├── tsetterfallback2.nim │ └── tsetterfallbacksubscript.nim ├── statictypes │ ├── t20148.nim │ ├── t3784.nim │ ├── t5780.nim │ ├── t9255.nim │ ├── tcryptodigest.nim │ ├── texplicitprocparams.nim │ ├── tgenericcomputedrange.nim │ ├── tpassthruarith.nim │ ├── tstackmatrix.nim │ ├── tstatic.nim │ ├── tstaticgenericparam.nim │ ├── tstaticimportcpp.nim │ ├── tstaticprocparams.nim │ └── tstatictypes.nim ├── stckovfl.nim ├── stdlib │ ├── concurrency │ │ ├── atomicSample.nim │ │ ├── tatomic_import.nim │ │ ├── tatomics.nim │ │ └── tatomics_size.nim │ ├── config.nims │ ├── genericstrformat.nim │ ├── mgenast.nim │ ├── mimportutils.nim │ ├── mintsets.nim │ ├── mjsonexternproc.nim │ ├── mjsonutilssandwich.nim │ ├── mstackframes.nim │ ├── mstrscans_undecl_scanf.nim │ ├── nre │ │ ├── captures.nim │ │ ├── escape.nim │ │ ├── find.nim │ │ ├── init.nim │ │ ├── match.nim │ │ ├── misc.nim │ │ ├── optional_nonstrict.nim │ │ ├── replace.nim │ │ └── split.nim │ ├── osproctest.nim │ ├── somesql.sql │ ├── t10231.nim │ ├── t14139.nim │ ├── t15663.nim │ ├── t19304.nim │ ├── t20023.nim │ ├── t21251.nim │ ├── t21406.nim │ ├── t21564.nim │ ├── t7686.nim │ ├── t8925.nim │ ├── t9754.nim │ ├── talgorithm.nim │ ├── tarithmetics.nim │ ├── tasynchttpserver.nim │ ├── tasynchttpserver_transferencoding.nim │ ├── tbase64.nim │ ├── tbitops.nim │ ├── tbitops.nim.cfg │ ├── tbitops_utils.nim │ ├── tcasts.nim │ ├── tcgi.nim │ ├── tclosures.nim │ ├── tcmdline.nim │ ├── tcomplex.nim │ ├── tcookies.nim │ ├── tcritbits.nim │ ├── tcstring.nim │ ├── tcstrutils.nim │ ├── tdb.nim │ ├── tdb.nims │ ├── tdb_mysql.nim │ ├── tdecls.nim │ ├── tdecode_helpers.nim │ ├── tdeques.nim │ ├── tdiff.nim │ ├── tdistros_detect.nim │ ├── tdochelpers.nim │ ├── teditdistance.nim │ ├── tencodings.nim │ ├── tenumerate.nim │ ├── tenumutils.nim │ ├── tenvvars.nim │ ├── texitprocs.nim │ ├── tfdleak.nim │ ├── tfdleak_multiple.nim │ ├── tfenv.nim │ ├── tfilesanddirs.nim │ ├── tfrexp1.nim │ ├── tgenast.nim │ ├── tgetaddrinfo.nim │ ├── tgetfileinfo.nim │ ├── tgetprotobyname.nim │ ├── tglobs.nim │ ├── thashes.nim │ ├── theapqueue.nim │ ├── thighlite.nim │ ├── thtmlparser.nim │ ├── thttpclient.nim │ ├── thttpclient_ssl.nim │ ├── thttpclient_ssl_cert.pem │ ├── thttpclient_ssl_key.pem │ ├── thttpclient_standalone.nim │ ├── thttpcore.nim │ ├── timportutils.nim │ ├── tintsets.nim │ ├── tio.nim │ ├── tisolation.nim │ ├── tjsbigints.nim │ ├── tjson.nim │ ├── tjsonexternproc.nim │ ├── tjsonmacro.nim │ ├── tjsonmacro_reject.nim │ ├── tjsontestsuite.nim │ ├── tjsonutils.nim │ ├── tjsonutilssandwich.nim │ ├── tlists.nim │ ├── tlocks.nim │ ├── tlwip.nim │ ├── tmacros.nim │ ├── tmarshal.nim │ ├── tmarshalsegfault.nim │ ├── tmath.nim │ ├── tmemfiles1.nim │ ├── tmemfiles2.nim │ ├── tmemlines.nim │ ├── tmemlinesBuf.nim │ ├── tmemmapstreams.nim │ ├── tmemslices.nim │ ├── tmersenne.nim │ ├── tmget.nim │ ├── tmimetypes.nim │ ├── tmisc_issues.nim │ ├── tmitems.nim │ ├── tmonotimes.nim │ ├── tnativesockets.nim │ ├── tnet.nim │ ├── tnet_ll.nim │ ├── tnetbind.nim │ ├── tnetconnect.nim │ ├── tnetdial.nim │ ├── tnre.nim │ ├── tntpath.nim │ ├── tobjectdollar.nim │ ├── toids.nim │ ├── topenssl.nim │ ├── toptions.nim │ ├── tos.nim │ ├── tos_unc.nim │ ├── tosenv.nim │ ├── toserrors.nim │ ├── tosproc.nim │ ├── tosprocterminate.nim │ ├── tpackedsets.nim │ ├── tparsecfg.nim │ ├── tparsecsv.nim │ ├── tparseipv6.nim │ ├── tparsesql.nim │ ├── tparseuints.nim │ ├── tparseutils.nim │ ├── tparsopt.nim │ ├── tpathnorm.nim │ ├── tpaths.nim │ ├── tpegs.nim │ ├── tposix.nim │ ├── tprelude.nim │ ├── trandom.nim │ ├── trat_float.nim │ ├── trat_init.nim │ ├── trationals.nim │ ├── tre.nim │ ├── treadln.nim │ ├── tregex.nim │ ├── tregistry.nim │ ├── trepr.nim │ ├── trlocks.nim │ ├── tropes.nim │ ├── trst.nim │ ├── trstgen.nim │ ├── tsequtils.nim │ ├── tsetutils.nim │ ├── tsharedlist.nim │ ├── tsharedtable.nim │ ├── tsince.nim │ ├── tsocketstreams.nim │ ├── tsortcall.nim │ ├── tsqlitebindatas.nim │ ├── tsqlparser.nim │ ├── tssl.nim │ ├── tssl.nims │ ├── tstackframes.nim │ ├── tstaticos.nim │ ├── tstats.nim │ ├── tstdlib_issues.nim │ ├── tstdlib_various.nim │ ├── tstrbasics.nim │ ├── tstreams.nim │ ├── tstrformat.nim │ ├── tstrformatlineinfo.nim │ ├── tstrimpl.nim │ ├── tstring.nim │ ├── tstrmiscs.nim │ ├── tstrscans.nim │ ├── tstrscans_errs.nim │ ├── tstrscans_undecl_scanf.nim │ ├── tstrset.nim │ ├── tstrtabs.nim │ ├── tstrtabs.nims │ ├── tstrtabs2.nim │ ├── tstrutils.nim │ ├── tsugar.nim │ ├── tsums.nim │ ├── tsysrand.nim │ ├── tsystem.nim │ ├── ttables.nim │ ├── ttasks.nim │ ├── ttempfiles.nim │ ├── tterminal.nim │ ├── tterminal_12759.nim │ ├── tterminal_15874.nim │ ├── ttestutils.nim │ ├── tthreadpool.nim │ ├── ttimes.nim │ ├── ttypeinfo.nim │ ├── ttypeinfo.nims │ ├── ttypetraits.nim │ ├── tunicode.nim │ ├── tunidecode.nim │ ├── tunittest.nim │ ├── tunittest_error.nim │ ├── tunittestexceptiontype.nim │ ├── tunittestpass.nim │ ├── tunittesttemplate.nim │ ├── tunixsocket.nim │ ├── turi.nim │ ├── tuserlocks.nim │ ├── tvarargs.nim │ ├── tvarints.nim │ ├── tvmutils.nim │ ├── tvolatile.nim │ ├── twchartoutf8.nim │ ├── twith.nim │ ├── twordwrap.nim │ ├── twrapnils.nim │ ├── twrongstattype.nim │ ├── txmltree.nim │ ├── tyield.nim │ ├── unixsockettest.nim │ └── uselocks.nim ├── stmt │ ├── tforloop_tuple_multiple_underscore.nim │ ├── tforloop_tuple_underscore.nim │ ├── tforloop_underscore.nim │ ├── tgenericsunderscore.nim │ └── tmiscunderscore.nim ├── strictnotnil │ ├── tnilcheck.nim │ └── tnilcheck_no_warnings.nim ├── stylecheck │ ├── fileinfo.nim │ ├── foreign_package │ │ ├── foreign_package.nim │ │ └── foreign_package.nimble │ ├── t20397.nim │ ├── t20397_1.nim │ ├── t20397_2.nim │ ├── taccept.nim │ ├── tforeign_package.nim │ ├── thint.nim │ ├── treject.nim │ └── tusages.nim ├── system │ ├── helpers │ │ └── readall_echo.nim │ ├── t10307.nim │ ├── t20938.nim │ ├── t24664.nim │ ├── t7894.nim │ ├── talloc.nim │ ├── talloc2.nim │ ├── tatomics1.nim │ ├── tcomparisons.nim │ ├── tconcat.nim │ ├── tcopyprotected_arrayinit.nim │ ├── tdeepcopy.nim │ ├── tdollars.nim │ ├── techo_unicode.nim │ ├── temptyecho.nim │ ├── tensuremove.nim │ ├── tensuremove1.nim │ ├── tensuremove2.nim │ ├── tensuremove3.nim │ ├── tenum_array_repr.nim │ ├── tfielditerator.nim │ ├── tfields.nim │ ├── tgcnone.nim │ ├── tgcregions.nim │ ├── tgogc.nim │ ├── timmutableinc.nim │ ├── tinvalidnot.nim │ ├── tio.nim │ ├── tlocals.nim │ ├── tlowhigh.nim │ ├── tmagics.nim │ ├── tmemory.nim │ ├── tnew.nim │ ├── tnewderef.nim │ ├── tnewstring_uninitialized.nim │ ├── tnilconcats.nim │ ├── tnim_stacktrace_override.nim │ ├── tostring.nim │ ├── tparams.nim │ ├── trealloc.nim │ ├── trefs.nim │ ├── treprconverter.nim │ ├── tsigexitcode.nim │ ├── tslices.nim │ ├── tslimsystem.nim │ ├── tstatic.nim │ ├── tstatic_callable.nim │ ├── tstatic_callable_error.nim │ ├── tsystem_misc.nim │ ├── tuse_version16.nim │ └── tvarargslen.nim ├── template │ ├── annotate.nim │ ├── i2416.nim │ ├── m1027a.nim │ ├── m1027b.nim │ ├── m19277_1.nim │ ├── m19277_2.nim │ ├── mcan_access_hidden_field.nim │ ├── mdotcall.nim │ ├── mdotcall2.nim │ ├── mgensym_generic_cross_module.nim │ ├── mlt.nim │ ├── mqualifiedtype1.nim │ ├── mqualifiedtype2.nim │ ├── mtempl5.nim │ ├── otests.nim │ ├── sunset.nimf │ ├── t1027.nim │ ├── t11705.nim │ ├── t13426.nim │ ├── t17433.nim │ ├── t18113.nim │ ├── t19149.nim │ ├── t19277.nim │ ├── t19700.nim │ ├── t21231.nim │ ├── t21532.nim │ ├── t24112.nim │ ├── t6217.nim │ ├── t9534.nim │ ├── t_otemplates.nim │ ├── taliassyntax.nim │ ├── taliassyntaxerrors.nim │ ├── tcallsitelineinfo.nim │ ├── tcallsitelineinfo2.nim │ ├── tconfusinglocal.nim │ ├── tdefaultparam.nim │ ├── tdefined_overload.nim │ ├── tdotcall.nim │ ├── template_issues.nim │ ├── template_pragmas.nim │ ├── template_various.nim │ ├── texponential_eval.nim │ ├── tfielduse.nim │ ├── tgenericobjconstr.nim │ ├── tgenericparam.nim │ ├── tgensym_instantiationinfo.nim │ ├── tgensymhijack.nim │ ├── tgensymregression.nim │ ├── thygienictempl.nim │ ├── tidentconcatenations.nim │ ├── tinnerouterproc.nim │ ├── tlambdaparam.nim │ ├── tmethodcall.nim │ ├── tmixin_in_proc.nim │ ├── tmodulealias.nim │ ├── tmore_regressions.nim │ ├── tnested.nim │ ├── tobjectdeclfield.nim │ ├── topensym.nim │ ├── topensymoverride.nim │ ├── topensymwarning.nim │ ├── tparams_gensymed.nim │ ├── tparamscope.nim │ ├── tpragma.nim │ ├── tqualifiedident.nim │ ├── tqualifiedtype.nim │ ├── tredefinition.nim │ ├── tredefinition_override.nim │ ├── tscope.nim │ ├── tshadow.nim │ ├── tsighash_regression.nim │ ├── tstempl.nim │ ├── ttempl2.nim │ ├── ttempl3.nim │ ├── tunderscore1.nim │ ├── twhenintemplates.nim │ ├── twrong_getast.nim │ ├── twrongmapit.nim │ ├── twrongopensymchoice.nim │ ├── twrongsymkind.nim │ └── utemplates.nim ├── test_nimscript.nims ├── testament │ ├── t16576.nim │ ├── tinlinemsg.nim │ ├── tjoinable.nim │ ├── treject.nim │ ├── tretries.nim │ ├── tshould_not_work.nim │ └── tspecialpaths.nim ├── testdata │ ├── csvtest.csv │ ├── data.csv │ ├── doc1.xml │ ├── jsontest.json │ ├── jsontest2.json │ ├── jsonwithextradata.json │ ├── mycert.pem │ ├── string.txt │ ├── wildhtml.html │ └── xmltest.html ├── threads │ ├── nim.cfg │ ├── t7172.nim │ ├── t8535.nim │ ├── threadex.nim │ ├── tjsthreads.nim │ ├── tmanyjoin.nim │ ├── tmembug.nim │ ├── tonthreadcreation.nim │ ├── tracy_allocator.nim │ ├── treusetvar.nim │ ├── tthreadanalysis.nim │ ├── tthreadheapviolation1.nim │ ├── tthreadvars.nim │ └── ttryrecv.nim ├── tools │ ├── compile │ │ ├── config.nims │ │ ├── readme.md │ │ ├── tdeps.nim │ │ ├── tdetect.nim │ │ ├── tkoch.nim │ │ └── tniminst.nim │ ├── config.nims │ ├── dontmentionme.nim │ ├── second.nim │ ├── tctags.nim │ ├── tctags2.nim │ ├── tlinter.nim │ ├── tloadstdin.nim │ ├── tloadstdin.nims │ ├── tnimgrep.nim │ ├── tnimscriptwithmacro.nims │ └── tunused_imports.nim ├── trmacros │ ├── tdisallowif.nim │ ├── tnorewrite.nim │ ├── tor.nim │ ├── trmacros_various.nim │ ├── trmacros_various2.nim │ └── tstmtlist.nim ├── tuples │ ├── mnimsconstunpack.nim │ ├── t12892.nim │ ├── t18125_1.nim │ ├── t18125_2.nim │ ├── t7012.nim │ ├── t9177.nim │ ├── tconstfield.nim │ ├── tfortupleunpack.nim │ ├── tinferred_generic_const.nim │ ├── tnimsconstunpack.nim │ ├── tstatictuple.nim │ ├── ttupleconverter.nim │ ├── ttuples_issues.nim │ ├── ttuples_various.nim │ ├── ttypedesc_in_tuple_a.nim │ ├── ttypedesc_in_tuple_b.nim │ ├── tuple_with_nil.nim │ ├── twrong_generic_caching.nim │ └── twrongtupleaccess.nim ├── typerel │ ├── t2plus.nim │ ├── t4799.nim │ ├── t4799_1.nim │ ├── t4799_2.nim │ ├── t4799_3.nim │ ├── t7600_1.nim │ ├── t7600_2.nim │ ├── t7734.nim │ ├── t8172.nim │ ├── t8905.nim │ ├── tclosure_nil_as_default.nim │ ├── tcommontype.nim │ ├── temptynode.nim │ ├── texplicitcmp.nim │ ├── tgeneric_subtype_regression.nim │ ├── tno_gcmem_in_shared.nim │ ├── tno_int_in_bool_context.nim │ ├── tnocontains.nim │ ├── tproctypeclass.nim │ ├── tptrs.nim │ ├── trectuple.nim │ ├── trectuples.nim │ ├── trectype.nim │ ├── trefs.nim │ ├── tregionptrs2.nim │ ├── trettypeinference.nim │ ├── tsecondarrayproperty.nim │ ├── tsigmatch.nim │ ├── tstr_as_openarray.nim │ ├── tsymchoice_for_expr.nim │ ├── ttuple1.nim │ ├── ttynilinstantiation.nim │ ├── ttypedesc_as_genericparam1.nim │ ├── ttypedesc_as_genericparam1_orc.nim │ ├── ttypedesc_as_genericparam2.nim │ ├── ttypelessemptyset.nim │ ├── ttypenoval.nim │ ├── ttypenovalue.nim │ ├── tuncheckedarray_eq.nim │ ├── tvarargsexpr.nim │ ├── tvoid.nim │ ├── typalias.nim │ ├── typedescs.nim │ ├── typedescs2.nim │ ├── typeof_in_template.nim │ └── typredef.nim ├── types │ ├── t14127_cast_number.nim │ ├── t15836.nim │ ├── t15836_2.nim │ ├── t21027.nim │ ├── t21260.nim │ ├── t5648.nim │ ├── t6456.nim │ ├── t6969.nim │ ├── taliasbugs.nim │ ├── tassignemptytuple.nim │ ├── tauto_canbe_void.nim │ ├── tauto_excessive.nim │ ├── tcast1.nim │ ├── tcyclic.nim │ ├── temptyseqs.nim │ ├── texportgeneric.nim │ ├── tfinalobj.nim │ ├── tforwty.nim │ ├── tforwty2.nim │ ├── thard_tyforward.nim │ ├── tillegalrecursion3.nim │ ├── tillegalseqrecursion.nim │ ├── tillegaltuplerecursion.nim │ ├── tillegaltuplerecursiongeneric.nim │ ├── tillegaltuplerecursiongeneric2.nim │ ├── tillegaltyperecursion.nim │ ├── tillegaltyperecursion2.nim │ ├── tillegaltyperecursion3.nim │ ├── tillrec.nim │ ├── tinfiniterecursion.nim │ ├── tinheritgenericparameter.nim │ ├── tinheritpartialgeneric.nim │ ├── tinheritref.nim │ ├── tisopr.nim │ ├── tissues_types.nim │ ├── titerable.nim │ ├── tlent_var.nim │ ├── tnontype.nim │ ├── told_pragma_syntax1.nim │ ├── told_pragma_syntax2.nim │ ├── tparameterizedparent0.nim │ ├── tparameterizedparent1.nim │ ├── tparameterizedparent2.nim │ ├── tparameterizedparent3.nim │ ├── tparameterizedparent4.nim │ ├── tresemtypesection.nim │ ├── ttopdowninference.nim │ ├── ttypeofobjconstr.nim │ └── tyet_another_generic_regression.nim ├── untestable │ ├── gdb │ │ ├── gdb_pretty_printer_test.py │ │ ├── gdb_pretty_printer_test_program.nim │ │ └── gdb_pretty_printer_test_run.sh │ ├── network │ │ ├── README.md │ │ └── stdlib │ │ │ └── tnet.nim │ ├── readme.markdown │ ├── thttpclient_ssl_disabled.nim │ ├── thttpclient_ssl_env_var.nim │ ├── thttpclient_ssl_remotenetwork.nim │ ├── tpostgres.nim │ └── tssl.nim ├── usingstmt │ └── tusingstmt.nim ├── valgrind │ ├── tbasic_valgrind.nim │ └── tleak_arc.nim ├── varres │ ├── tnewseq_on_result_vart.nim │ ├── tprevent_forloopvar_mutations.nim │ ├── tvarres0.nim │ ├── tvarres1.nim │ ├── tvarres2.nim │ ├── tvarres3.nim │ ├── tvarres4.nim │ ├── tvarres_via_forwarding.nim │ ├── tvartup.nim │ └── twrong_parameter.nim ├── varstmt │ ├── tlet.nim │ └── tvardecl.nim ├── views │ ├── t19986.nim │ ├── tcan_compile_nim.nim │ ├── tcannot_borrow.nim │ ├── tconst_views.nim │ ├── tdont_mutate.nim │ ├── tmust_borrow_from_first_parameter.nim │ ├── tsplit_into_openarray.nim │ ├── tsplit_into_seq.nim │ ├── tsplit_into_table.nim │ ├── tviews1.nim │ └── tviews2.nim ├── vm │ ├── meta.nim │ ├── mevalffi.nim │ ├── mscriptcompiletime.nim │ ├── t11637.nim │ ├── t17039.nim │ ├── t17121.nim │ ├── t18103.nim │ ├── t19075.nim │ ├── t19199.nim │ ├── t20746.nim │ ├── t21704.nim │ ├── t2574.nim │ ├── t9622.nim │ ├── tableinstatic.nim │ ├── taddrof.nim │ ├── tanonproc.nim │ ├── tarrayboundeval.nim │ ├── tasmparser.nim │ ├── tbitops.nim │ ├── tcaseobj.nim │ ├── tcastint.nim │ ├── tcgemptycallarg.nim │ ├── tclosureiterator.nim │ ├── tcnstseq.nim │ ├── tcompilesetting.nim │ ├── tcompiletimerange.nim │ ├── tcompiletimesideeffects.nim │ ├── tcompiletimetable.nim │ ├── tcomponent.nim │ ├── tconst.nim │ ├── tconst_float_as_int.nim │ ├── tconstarrayresem.nim │ ├── tconstarrayresem2.nim │ ├── tconstobj.nim │ ├── tconstprocassignments.nim │ ├── tconstresem.nim │ ├── tconstscope1.nim │ ├── tconstscope2.nim │ ├── tconststaticvar.nim │ ├── tconststaticvar2.nim │ ├── tconststaticvar3.nim │ ├── tconststaticvar_wrong.nim │ ├── tconsttable.nim │ ├── tconsttable2.nim │ ├── tconvaddr.nim │ ├── tcopy_global_var.nim │ ├── teval1.nim │ ├── texception.nim │ ├── texcl.nim │ ├── textensionmap.nim │ ├── tfarjump.nim │ ├── tfibconst.nim │ ├── tfile_rw.nim │ ├── tforwardproc.nim │ ├── tgenericcompiletimeproc.nim │ ├── tgloballetfrommacro.nim │ ├── tgorge.bat │ ├── tgorge.nim │ ├── tgorge.sh │ ├── tgorgeex.bat │ ├── tgorgeex.sh │ ├── tinfiniterecursion.nim │ ├── tinheritance.nim │ ├── tissues.nim │ ├── tldconst.nim │ ├── tmanyregs.nim │ ├── tmaxloopiterations.nim │ ├── tmisc_vm.nim │ ├── tmitems_vm.nim │ ├── tnewseqofcap.nim │ ├── tnilclosurecall.nim │ ├── tnilclosurecallstacktrace.nim │ ├── tnilref.nim │ ├── tnimnode.nim │ ├── tnocompiletimefunc.nim │ ├── tnocompiletimefunclambda.nim │ ├── tnoreturn.nim │ ├── topenarrays.nim │ ├── toverflowopcaddimmint.nim │ ├── toverflowopcaddint.nim │ ├── toverflowopcmulint.nim │ ├── toverflowopcsubimmint.nim │ ├── toverflowopcsubint.nim │ ├── tquadplus.nim │ ├── tref.nim │ ├── treset.nim │ ├── triangle_array.nim │ ├── tscriptcompiletime.nims │ ├── tseq_badinit.nim │ ├── tsetlen.nim │ ├── tsetrange.nim │ ├── tsignaturehash.nim │ ├── tsimpleglobals.nim │ ├── tslow_tables.nim │ ├── tslurp.nim │ ├── tstaticprintseq.nim │ ├── tstring_openarray.nim │ ├── tstringnil.nim │ ├── tswap.nim │ ├── ttouintconv.nim │ ├── ttypedesc.nim │ ├── tunsupportedintfloatcast.nim │ ├── tvarsection.nim │ ├── tvmmisc.nim │ ├── tvmops.nim │ ├── tvmopsDanger.nim │ ├── twrong_concat.nim │ ├── twrongarray.nim │ ├── twrongconst.nim │ ├── twrongwhen.nim │ ├── tyaytypedesc.nim │ └── tzero_extend.nim ├── whenstmt │ ├── t12517.nim │ ├── t19426.nim │ ├── twhen.nim │ └── twhen_macro.nim └── xml │ ├── ttree_add.nim │ ├── ttree_add1.nim │ ├── ttree_delete.nim │ ├── ttree_delete1.nim │ ├── ttree_insert.nim │ ├── ttree_insert1.nim │ ├── ttree_replace.nim │ └── ttree_replace1.nim └── tools ├── UnicodeData.txt ├── atlas └── parse_requires.nim ├── ci_generate.nim ├── ci_testresults.nim ├── cmerge.nim ├── compiler.gdb ├── compiler.lldb ├── debug ├── customdebugtype.nim ├── nim-gdb.py └── nimlldb.py ├── deps.nim ├── detect ├── .gitignore ├── detect.nim ├── macosx_consts.nim ├── timesize.c ├── windows_amd64_consts.nim └── windows_i386_consts.nim ├── dochack ├── dochack.nim └── fuzzysearch.nim ├── downloader.nim ├── fakedeps.nim ├── finish.nim ├── grammar_nanny.nim ├── heapdump2dot.nim ├── heapdumprepl.nim ├── kochdocs.nim ├── nim.bash-completion ├── nim.zsh-completion ├── nimblepkglist.nim ├── nimgrab.nim ├── nimgrep.bash-completion ├── nimgrep.nim ├── nimgrind.supp ├── niminst ├── EnvVarUpdate.nsh ├── buildbat.nimf ├── buildsh.nimf ├── debcreation.nim ├── deinstall.nimf ├── inno.nimf ├── install.nimf ├── makefile.nimf ├── nim-file.ico ├── niminst.nim ├── nsis.nimf ├── setup.ico └── uninstall.ico ├── nimpretty.bash-completion ├── nimsuggest.bash-completion ├── officialpackages.nim ├── restorecc.nim ├── ssl_config_parser.nim ├── ssl_config_parser.nims ├── start.bat ├── trimcc.nim ├── unicode_parsedata.nim ├── vccexe ├── vccenv.nim ├── vccexe.nim ├── vccvswhere.nim └── vcvarsall.nim └── winrelease.nim /bin/empty.txt: -------------------------------------------------------------------------------- 1 | This file keeps several tools from deleting this subdirectory. 2 | -------------------------------------------------------------------------------- /build/empty.txt: -------------------------------------------------------------------------------- 1 | This file keeps several tools from deleting this subdirectory. 2 | -------------------------------------------------------------------------------- /compiler/plugins/plugins.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/compiler/plugins/plugins.nimble -------------------------------------------------------------------------------- /config/rename.rules.cfg: -------------------------------------------------------------------------------- 1 | TSignedInt 2 | TUnsignedInt 3 | TOrdinal 4 | TReal 5 | TNumber 6 | TEnum 7 | TObject 8 | TResult 9 | TOpenArray 10 | -------------------------------------------------------------------------------- /doc/overview.md: -------------------------------------------------------------------------------- 1 | ============================= 2 | Nim Documentation Overview 3 | ============================= 4 | 5 | :Author: Andreas Rumpf 6 | :Version: |nimversion| 7 | 8 | .. include:: docs.md 9 | 10 | -------------------------------------------------------------------------------- /icons/koch-amd64-windows-vcc.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/koch-amd64-windows-vcc.res -------------------------------------------------------------------------------- /icons/koch-i386-windows-vcc.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/koch-i386-windows-vcc.res -------------------------------------------------------------------------------- /icons/koch.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/koch.ico -------------------------------------------------------------------------------- /icons/koch.rc: -------------------------------------------------------------------------------- 1 | kochicon ICON "koch.ico" 2 | 3 | 4 | -------------------------------------------------------------------------------- /icons/koch.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/koch.res -------------------------------------------------------------------------------- /icons/koch_icon.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/koch_icon.o -------------------------------------------------------------------------------- /icons/nim-amd64-windows-vcc.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/nim-amd64-windows-vcc.res -------------------------------------------------------------------------------- /icons/nim-i386-windows-vcc.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/nim-i386-windows-vcc.res -------------------------------------------------------------------------------- /icons/nim.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/nim.ico -------------------------------------------------------------------------------- /icons/nim.rc: -------------------------------------------------------------------------------- 1 | nimicon ICON "nim.ico" 2 | 3 | 4 | -------------------------------------------------------------------------------- /icons/nim.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/nim.res -------------------------------------------------------------------------------- /icons/nim_icon.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/icons/nim_icon.o -------------------------------------------------------------------------------- /koch.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:booting 2 | 3 | @if openbsd: 4 | # because openbsd getAppFilename was broken in v0.20.0 5 | # workaround see https://github.com/nim-lang/Nim/pull/14291 6 | --lib:lib 7 | @end 8 | -------------------------------------------------------------------------------- /lib/deprecated/pure/future.nim: -------------------------------------------------------------------------------- 1 | ## This module is a deprecated alias for the `sugar` module. Deprecated since 0.19.0. 2 | 3 | {.deprecated: "Use the new 'sugar' module instead".} 4 | 5 | import std/sugar 6 | export sugar 7 | -------------------------------------------------------------------------------- /lib/impure/nre/.gitignore: -------------------------------------------------------------------------------- 1 | # all executables 2 | * 3 | !*/ 4 | !*.* 5 | *.exe 6 | 7 | # Wildcard patterns. 8 | *.swp 9 | nimcache 10 | -------------------------------------------------------------------------------- /lib/nimhcr.nim.cfg: -------------------------------------------------------------------------------- 1 | --app:lib 2 | --threads:on 3 | -d:useNimRtl 4 | -d:createNimHcr 5 | 6 | -------------------------------------------------------------------------------- /lib/nimrtl.nim.cfg: -------------------------------------------------------------------------------- 1 | # The RTL.dll needs to be compiled with these options! 2 | 3 | --app:lib 4 | --threads:on 5 | --define:createNimRtl 6 | 7 | -------------------------------------------------------------------------------- /lib/pure/asyncdispatch.nim.cfg: -------------------------------------------------------------------------------- 1 | @if nimdoc: 2 | --os:linux 3 | @end 4 | -------------------------------------------------------------------------------- /lib/pure/concurrency/threadpool.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on 2 | -------------------------------------------------------------------------------- /lib/pure/coro.nimcfg: -------------------------------------------------------------------------------- 1 | -d:nimCoroutines 2 | -------------------------------------------------------------------------------- /lib/pure/nimprof.nim.cfg: -------------------------------------------------------------------------------- 1 | --profiler:on 2 | -------------------------------------------------------------------------------- /lib/stdlib.nimble: -------------------------------------------------------------------------------- 1 | 2 | version = system.NimVersion 3 | author = "Dominik Picheta" 4 | description = "Nim's standard library." 5 | license = "MIT" 6 | -------------------------------------------------------------------------------- /lib/system/formatfloat.nim: -------------------------------------------------------------------------------- 1 | when not defined(nimPreviewSlimSystem): 2 | import std/formatfloat 3 | export formatfloat 4 | {.deprecated: "use `std/formatfloat`".} 5 | else: 6 | {.error: "use `std/formatfloat`".} 7 | -------------------------------------------------------------------------------- /nimdoc/extlinks/project/expected/_._/util.idx: -------------------------------------------------------------------------------- 1 | nimTitle util _._/util.html module nimdoc/extlinks/util 0 2 | nim utilfunction _._/util.html#utilfunction,int proc utilfunction(x: int): int 1 3 | -------------------------------------------------------------------------------- /nimdoc/extlinks/util.nim: -------------------------------------------------------------------------------- 1 | proc utilfunction*(x: int): int = 2 | x + 42 3 | -------------------------------------------------------------------------------- /nimdoc/test_out_index_dot_html/expected/foo.idx: -------------------------------------------------------------------------------- 1 | nimTitle foo index.html module nimdoc/test_out_index_dot_html/foo 0 2 | nim foo index.html#foo proc foo() 1 3 | -------------------------------------------------------------------------------- /nimdoc/test_out_index_dot_html/foo.nim: -------------------------------------------------------------------------------- 1 | proc foo*() = 2 | ## I do foo 3 | echo "foo says hello!" 4 | -------------------------------------------------------------------------------- /nimdoc/testproject/testproject.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/nimdoc/testproject/testproject.nimble -------------------------------------------------------------------------------- /nimpretty/nimpretty.nim.cfg: -------------------------------------------------------------------------------- 1 | --define: nimpretty 2 | -------------------------------------------------------------------------------- /nimpretty/tests/expected/simple4.nim: -------------------------------------------------------------------------------- 1 | proc readBuffer*(f: AsyncFile, buf: pointer, size: int): Future[int] = 2 | discard 3 | -------------------------------------------------------------------------------- /nimpretty/tests/simple4.nim: -------------------------------------------------------------------------------- 1 | proc readBuffer*(f: AsyncFile, buf: pointer, size: int): Future[int] = 2 | discard 3 | -------------------------------------------------------------------------------- /nimsuggest/config.nims: -------------------------------------------------------------------------------- 1 | # xxx not sure why this flag isn't needed: switch("processing", "filenames") 2 | switch("filenames", "canonical") 3 | -------------------------------------------------------------------------------- /nimsuggest/tests/fixtures/mdep_v1.nim: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | type 7 | Foo* = object 8 | x*, y*: int 9 | -------------------------------------------------------------------------------- /nimsuggest/tests/fixtures/mdep_v2.nim: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | type 7 | Foo* = object 8 | x*, y*: int 9 | z*: string 10 | -------------------------------------------------------------------------------- /nimsuggest/tests/fixtures/mfakeassert.nim: -------------------------------------------------------------------------------- 1 | # Template for testing defs 2 | 3 | template fakeAssert*(cond: untyped, msg: string = "") = 4 | ## template to allow def lookup testing 5 | if not cond: quit(1) 6 | -------------------------------------------------------------------------------- /nimsuggest/tests/fixtures/minclude_types.nim: -------------------------------------------------------------------------------- 1 | # types used by minclude_* (import or include), to find with def in include 2 | 3 | type 4 | Greet* = object 5 | greeting*: string 6 | subject*: string -------------------------------------------------------------------------------- /nimsuggest/tests/module_20265.nim: -------------------------------------------------------------------------------- 1 | type A* = tuple 2 | a: int 3 | b: int 4 | 5 | var x*: A = (a: 2, b: 10) 6 | var y* = (a: 2, b: 10) 7 | -------------------------------------------------------------------------------- /nimsuggest/tests/t20440.nim: -------------------------------------------------------------------------------- 1 | when not defined(js): 2 | {.fatal: "Crash".} 3 | echo 4 4 | 5 | discard """ 6 | $nimsuggest --v3 --tester $file 7 | """ 8 | -------------------------------------------------------------------------------- /nimsuggest/tests/t20440.nims: -------------------------------------------------------------------------------- 1 | switch("backend", "js") 2 | -------------------------------------------------------------------------------- /nimsuggest/tests/t22448.nim: -------------------------------------------------------------------------------- 1 | proc fn(a: static float) = discard 2 | proc fn(a: int) = discard 3 | 4 | let x = 1 5 | fn(x) 6 | 7 | discard """ 8 | $nimsuggest --tester --v3 $file 9 | >chk $file 10 | chk;;skUnknown;;;;Hint;;* 11 | """ 12 | -------------------------------------------------------------------------------- /nimsuggest/tests/taccent_highlight.nim: -------------------------------------------------------------------------------- 1 | proc `$$$`#[!]# 2 | 3 | discard """ 4 | $nimsuggest --tester $file 5 | >highlight $1 6 | highlight;;skProc;;1;;6;;3 7 | """ 8 | -------------------------------------------------------------------------------- /nimsuggest/tests/tdef_let.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | $nimsuggest --tester $file 3 | >def $1 4 | def;;skLet;;tdef_let.intVar;;int;;$file;;7;;4;;"";;100 5 | """ 6 | 7 | let int#[!]#Var = 10 8 | -------------------------------------------------------------------------------- /nimsuggest/tests/timport1.nim: -------------------------------------------------------------------------------- 1 | import bito#[!]# 2 | 3 | discard """ 4 | $nimsuggest --tester --v4 --maxresults:1 $file 5 | >sug $1 6 | sug;;skModule;;bitops;;;;bitops;;1;;0;;"";;100;;None 7 | """ -------------------------------------------------------------------------------- /nimsuggest/tests/tsug_recursive.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | $nimsuggest --tester $file 3 | >sug $1 4 | sug;;skProc;;tsug_recursive.fooBar;;proc ();;$file;;7;;5;;"";;100;;Prefix 5 | """ 6 | 7 | proc fooBar() = 8 | fooBa#[!]# 9 | -------------------------------------------------------------------------------- /nimsuggest/tests/tv3_definition.nim: -------------------------------------------------------------------------------- 1 | 2 | let foo = 30 3 | let bar = foo + fo#[!]#o + foo 4 | 5 | discard """ 6 | $nimsuggest --v3 --tester $file 7 | >def $1 8 | def skLet tv3_definition.foo int $file 2 4 "" 100 9 | """ 10 | -------------------------------------------------------------------------------- /nimsuggest/tests/tv3_import.nim: -------------------------------------------------------------------------------- 1 | import tv#[!]#3 2 | 3 | discard """ 4 | $nimsuggest --v3 --tester $file 5 | >def $1 6 | def skModule tv3 */tv3.nim 1 0 "" 100 7 | """ 8 | -------------------------------------------------------------------------------- /testament/lib/readme.md: -------------------------------------------------------------------------------- 1 | This directory contains helper files used by several tests, to avoid 2 | code duplication, akin to a std extension tailored for testament. 3 | 4 | Some of these could later migrate to stdlib. 5 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/tccodecheck.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | ccodecheck: "baz" 3 | """ 4 | 5 | proc foo(): void {.exportc: "bar".}= 6 | echo "Hello World" 7 | 8 | foo() 9 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/tcolumn.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: 'undeclared'" 3 | line: 9 4 | column: 7 5 | """ 6 | 7 | # test should fail because the line directive is wrong 8 | echo undeclared 9 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/terrormsg.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "wrong error message" 3 | line: 9 4 | column: 6 5 | """ 6 | 7 | # test should fail because the line directive is wrong 8 | echo undeclared 9 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/texitcode1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | exitcode: 1 3 | """ 4 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/tfile.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: 'undefined'" 3 | file: "notthisfile.nim" 4 | """ 5 | 6 | echo undefined 7 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/tline.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: 'undeclared'" 3 | line: 10 4 | column: 6 5 | """ 6 | 7 | # test should fail because the line directive is wrong 8 | echo undeclared 9 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/tmaxcodesize.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | maxcodesize: 1 3 | """ 4 | 5 | echo "Hello World" 6 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/tnimout.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | nimout: "Hello World!" 3 | action: compile 4 | """ 5 | 6 | static: 7 | echo "something else" 8 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/toutput.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | done 4 | ''' 5 | """ 6 | 7 | echo "broken" 8 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/toutputsub.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | outputsub: "something else" 3 | """ 4 | 5 | echo "Hello World!" 6 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/treject.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: "reject" 3 | """ 4 | 5 | # Because we set action="reject", we expect this line not to compile. But the 6 | # line does compile, therefore the test fails. 7 | assert true 8 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/tsortoutput.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | sortoutput: true 3 | output: ''' 4 | 2 5 | 1 6 | ''' 7 | """ 8 | 9 | # this test should ensure that the output is actually sorted 10 | echo "2" 11 | echo "1" 12 | -------------------------------------------------------------------------------- /testament/tests/shouldfail/ttimeout.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | timeout: "0.1" 3 | """ 4 | 5 | import os 6 | 7 | os.sleep(1000) 8 | -------------------------------------------------------------------------------- /tests/align/globalalignas.nim: -------------------------------------------------------------------------------- 1 | var myglobal1* {.align(128).}: int32 2 | var myglobal2* {.align(128).}: int32 3 | var myglobal3* {.align(128).}: int32 4 | -------------------------------------------------------------------------------- /tests/align/tillegalalign.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim check $options $file" 3 | errormsg: "power of two expected" 4 | """ 5 | 6 | proc foobar() = 7 | let something {.align(33).} = 123 8 | -------------------------------------------------------------------------------- /tests/arc/bmodule.nim: -------------------------------------------------------------------------------- 1 | import cmodule 2 | 3 | for i in @[1, 2, 3].cycle(): 4 | echo i 5 | -------------------------------------------------------------------------------- /tests/arc/cmodule.nim: -------------------------------------------------------------------------------- 1 | iterator cycle*[T](s: openArray[T]): T = 2 | let s = @s 3 | for x in s: 4 | yield x 5 | -------------------------------------------------------------------------------- /tests/arc/m24764.nim: -------------------------------------------------------------------------------- 1 | type QObject* {.inheritable.} = object 2 | proc `=destroy`(self: var QObject) = discard 3 | proc `=sink`(dest: var QObject, source: QObject) = discard 4 | proc `=copy`(dest: var QObject, source: QObject) {.error.} -------------------------------------------------------------------------------- /tests/arc/nim.cfg: -------------------------------------------------------------------------------- 1 | --sinkInference:on 2 | --warningAserror:ProveInit 3 | --warningAserror:Uninit -------------------------------------------------------------------------------- /tests/arc/t14864.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --gc:arc $file" 3 | """ 4 | 5 | import bmodule 6 | -------------------------------------------------------------------------------- /tests/arc/t16033.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c js" 3 | matrix: "--gc:arc" 4 | """ 5 | 6 | # bug #16033 7 | when defined js: 8 | doAssert not compileOption("gc", "arc") 9 | else: 10 | doAssert compileOption("gc", "arc") 11 | -------------------------------------------------------------------------------- /tests/arc/t16458.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--gc:orc --d:useNimRtl" 3 | action: "compile" 4 | """ 5 | 6 | echo 134 -------------------------------------------------------------------------------- /tests/arc/t16558.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--gc:arc" 3 | errormsg: "expression cannot be cast to 'int'" 4 | """ 5 | 6 | block: # bug #16558 7 | var value = "hi there" 8 | var keepInt: int 9 | keepInt = cast[int](value) 10 | -------------------------------------------------------------------------------- /tests/arc/t17173.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--gc:refc; --gc:arc" 3 | """ 4 | 5 | import std/strbasics 6 | 7 | 8 | var a = " vhellov " 9 | strip(a) 10 | doAssert a == "vhellov" 11 | -------------------------------------------------------------------------------- /tests/arc/t18971.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --gc:arc $file" 3 | """ 4 | 5 | type MyObj = ref object 6 | 7 | var o = MyObj() 8 | proc x: var MyObj = o 9 | 10 | var o2 = x() 11 | -------------------------------------------------------------------------------- /tests/arc/t20456.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim check $file" 3 | action: "compile" 4 | """ 5 | 6 | when not defined(gcOrc): 7 | {.error: "orc".} 8 | -------------------------------------------------------------------------------- /tests/arc/tamodule.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | abcde 4 | 0 5 | ''' 6 | cmd: "nim c --gc:arc $file" 7 | """ 8 | 9 | import amodule 10 | -------------------------------------------------------------------------------- /tests/arc/testfile.txt: -------------------------------------------------------------------------------- 1 | 1 x 2 | 2 y 3 | -------------------------------------------------------------------------------- /tests/arc/tinvalidenumtostr.nim: -------------------------------------------------------------------------------- 1 | # issue #24875 2 | 3 | type 4 | MyEnum = enum 5 | One = 1 6 | 7 | var x = cast[MyEnum](0) 8 | let s = $x 9 | doAssert s == "" 10 | -------------------------------------------------------------------------------- /tests/array/tgenericindex.nim: -------------------------------------------------------------------------------- 1 | block: # issue #13184 2 | type 3 | TypeClass = uint | enum | int 4 | ArrayAlias[I: TypeClass] = array[I, int] 5 | 6 | proc test[I: TypeClass](points: ArrayAlias[I]) = 7 | discard 8 | -------------------------------------------------------------------------------- /tests/array/tidx_lit_err1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "size of array exceeds range of index type 'range 1..2(Color)' by 3 elements" 3 | line: 6 4 | """ 5 | type Color = enum Red, Green, Blue 6 | let y = [Green: 0, 1, 2, 3, 4] 7 | -------------------------------------------------------------------------------- /tests/array/tidx_lit_err2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "expected ordinal value for array index, got '\"string\"'" 3 | line: 5 4 | """ 5 | let x = ["string": 0, "index": 1] 6 | -------------------------------------------------------------------------------- /tests/array/tidx_lit_err3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "size of array exceeds range of index type 'range 2147483646..2147483647(int32)' by 1 elements" 3 | line: 5 4 | """ 5 | echo [high(int32)-1: 1, 2, 3] 6 | -------------------------------------------------------------------------------- /tests/array/tindexconv.nim: -------------------------------------------------------------------------------- 1 | block: # issue #17958 2 | var mem: array[uint8, uint8] 3 | let val = 0xffff'u16 4 | discard mem[uint8 val] # Error: unhandled exception: index 65535 not in 0 .. 255 [IndexDefect] 5 | -------------------------------------------------------------------------------- /tests/assert/config.nims: -------------------------------------------------------------------------------- 1 | --excessiveStackTrace:on 2 | -------------------------------------------------------------------------------- /tests/assert/t21195.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--verbosity:0 --os:standalone --mm:none" 3 | """ 4 | # bug #21195 5 | var n = 11 6 | assert(n == 12) 7 | -------------------------------------------------------------------------------- /tests/assert/tunittests.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "" 3 | """ 4 | import "../template/utemplates", "../closure/uclosures" 5 | -------------------------------------------------------------------------------- /tests/async/hello.txt: -------------------------------------------------------------------------------- 1 | hello humans! -------------------------------------------------------------------------------- /tests/async/nim.cfg: -------------------------------------------------------------------------------- 1 | --experimental:strictEffects 2 | -------------------------------------------------------------------------------- /tests/async/t21447.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: "compile" 3 | cmd: "nim c -d:release -d:futureLogging $file" 4 | """ 5 | 6 | import std/asyncdispatch 7 | -------------------------------------------------------------------------------- /tests/async/tioselectors.nim.cfg: -------------------------------------------------------------------------------- 1 | threads:on -d:threadsafe 2 | -------------------------------------------------------------------------------- /tests/async/ttemplateinasync.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: 42 3 | """ 4 | 5 | import asyncdispatch 6 | 7 | proc foo(): Future[int] {.async.} = 8 | template ret() = return 42 9 | ret() 10 | 11 | echo (waitFor foo()) 12 | -------------------------------------------------------------------------------- /tests/avr/thello.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --compileOnly --os:standalone --exceptions:quirky -d:noSignalHandler -d:danger --threads:off $file" 3 | action: "compile" 4 | """ 5 | 6 | echo "hi" 7 | -------------------------------------------------------------------------------- /tests/benchmarks/readme.md: -------------------------------------------------------------------------------- 1 | # Collection of benchmarks 2 | 3 | In future work, benchmarks can be added to CI, but for now we provide benchmarks that can be run locally. 4 | 5 | See RFC: https://github.com/timotheecour/Nim/issues/425 6 | -------------------------------------------------------------------------------- /tests/c/tcompile.c: -------------------------------------------------------------------------------- 1 | int foo(int a, int b) { 2 | return a+b; 3 | } 4 | -------------------------------------------------------------------------------- /tests/c/tcompile.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''44''' 3 | joinable: "false" 4 | """ 5 | 6 | {.compile: "tcompile.c".} 7 | 8 | proc foo(a, b: cint): cint {.importc: "foo", cdecl.} 9 | 10 | echo foo(40, 4) 11 | -------------------------------------------------------------------------------- /tests/c/timportedsize.nim: -------------------------------------------------------------------------------- 1 | {.emit: """ 2 | typedef struct Foo { 3 | NI64 a; 4 | NI64 b; 5 | } Foo; 6 | """.} 7 | 8 | type Foo {.importc: "Foo", size: 16.} = object 9 | 10 | var x: Foo 11 | -------------------------------------------------------------------------------- /tests/casestmt/tcase_issues.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c js" 3 | """ 4 | 5 | block: # bug #24031 6 | case 0 7 | else: discard -------------------------------------------------------------------------------- /tests/casestmt/trangeexhaustiveness.nim: -------------------------------------------------------------------------------- 1 | block: # issue #22661 2 | template foo(a: typed) = 3 | a 4 | 5 | foo: 6 | case false 7 | of false..true: discard 8 | -------------------------------------------------------------------------------- /tests/ccgbugs/m1/defs.nim: -------------------------------------------------------------------------------- 1 | type MyObj* = object 2 | field1*: int 3 | s*: string 4 | ch*: char 5 | -------------------------------------------------------------------------------- /tests/ccgbugs/m19445.c: -------------------------------------------------------------------------------- 1 | #include "m19445.h" 2 | 3 | const Foo f = {10, 20, 30, 40}; -------------------------------------------------------------------------------- /tests/ccgbugs/m2/defs.nim: -------------------------------------------------------------------------------- 1 | type MyObj* = object 2 | s*: string 3 | field1*: int 4 | ch*: char 5 | -------------------------------------------------------------------------------- /tests/ccgbugs/mstatic_assert.nim: -------------------------------------------------------------------------------- 1 | {.emit:""" 2 | NIM_STATIC_ASSERT(sizeof(bool) == 1, ""); 3 | #warning "foo2" 4 | NIM_STATIC_ASSERT(sizeof(bool) == 2, ""); 5 | #warning "foo3" 6 | """.} 7 | -------------------------------------------------------------------------------- /tests/ccgbugs/pkg8616/rtarray.nim: -------------------------------------------------------------------------------- 1 | proc head*[T](pp: var array[1,T]): var T = 2 | result = pp[0] 3 | -------------------------------------------------------------------------------- /tests/ccgbugs/pkg8616/scheduler.nim: -------------------------------------------------------------------------------- 1 | import rtarray 2 | 3 | type 4 | T = tuple[x:int] 5 | 6 | var 7 | arr: array[1,T] 8 | 9 | proc init*() = 10 | discard head(arr) 11 | -------------------------------------------------------------------------------- /tests/ccgbugs/t10964.nim: -------------------------------------------------------------------------------- 1 | func test*(input: var openArray[int32], start: int = 0, fin: int = input.len - 1) = 2 | discard 3 | 4 | var someSeq = @[1'i32] 5 | 6 | test(someSeq) 7 | # bug with gcc 14 -------------------------------------------------------------------------------- /tests/ccgbugs/t19585.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c cpp" 3 | """ 4 | 5 | # bug #19585 6 | 7 | type 8 | X* {.exportc.} = object 9 | v: int 10 | 11 | {.emit:""" 12 | X x = { 1234 }; 13 | """.} -------------------------------------------------------------------------------- /tests/ccgbugs/t20787.nim: -------------------------------------------------------------------------------- 1 | type 2 | Obj = object 3 | f: UncheckedArray[byte] 4 | let o = new Obj -------------------------------------------------------------------------------- /tests/ccgbugs/t21116.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c cpp" 3 | disabled: windows 4 | """ 5 | # bug #21116 6 | import std/os 7 | 8 | proc p(glob: string) = 9 | for _ in walkFiles(glob): discard 10 | p("dir/*") 11 | -------------------------------------------------------------------------------- /tests/ccgbugs/t21995.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c cpp" 3 | output: "Hi!" 4 | """ 5 | 6 | try: 7 | raise 8 | except ReraiseDefect: 9 | echo "Hi!" -------------------------------------------------------------------------------- /tests/ccgbugs/t5345.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: true 3 | """ 4 | 5 | proc cmpx(d: int): bool {.inline.} = d > 0 6 | 7 | proc abc[C](cx: C, d: int) = 8 | echo cx(d) 9 | 10 | abc(cmpx, 10) 11 | -------------------------------------------------------------------------------- /tests/ccgbugs/t7079.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: run 3 | targets: '''c js''' 4 | """ 5 | 6 | import math 7 | let x = -0.0 8 | doAssert classify(x) == fcNegZero 9 | doAssert classify(1 / -0.0) == fcNegInf -------------------------------------------------------------------------------- /tests/ccgbugs/t8616.nim: -------------------------------------------------------------------------------- 1 | import pkg8616 / scheduler 2 | 3 | when true: 4 | init() 5 | -------------------------------------------------------------------------------- /tests/ccgbugs/t9098.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c cpp js" 3 | output: ''' 4 | {'a', 'b'} 5 | ''' 6 | """ 7 | 8 | var x = new(ref set[char]) 9 | var y = new(ref set[char]) 10 | x[] = {'a'} 11 | y[] = {'b'} 12 | echo x[] + y[] 13 | -------------------------------------------------------------------------------- /tests/ccgbugs/tborrowmagic.nim: -------------------------------------------------------------------------------- 1 | type 2 | Bytes = distinct seq[byte] 3 | 4 | proc add(x: var Bytes; b: byte) {.borrow.} 5 | var x = @[].Bytes 6 | x.add(42) 7 | let base = cast[seq[byte]](x) 8 | doAssert base.len == 1 and base[0] == 42 9 | -------------------------------------------------------------------------------- /tests/ccgbugs/tcodegenbug_bool.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | """ 3 | 4 | # issue #13798 5 | {.emit:""" 6 | #include 7 | void fun(bool a){} 8 | """.} 9 | 10 | proc fun(a: bool) {.importc.} 11 | fun(true) 12 | -------------------------------------------------------------------------------- /tests/ccgbugs/tcompile_time_var_at_runtime.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "1\n2\n2\n3" 3 | """ 4 | var a {.compileTime.} = 1 5 | 6 | echo a 7 | a = 2 8 | echo a 9 | echo a 10 | a = 3 11 | echo a -------------------------------------------------------------------------------- /tests/ccgbugs/thtiobj.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--mm:refc" 3 | targets: "c cpp" 4 | """ 5 | 6 | import typeinfo 7 | 8 | var x = "" 9 | discard (getPointer(toAny(x))) 10 | -------------------------------------------------------------------------------- /tests/ccgbugs/topenarraycast.nim: -------------------------------------------------------------------------------- 1 | proc foo[T](s: var openArray[T]): T = 2 | for x in s: result += x 3 | 4 | proc bar(xyz: var seq[int]) = 5 | doAssert 6 == (seq[int](xyz)).foo() 6 | 7 | var t = @[1,2,3] 8 | bar(t) 9 | -------------------------------------------------------------------------------- /tests/ccgbugs/tsequence_outoforder.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''@[2]''' 3 | """ 4 | 5 | # bug #9684 6 | 7 | var s2 = @[2, 2] 8 | 9 | s2 = @[s2.len] 10 | 11 | echo s2 12 | -------------------------------------------------------------------------------- /tests/ccgbugs/tuplecast.nim: -------------------------------------------------------------------------------- 1 | 2 | # bug #4345 3 | 4 | # only needs to compile 5 | proc f(): tuple[a, b: uint8] = (1'u8, 2'u8) 6 | 7 | let a, b = f() 8 | let c = cast[int](b) 9 | -------------------------------------------------------------------------------- /tests/ccgbugs/tweakopenarray.nim: -------------------------------------------------------------------------------- 1 | # bug #4089 2 | 3 | type 4 | Proc = proc(args: openArray[Bar]): Bar 5 | 6 | Foo = object 7 | p: Proc 8 | 9 | Bar = object 10 | f: Foo 11 | 12 | proc bar(val: Foo): Bar = Bar() 13 | -------------------------------------------------------------------------------- /tests/ccgbugs/xarray9578.nim: -------------------------------------------------------------------------------- 1 | import t9578 2 | 3 | proc testArray*(x: var array[3,mytype]) = 4 | f(x[0].addr) 5 | 6 | proc testArray2*(x: var ptr array[3,mytype]) = 7 | f(x[0].addr) 8 | -------------------------------------------------------------------------------- /tests/ccgbugs/xoa9578.nim: -------------------------------------------------------------------------------- 1 | import t9578 2 | 3 | proc testOpenArray*(x: var openArray[mytype]) = 4 | f(x[0].addr) 5 | -------------------------------------------------------------------------------- /tests/ccgbugs/xseq9578.nim: -------------------------------------------------------------------------------- 1 | import t9578 2 | 3 | proc testSeq*(x: var seq[mytype]) = 4 | f(x[0].addr) 5 | 6 | proc testSeq2*(x: var ptr seq[mytype]) = 7 | f(x[0].addr) 8 | -------------------------------------------------------------------------------- /tests/ccgbugs/xtuple9578.nim: -------------------------------------------------------------------------------- 1 | import t9578 2 | 3 | proc testTuple*(x: var tuple[a:mytype,b:mytype,c:mytype]) = 4 | f(x[0].addr) 5 | 6 | proc testTuple2*(x: var ptr tuple[a:mytype,b:mytype,c:mytype]) = 7 | f(x[0].addr) 8 | -------------------------------------------------------------------------------- /tests/ccgbugs/xua9578.nim: -------------------------------------------------------------------------------- 1 | import t9578 2 | 3 | proc testUncheckedArray*(x: var UncheckedArray[mytype]) = 4 | f(x[0].addr) 5 | 6 | proc testUncheckedArray2*(x: var ptr UncheckedArray[mytype]) = 7 | f(x[0].addr) 8 | -------------------------------------------------------------------------------- /tests/closure/t15594.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "The variable name cannot be `result`!" 3 | """ 4 | 5 | import sugar 6 | 7 | proc begin(): int = 8 | capture result: 9 | echo 1+1 10 | result 11 | -------------------------------------------------------------------------------- /tests/closure/tinvalidclosure4.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal capture 'v'" 3 | line: 7 4 | """ 5 | 6 | proc outer(v: int) = 7 | proc b {.nimcall.} = echo v 8 | b() 9 | outer(5) 10 | -------------------------------------------------------------------------------- /tests/compiler/samplelib.nim: -------------------------------------------------------------------------------- 1 | # Sample library used by tcmdlineclib.nim 2 | proc test(): int {.cdecl, exportc, dynlib.} = 123 3 | -------------------------------------------------------------------------------- /tests/compiler/t12684.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim check --hints:off --warnings:off $file" 3 | errormsg: "undeclared identifier: 'Undeclared'" 4 | """ 5 | 6 | var x: Undeclared 7 | import compiler/nimeval 8 | -------------------------------------------------------------------------------- /tests/compiler/tcmdlineclib.nim: -------------------------------------------------------------------------------- 1 | proc test(): int {.importc, cdecl.} 2 | 3 | doAssert test() == 123 4 | -------------------------------------------------------------------------------- /tests/compiler/tcmdlinecpuamd64.nim.cfg: -------------------------------------------------------------------------------- 1 | cpu:i386 2 | -------------------------------------------------------------------------------- /tests/compiler/tcmdlineoswin.nim.cfg: -------------------------------------------------------------------------------- 1 | os:linux 2 | -------------------------------------------------------------------------------- /tests/compiler/tgrammar.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "-d:nimTestGrammar" 3 | """ 4 | 5 | import compiler/parser 6 | 7 | checkSameGrammar() 8 | -------------------------------------------------------------------------------- /tests/compilerapi/exposed.nim: -------------------------------------------------------------------------------- 1 | 2 | proc addFloats*(x, y, z: float): float = 3 | discard "implementation overridden by tcompilerapi.nim" 4 | -------------------------------------------------------------------------------- /tests/compilerapi/invalid.nim: -------------------------------------------------------------------------------- 1 | noSuchProc() 2 | -------------------------------------------------------------------------------- /tests/compiles/mstaticlib.nim: -------------------------------------------------------------------------------- 1 | echo 1234 -------------------------------------------------------------------------------- /tests/compiles/t8630.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | foo 4 | bar 5 | ''' 6 | """ 7 | 8 | proc test(strings: seq[string]) = 9 | for s in strings: 10 | var p3 = addr(s) 11 | echo p3[] 12 | 13 | test(@["foo", "bar"]) 14 | -------------------------------------------------------------------------------- /tests/concepts/conceptsv2_helper.nim: -------------------------------------------------------------------------------- 1 | type 2 | ShadowConcept* = concept 3 | proc iGetShadowed(s: Self) 4 | DummyFitsObj* = object 5 | 6 | proc iGetShadowed*(s: DummyFitsObj)= 7 | discard 8 | 9 | -------------------------------------------------------------------------------- /tests/concepts/t20237.nim: -------------------------------------------------------------------------------- 1 | type Foo* = concept 2 | ## doc comment 3 | proc foo(x: Self) 4 | -------------------------------------------------------------------------------- /tests/concepts/t5888lib/ca.nim: -------------------------------------------------------------------------------- 1 | type 2 | CA* = concept c 3 | c.x is int 4 | 5 | -------------------------------------------------------------------------------- /tests/concepts/t5888lib/opt.nim: -------------------------------------------------------------------------------- 1 | import ca 2 | 3 | type 4 | Opt* = object 5 | x*: int 6 | 7 | -------------------------------------------------------------------------------- /tests/concepts/ttrieconcept.nim: -------------------------------------------------------------------------------- 1 | import libs/[trie_database, trie] 2 | 3 | proc takeDb(d: TrieDatabase) = discard 4 | var mdb: MemDB 5 | 6 | takeDb(mdb) 7 | 8 | -------------------------------------------------------------------------------- /tests/concepts/tvarconcept.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "5" 3 | """ 4 | 5 | # bug #2346, bug #2404 6 | 7 | import mvarconcept 8 | 9 | echo randomInt(5) 10 | -------------------------------------------------------------------------------- /tests/constructors/a.nim: -------------------------------------------------------------------------------- 1 | type A* = object 2 | a: uint8 -------------------------------------------------------------------------------- /tests/constructors/b.nim: -------------------------------------------------------------------------------- 1 | type B* = object 2 | proc A*(a, b: float): B = discard -------------------------------------------------------------------------------- /tests/constructors/t18990.nim: -------------------------------------------------------------------------------- 1 | import a, b 2 | discard A(1f, 1f) # works 3 | proc x(b = A(1f, 1f)) = discard # doesn't work -------------------------------------------------------------------------------- /tests/constructors/t5965_1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "incorrect object construction syntax" 3 | file: "t5965_1.nim" 4 | line: 10 5 | """ 6 | 7 | type Foo = object 8 | a, b, c: int 9 | 10 | discard Foo(a: 1, 2) 11 | -------------------------------------------------------------------------------- /tests/constructors/t5965_2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "incorrect object construction syntax" 3 | file: "t5965_2.nim" 4 | line: 10 5 | """ 6 | 7 | type Foo = object 8 | a: int 9 | 10 | discard Foo(a: 1, 2) 11 | -------------------------------------------------------------------------------- /tests/converter/m18986.nim: -------------------------------------------------------------------------------- 1 | import std/macros 2 | 3 | converter Lit*(x: uint): NimNode = newLit(x) 4 | -------------------------------------------------------------------------------- /tests/converter/mdontleak.nim: -------------------------------------------------------------------------------- 1 | 2 | converter toBool(x: uint32): bool = x != 0 3 | # Note: This convertes is not exported! 4 | -------------------------------------------------------------------------------- /tests/converter/t18986.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "Found a 0" 3 | """ 4 | 5 | import m18986 except Lit 6 | import std/macros 7 | 8 | # bug #18986 9 | var x = 0.uint 10 | echo "Found a ", x 11 | -------------------------------------------------------------------------------- /tests/converter/tconvcolors.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "16777215A" 3 | """ 4 | 5 | import colors 6 | 7 | echo int32(colWhite), 'A' 8 | -------------------------------------------------------------------------------- /tests/converter/tconverter.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''fooo fooo''' 3 | """ 4 | 5 | converter intToString[T](i: T): string = "fooo" 6 | 7 | let 8 | foo: string = 1 9 | bar: string = intToString(2) 10 | 11 | echo foo, " ", bar -------------------------------------------------------------------------------- /tests/converter/tdontleak.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''5''' 3 | joinable: false 4 | """ 5 | 6 | import mdontleak 7 | # bug #19213 8 | 9 | let a = 5'u32 10 | echo a 11 | -------------------------------------------------------------------------------- /tests/converter/tvargenericconverter.nim: -------------------------------------------------------------------------------- 1 | # regression test 2 | 3 | converter toPtr[T](x: var T): ptr T = 4 | result = addr x 5 | 6 | var x = 123 7 | let y: ptr int = x 8 | -------------------------------------------------------------------------------- /tests/coroutines/texceptions.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:nimCoroutines 2 | -------------------------------------------------------------------------------- /tests/coroutines/tgc.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:nimCoroutines 2 | -------------------------------------------------------------------------------- /tests/coroutines/titerators.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:nimCoroutines 2 | -------------------------------------------------------------------------------- /tests/coroutines/twait.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:nimCoroutines 2 | -------------------------------------------------------------------------------- /tests/cpp/enum.hpp: -------------------------------------------------------------------------------- 1 | namespace namespaced { 2 | enum Enum { A, B, C }; 3 | } 4 | -------------------------------------------------------------------------------- /tests/cpp/fam.h: -------------------------------------------------------------------------------- 1 | struct Test{ 2 | ~Test() { 3 | } 4 | }; 5 | -------------------------------------------------------------------------------- /tests/cpp/foo.c: -------------------------------------------------------------------------------- 1 | 2 | char* myFunc() { 3 | return "Hello world"; 4 | } 5 | -------------------------------------------------------------------------------- /tests/cpp/t12946.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c cpp" 3 | """ 4 | 5 | import std/atomics 6 | type Futex = distinct Atomic[int32] 7 | 8 | var x: Futex 9 | -------------------------------------------------------------------------------- /tests/cpp/t23306.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "cpp" 3 | """ 4 | 5 | type K = object 6 | h: iterator(f: K): K 7 | 8 | iterator d(g: K): K {.closure.} = 9 | defer: 10 | discard 11 | 12 | discard K(h: d) -------------------------------------------------------------------------------- /tests/cpp/tembarrassing_generic_bug.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "cpp" 3 | cmd: "nim cpp --threads:on $file" 4 | """ 5 | 6 | # bug #5142 7 | 8 | var ci: Channel[int] 9 | ci.open 10 | -------------------------------------------------------------------------------- /tests/cpp/tenum_set.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "cpp" 3 | output: "{A, B, C}" 4 | """ 5 | 6 | type Enum {.importcpp: "namespaced::Enum", header: "enum.hpp".} = enum A, B, C 7 | 8 | var vals = {low(Enum) .. high(Enum)} 9 | echo vals 10 | -------------------------------------------------------------------------------- /tests/cpp/tfam.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "cpp" 3 | """ 4 | type 5 | Test {.importcpp, header: "fam.h".} = object 6 | 7 | let test = newSeq[Test]() -------------------------------------------------------------------------------- /tests/cpp/tgen_prototype_for_importc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "cpp" 3 | output: '''Hello world''' 4 | """ 5 | 6 | # bug #5136 7 | 8 | {.compile: "foo.c".} 9 | proc myFunc(): cstring {.importc.} 10 | echo myFunc() 11 | -------------------------------------------------------------------------------- /tests/cpp/tnativesockets.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "cpp" 3 | outputsub: "" 4 | """ 5 | 6 | import nativesockets 7 | -------------------------------------------------------------------------------- /tests/cpp/ttypeinfo2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "cpp" 3 | """ 4 | # bug #2841 5 | import typeinfo 6 | var tt: Any 7 | -------------------------------------------------------------------------------- /tests/cpp/virtualptr.nim: -------------------------------------------------------------------------------- 1 | type 2 | Loo* {.exportc.} = object 3 | LooPtr* = ptr Loo 4 | Moo* {.exportc.} = object 5 | loo*: LooPtr 6 | 7 | 8 | proc salute*(foo: LooPtr) {.virtual.} = 9 | discard 10 | -------------------------------------------------------------------------------- /tests/defer/t22309.nim: -------------------------------------------------------------------------------- 1 | block: 2 | defer: 3 | let a = 42 4 | doAssert not declared(a) 5 | 6 | proc lol() = 7 | defer: 8 | let a = 42 9 | doAssert not declared(a) 10 | 11 | lol() 12 | -------------------------------------------------------------------------------- /tests/destructor/helper.nim: -------------------------------------------------------------------------------- 1 | type 2 | MyTestObject*[T] = object 3 | p: ptr T 4 | -------------------------------------------------------------------------------- /tests/destructor/nim.cfg: -------------------------------------------------------------------------------- 1 | --sinkInference:on 2 | -------------------------------------------------------------------------------- /tests/destructor/objFile.nim: -------------------------------------------------------------------------------- 1 | type Obj* = object 2 | v*: int 3 | 4 | proc `=destroy`(this: var Obj) = 5 | echo "igotdestroyed" 6 | this.v = -1 7 | 8 | var test* = Obj(v: 42) 9 | -------------------------------------------------------------------------------- /tests/destructor/tconst_smart_ptr.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: "compile" 3 | """ 4 | 5 | import const_smart_ptr 6 | 7 | discard test(0) 8 | -------------------------------------------------------------------------------- /tests/destructor/tglobaldestructor.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: '''nim c --gc:arc $file''' 3 | output: '''(v: 42) 4 | igotdestroyed''' 5 | """ 6 | 7 | import objFile 8 | 9 | echo test 10 | -------------------------------------------------------------------------------- /tests/destructor/tgotoexceptions3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --gc:arc --exceptions:goto $file" 3 | outputsub: "Error: unhandled exception: Problem [OSError]" 4 | exitcode: "1" 5 | """ 6 | 7 | raise newException(OSError, "Problem") 8 | -------------------------------------------------------------------------------- /tests/dir with space/more spaces/mspace.nim: -------------------------------------------------------------------------------- 1 | proc tenTimes*(x: int): int = 10*x 2 | -------------------------------------------------------------------------------- /tests/discard/tillegaldiscard.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal discard" 3 | line: 9 4 | """ 5 | 6 | proc pop[T](arg: T): T = 7 | echo arg 8 | 9 | discard tillegaldiscard.pop 10 | -------------------------------------------------------------------------------- /tests/dll/client.nim.cfg: -------------------------------------------------------------------------------- 1 | --define:useNimRtl 2 | -------------------------------------------------------------------------------- /tests/dll/nimhcr_0.nim: -------------------------------------------------------------------------------- 1 | 2 | let g_0 = 1000 # new value! but also a "new" global :) 3 | 4 | proc getInt*(): int = return g_0 5 | -------------------------------------------------------------------------------- /tests/dll/nimhcr_0_5.nim: -------------------------------------------------------------------------------- 1 | 2 | proc getInt*(): int = return 42 # back to the answer... 3 | -------------------------------------------------------------------------------- /tests/dll/nimhcr_0_6.nim: -------------------------------------------------------------------------------- 1 | 2 | let g_0 = 1000 # new value! but also a "new" global :) 3 | 4 | proc getInt*(): int = return g_0 5 | -------------------------------------------------------------------------------- /tests/dll/nimhcr_1.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/dll/nimhcr_1.nim -------------------------------------------------------------------------------- /tests/dll/nimhcr_1_2.nim: -------------------------------------------------------------------------------- 1 | 2 | import nimhcr_2 3 | 4 | proc f_1*(): int = return f_2() 5 | -------------------------------------------------------------------------------- /tests/dll/nimhcr_1_3.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/dll/nimhcr_1_3.nim -------------------------------------------------------------------------------- /tests/dll/nimhcr_2.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/dll/nimhcr_2.nim -------------------------------------------------------------------------------- /tests/dll/nimhcr_2_2.nim: -------------------------------------------------------------------------------- 1 | 2 | import hotcodereloading 3 | 4 | proc f_2*(): int = return 1 5 | 6 | afterCodeReload: 7 | echo " 2: after!" 8 | -------------------------------------------------------------------------------- /tests/dll/nimhcr_2_3.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/dll/nimhcr_2_3.nim -------------------------------------------------------------------------------- /tests/dll/nimhcr_basic.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | Hello world 4 | ''' 5 | """ 6 | # for now orc only tests successful compilation 7 | 8 | echo "Hello world" 9 | -------------------------------------------------------------------------------- /tests/dll/nimhcr_unit.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:useNimRtl 2 | -d:testNimHcr 3 | -------------------------------------------------------------------------------- /tests/dll/server.nim.cfg: -------------------------------------------------------------------------------- 1 | --define:useNimRtl 2 | --app:lib 3 | -------------------------------------------------------------------------------- /tests/dummy.txt: -------------------------------------------------------------------------------- 1 | Just a simple text for test -------------------------------------------------------------------------------- /tests/effects/teffects10.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | # https://github.com/nim-lang/Nim/issues/15495 6 | 7 | proc f() {.raises: [].} = 8 | var a: proc () 9 | var b: proc () 10 | swap(a, b) 11 | 12 | f() 13 | -------------------------------------------------------------------------------- /tests/effects/tlaxeffects.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim $target $options --legacy:laxEffects $file" 3 | """ 4 | 5 | 6 | type 7 | Foo = object 8 | bar: seq[Foo] 9 | 10 | proc `==`(a, b: Foo): bool = 11 | a.bar == b.bar 12 | -------------------------------------------------------------------------------- /tests/enum/m16462_1.nim: -------------------------------------------------------------------------------- 1 | type 2 | Scancode* {.pure.} = enum 3 | SCANCODE_LEFT = 80 -------------------------------------------------------------------------------- /tests/enum/m16462_2.nim: -------------------------------------------------------------------------------- 1 | type 2 | Scancode* {.pure.} = enum 3 | SCANCODE_LEFT = 80 -------------------------------------------------------------------------------- /tests/enum/mcrossmodule.nim: -------------------------------------------------------------------------------- 1 | 2 | type 3 | OtherEnum* = enum 4 | Success, Failed, More 5 | 6 | proc some*(x: OtherEnum): bool = x == Success 7 | -------------------------------------------------------------------------------- /tests/enum/t16462.nim: -------------------------------------------------------------------------------- 1 | import m16462_1 except Scancode 2 | import m16462_2 3 | 4 | # bug #16462 5 | let a = SCANCODE_LEFT -------------------------------------------------------------------------------- /tests/enum/tenum_duplicate.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "duplicate value in enum 'd'" 3 | """ 4 | 5 | type 6 | unordered_enum = enum 7 | a = 1 8 | b = 0 9 | c 10 | d = 2 11 | -------------------------------------------------------------------------------- /tests/enum/tenum_invalid.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim check $file" 3 | """ 4 | 5 | type 6 | Test = enum 7 | A = 9.0 #[tt.Error 8 | ^ ordinal type expected; given: float]# 9 | -------------------------------------------------------------------------------- /tests/enum/tenum_self.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "1 can't be converted to ErrorFoo" 3 | """ 4 | 5 | 6 | type 7 | Foo = enum 8 | Bar = 0.Foo 9 | 10 | ErrorFoo = enum 11 | eBar = 1.ErrorFoo 12 | -------------------------------------------------------------------------------- /tests/enum/tenumfieldpragmanoannot.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "annotation to deprecated not supported here" 3 | line: 8 4 | """ 5 | 6 | type 7 | A = enum 8 | a {.deprecated: "njshd".} 9 | 10 | var v1 = a 11 | -------------------------------------------------------------------------------- /tests/enum/tenumitems.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "attempting to call routine: 'items'" 3 | line: 7 4 | """ 5 | 6 | type a = enum b,c,d 7 | a.items() 8 | -------------------------------------------------------------------------------- /tests/enum/tenummix.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch" 3 | file: "tenummix.nim" 4 | line: 11 5 | """ 6 | 7 | type 8 | TE1 = enum eA, eB 9 | TE2 = enum eC, eD 10 | 11 | assert eA != eC 12 | -------------------------------------------------------------------------------- /tests/enum/toverloadedname.nim: -------------------------------------------------------------------------------- 1 | block: # issue #23998 2 | type 3 | Enum {.pure.} = enum 4 | a 5 | Obj = object 6 | a: Enum 7 | proc test(a: Enum) = discard Obj(a: a) 8 | -------------------------------------------------------------------------------- /tests/errmsgs/m8794.nim: -------------------------------------------------------------------------------- 1 | type Foo3* = object 2 | a1: int 3 | -------------------------------------------------------------------------------- /tests/errmsgs/mambparam1.nim: -------------------------------------------------------------------------------- 1 | const test* = "foo" 2 | -------------------------------------------------------------------------------- /tests/errmsgs/mambparam2.nim: -------------------------------------------------------------------------------- 1 | import mambparam1 2 | export test 3 | -------------------------------------------------------------------------------- /tests/errmsgs/mambparam3.nim: -------------------------------------------------------------------------------- 1 | const test* = "bar" 2 | -------------------------------------------------------------------------------- /tests/errmsgs/mambtype1.nim: -------------------------------------------------------------------------------- 1 | type Y* = object 2 | -------------------------------------------------------------------------------- /tests/errmsgs/mambtype2.nim: -------------------------------------------------------------------------------- 1 | type Y* = object 2 | -------------------------------------------------------------------------------- /tests/errmsgs/mb.nim: -------------------------------------------------------------------------------- 1 | type 2 | typ* = distinct string 3 | -------------------------------------------------------------------------------- /tests/errmsgs/mc.nim: -------------------------------------------------------------------------------- 1 | 2 | type 3 | typ* = distinct int 4 | -------------------------------------------------------------------------------- /tests/errmsgs/t10594.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "expression has no address" 3 | line: 7 4 | """ 5 | 6 | template foo(v: varargs[int]) = addr v 7 | foo(1, 2) 8 | -------------------------------------------------------------------------------- /tests/errmsgs/t18327.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "parameter 'n' requires a type" 3 | """ 4 | 5 | proc fn3(n) = discard -------------------------------------------------------------------------------- /tests/errmsgs/t18983.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'A'" 3 | """ 4 | 5 | type 6 | A* = A 7 | B = (A,) 8 | -------------------------------------------------------------------------------- /tests/errmsgs/t19882_2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot instantiate: 'A[T]'; the object's generic parameters cannot be inferred and must be explicitly given" 3 | """ 4 | type A[T] = object 5 | var a = A() -------------------------------------------------------------------------------- /tests/errmsgs/t22097.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got " 3 | """ 4 | 5 | proc toUInt16(x: var uint16) = 6 | discard 7 | 8 | var x = uint8(1) 9 | toUInt16 x 10 | -------------------------------------------------------------------------------- /tests/errmsgs/t22852.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | exitcode: 1 3 | outputsub: ''' 4 | Error: unhandled exception: value out of range: -2 notin 0 .. 9223372036854775807 [RangeDefect] 5 | ''' 6 | """ 7 | 8 | # bug #22852 9 | echo [0][2..^2] 10 | -------------------------------------------------------------------------------- /tests/errmsgs/t22996.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'typedesc[string]' for const" 3 | """ 4 | 5 | # bug #22996 6 | type MyObject = ref object 7 | _ = string 8 | -------------------------------------------------------------------------------- /tests/errmsgs/t23060.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: '♔♕♖♗♘♙'" 3 | """ 4 | 5 | ♔♕♖♗♘♙ = 1 -------------------------------------------------------------------------------- /tests/errmsgs/t23355.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "{.pop.} without a corresponding {.push.}" 3 | """ 4 | 5 | block: 6 | {.push raises: [].} 7 | 8 | proc f() = 9 | {.pop.} 10 | 11 | proc g() = raise newException(ValueError, "") -------------------------------------------------------------------------------- /tests/errmsgs/t23419.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'void' in this context: '(array[0..-1, void],)' for var" 3 | """ 4 | 5 | var a: (array[0, void], ) 6 | -------------------------------------------------------------------------------- /tests/errmsgs/t5282.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'x'" 3 | """ 4 | 5 | type x = distinct x 6 | -------------------------------------------------------------------------------- /tests/errmsgs/t6281.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'SomeNumber' in this context: 'seq[SomeNumber]' for var" 3 | line: 6 4 | """ 5 | 6 | var seqwat: seq[SomeNumber] = @[] 7 | 8 | proc foo(x: SomeNumber) = 9 | seqwat.add(x) -------------------------------------------------------------------------------- /tests/errmsgs/t6499.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'chr' is a built-in and cannot be used as a first-class procedure" 3 | """ 4 | 5 | # bug #6499 6 | let x = (chr, 0) 7 | -------------------------------------------------------------------------------- /tests/errmsgs/t8064.nim: -------------------------------------------------------------------------------- 1 | import tables 2 | 3 | values 4 | 5 | 6 | discard """ 7 | # either this or "expression has no type": 8 | errormsg: "ambiguous identifier: 'values' -- use one of the following:" 9 | """ 10 | -------------------------------------------------------------------------------- /tests/errmsgs/t8339.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got but expected 'seq[float]'" 3 | line: 8 4 | """ 5 | 6 | import sequtils 7 | 8 | var x: seq[float] = @[1].mapIt(it) 9 | -------------------------------------------------------------------------------- /tests/errmsgs/t8610.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'typedesc[int]' for const" 3 | """ 4 | ## bug #8610 5 | const Foo = int 6 | -------------------------------------------------------------------------------- /tests/errmsgs/t9908_01.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "ordinal type expected; given: string" 3 | line: 10 4 | """ 5 | 6 | # https://github.com/nim-lang/Nim/issues/9908 7 | 8 | type 9 | X = enum 10 | a = ("a", "b") 11 | -------------------------------------------------------------------------------- /tests/errmsgs/ta.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got " 3 | line: 12 4 | """ 5 | 6 | import mb, mc 7 | 8 | proc test(testing: mb.typ) = 9 | discard 10 | 11 | var s: mc.typ 12 | test(s) 13 | -------------------------------------------------------------------------------- /tests/errmsgs/tassignunpack.nim: -------------------------------------------------------------------------------- 1 | var a, b = 0 2 | (a, b) = 1 #[tt.Error 3 | ^ tuple expected for tuple unpacking, but got 'int literal(1)']# 4 | -------------------------------------------------------------------------------- /tests/errmsgs/tcannot_capture_builtin.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'+' is a built-in and cannot be used as a first-class procedure" 3 | line: 8 4 | """ 5 | 6 | # bug #2050 7 | 8 | let v: proc (a, b: int): int = `+` 9 | -------------------------------------------------------------------------------- /tests/errmsgs/tcant_overload_by_return_type.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "overloaded 'x' leads to ambiguous calls" 3 | line: 9 4 | """ 5 | 6 | # bug #6393 7 | 8 | proc x(): int = 7 9 | proc x(): string = "strange" 10 | -------------------------------------------------------------------------------- /tests/errmsgs/tconstinfo.nim: -------------------------------------------------------------------------------- 1 | # https://forum.nim-lang.org/t/9762 2 | 3 | const foo = "abc" 4 | case 'a' 5 | of foo: echo "should error" #[tt.Error 6 | ^ type mismatch: got but expected 'char']# 7 | else: discard 8 | -------------------------------------------------------------------------------- /tests/errmsgs/tconsttypemismatch.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch" 3 | file: "tconsttypemismatch.nim" 4 | line: 7 5 | """ 6 | # bug #2252 7 | const foo: int = 1000 / 30 8 | -------------------------------------------------------------------------------- /tests/errmsgs/temptysetparam.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot infer the type of parameter 'x'" 3 | line: 5 4 | """ 5 | proc a(x = {}) = discard 6 | -------------------------------------------------------------------------------- /tests/errmsgs/tgeneral_excepts.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Only one general except clause is allowed after more specific exceptions" 3 | """ 4 | 5 | try: 6 | discard 7 | except: 8 | discard 9 | except: 10 | discard 11 | -------------------------------------------------------------------------------- /tests/errmsgs/tmultiple_finally.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Only one finally is allowed after all other branches" 3 | """ 4 | 5 | try: 6 | discard 7 | finally: 8 | discard 9 | finally: 10 | discard 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/errmsgs/tnested_empty_seq.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'empty' in this context: 'array[0..0, (string, seq[empty])]' for var" 3 | line: 8 4 | """ 5 | 6 | # bug #3948 7 | 8 | var headers=[("headers", @[])] 9 | -------------------------------------------------------------------------------- /tests/errmsgs/tnnodeadd.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot add to node kind: nnkInt8Lit" 3 | line: 7 4 | """ 5 | import macros 6 | macro t(x: untyped): untyped = 7 | x.add(newEmptyNode()) 8 | t(38'i8) 9 | -------------------------------------------------------------------------------- /tests/errmsgs/tnnodeindex.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "index 5 not in 0 .. 2" 3 | line: 7 4 | """ 5 | import macros 6 | macro t(x: untyped): untyped = 7 | result = x[5] 8 | t([1, 2, 3]) 9 | -------------------------------------------------------------------------------- /tests/errmsgs/tnnodeindexkind.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot set child of node kind: nnkStrLit" 3 | line: 7 4 | """ 5 | import macros 6 | macro t(x: untyped): untyped = 7 | x[0] = newEmptyNode() 8 | t("abc") 9 | -------------------------------------------------------------------------------- /tests/errmsgs/trecursiveproctype3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'MyFunc'" 3 | line: 9 4 | """ 5 | 6 | # issue #19271 7 | 8 | type 9 | MyFunc = proc(f: ptr MyFunc) 10 | -------------------------------------------------------------------------------- /tests/errmsgs/trecursiveproctype4.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'EventHandler'" 3 | line: 9 4 | """ 5 | 6 | # issue #23885 7 | 8 | type 9 | EventHandler = proc(target: BB) 10 | BB = (EventHandler,) 11 | -------------------------------------------------------------------------------- /tests/errmsgs/trecursiveproctype6.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'Test" 3 | line: 9 4 | """ 5 | 6 | # issue #18855 7 | 8 | type 9 | TestProc = proc(a: Test) 10 | Test = Test 11 | -------------------------------------------------------------------------------- /tests/errmsgs/tstaticexprnotype.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: reject 3 | """ 4 | 5 | let x = static: discard 6 | -------------------------------------------------------------------------------- /tests/errmsgs/ttupleindexoutofbounds.nim: -------------------------------------------------------------------------------- 1 | let a = (1, 2)[4] #[tt.Error 2 | ^ invalid index 4 in subscript for tuple of length 2]# 3 | -------------------------------------------------------------------------------- /tests/errmsgs/tuncheckedarrayvar.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: ''' 3 | invalid type: 'UncheckedArray[uint8]' for var 4 | ''' 5 | """ 6 | 7 | var byteUA: UncheckedArray[uint8] 8 | -------------------------------------------------------------------------------- /tests/errmsgs/twrongdefinetype.nim: -------------------------------------------------------------------------------- 1 | # issue #24539 2 | 3 | type Foo = object 4 | const foo {.define.} = Foo() #[tt.Error 5 | ^ unsupported type for constant 'foo' with .define pragma: Foo]# 6 | echo repr(foo) 7 | -------------------------------------------------------------------------------- /tests/exception/m21261.nim: -------------------------------------------------------------------------------- 1 | raise (ref Exception)(msg: "something") -------------------------------------------------------------------------------- /tests/exception/m22469.nim: -------------------------------------------------------------------------------- 1 | # ModuleB 2 | echo "First top-level statement of ModuleB" 3 | echo high(int) + 1 4 | echo "ModuleB last statement" -------------------------------------------------------------------------------- /tests/exception/t20613.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "; --panics:on" 3 | """ 4 | 5 | func test = 6 | if 0 > 10: 7 | raiseAssert "hey" 8 | test() 9 | -------------------------------------------------------------------------------- /tests/exception/t21261.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | exitcode: 1 3 | outputsub: ''' 4 | m21261.nim(1) m21261 5 | Error: unhandled exception: something [Exception] 6 | ''' 7 | """ 8 | 9 | import m21261 -------------------------------------------------------------------------------- /tests/exception/t22008.nim: -------------------------------------------------------------------------------- 1 | template detect(v: untyped) = 2 | doAssert typeof(v) is int 3 | 4 | detect: 5 | try: 6 | raise (ref ValueError)() 7 | except ValueError: 8 | 42 -------------------------------------------------------------------------------- /tests/exception/twrongexc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | outputsub: "Error: unhandled exception: [ValueError]" 3 | exitcode: "1" 4 | """ 5 | try: 6 | raise newException(ValueError, "") 7 | except OverflowDefect: 8 | echo("Error caught") 9 | -------------------------------------------------------------------------------- /tests/exprs/thighCString.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "5" 3 | """ 4 | let test = cstring("foobar") 5 | 6 | echo high(test) 7 | -------------------------------------------------------------------------------- /tests/exprs/tresultwarning.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | nimout: "tresultwarning.nim(6, 7) Warning: Special variable 'result' is shadowed. [ResultShadowed]" 3 | """ 4 | 5 | proc test(): string = 6 | var result = "foo" 7 | -------------------------------------------------------------------------------- /tests/exprs/tstmtexp.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "expression '5' is of type 'int literal(5)' and has to be used (or discarded)" 3 | file: "tstmtexp.nim" 4 | line: 8 5 | """ 6 | # Test 3 7 | 8 | 1+4 9 | -------------------------------------------------------------------------------- /tests/gc/gctest.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on 2 | -------------------------------------------------------------------------------- /tests/gc/tdisable_orc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | joinable: false 3 | retries: 2 4 | """ 5 | 6 | import std/asyncdispatch 7 | 8 | # bug #22256 9 | GC_disableMarkAndSweep() 10 | waitFor sleepAsync(1000) 11 | -------------------------------------------------------------------------------- /tests/generics/m22373a.nim: -------------------------------------------------------------------------------- 1 | # module a for t22373 2 | 3 | # original: 4 | type LightClientHeader* = object 5 | 6 | # simplified: 7 | type TypeOrTemplate* = object 8 | -------------------------------------------------------------------------------- /tests/generics/m3770.nim: -------------------------------------------------------------------------------- 1 | type 2 | Noice* = object 3 | hidden: int 4 | 5 | template jjj*: Noice = 6 | Noice(hidden: 15) 7 | 8 | type Opt* = object 9 | o: int 10 | 11 | template none*(O: type Opt): Opt = Opt(o: 0) 12 | -------------------------------------------------------------------------------- /tests/generics/mfriends.nim: -------------------------------------------------------------------------------- 1 | 2 | type 3 | TMyObj = object 4 | x: int 5 | 6 | proc gen*[T](): T = 7 | var d: TMyObj 8 | # access private field here 9 | d.x = 3 10 | result = d.x 11 | 12 | -------------------------------------------------------------------------------- /tests/generics/mmodule_same_as_proc.nim: -------------------------------------------------------------------------------- 1 | 2 | proc mmodule_same_as_proc*(x: string) = discard 3 | -------------------------------------------------------------------------------- /tests/generics/mpragma1.nim: -------------------------------------------------------------------------------- 1 | macro aMacro*(u:untyped):untyped = 2 | echo "in macro" 3 | result = u 4 | -------------------------------------------------------------------------------- /tests/generics/mpragma2.nim: -------------------------------------------------------------------------------- 1 | import mpragma1 2 | proc p*[T]() = 3 | proc inner() {.aMacro.} = 4 | discard 5 | inner() 6 | discard 7 | -------------------------------------------------------------------------------- /tests/generics/mtypenodes.nim: -------------------------------------------------------------------------------- 1 | # issue #22699 2 | 3 | type Private = distinct int 4 | 5 | proc chop*[T](x: int): int = 6 | cast[int](cast[tuple[field: Private]](x)) 7 | -------------------------------------------------------------------------------- /tests/generics/t14193.nim: -------------------------------------------------------------------------------- 1 | type 2 | Task*[N: int] = object # XXX this shouldn't work, should be `static int` 3 | env*: array[N, byte] 4 | 5 | var task14193: Task[20] 6 | doAssert task14193.env.len == 20 7 | -------------------------------------------------------------------------------- /tests/generics/t14509.nim: -------------------------------------------------------------------------------- 1 | import m14509 2 | 3 | var v: VecIntrin[4, float32] 4 | doAssert $v == "[0.0, 0.0, 0.0, 0.0]" 5 | -------------------------------------------------------------------------------- /tests/generics/t1500.nim: -------------------------------------------------------------------------------- 1 | #issue 1500 2 | 3 | type 4 | TFtpBase*[SockType] = object 5 | job: TFTPJob[SockType] 6 | PFtpBase*[SockType] = ref TFtpBase[SockType] 7 | TFtpClient* = TFtpBase[string] 8 | TFTPJob[T] = object -------------------------------------------------------------------------------- /tests/generics/t18823.nim: -------------------------------------------------------------------------------- 1 | type BitsRange[T] = range[0..sizeof(T)*8-1] 2 | 3 | proc bar[T](a: T; b: BitsRange[T]) = 4 | discard 5 | 6 | bar(1, 2.Natural) 7 | -------------------------------------------------------------------------------- /tests/generics/t21742.nim: -------------------------------------------------------------------------------- 1 | type 2 | Foo[T] = object 3 | x:T 4 | Bar[T,R] = Foo[T] 5 | Baz = Bar[int,float] 6 | 7 | proc qux[T,R](x: Bar[T,R]) = discard 8 | 9 | var b:Baz 10 | b.qux() -------------------------------------------------------------------------------- /tests/generics/t21760.nim: -------------------------------------------------------------------------------- 1 | import std/tables 2 | 3 | type Url = object 4 | 5 | proc myInit(_: type[Url], params = default(Table[string, string])): Url = 6 | discard 7 | 8 | discard myInit(Url) -------------------------------------------------------------------------------- /tests/generics/t22826.nim: -------------------------------------------------------------------------------- 1 | import std/tables 2 | 3 | var a: Table[string, float] 4 | 5 | type Value*[T] = object 6 | table: Table[string, Value[T]] 7 | 8 | discard toTable({"a": Value[float]()}) -------------------------------------------------------------------------------- /tests/generics/t500.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | type 6 | TTest = tuple[x: range[0..80], y: range[0..25]] 7 | 8 | let x: TTest = (2, 23) 9 | -------------------------------------------------------------------------------- /tests/generics/t7141.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot instantiate: \'T\'" 3 | line: 6 4 | """ 5 | 6 | proc foo[T](x: T) = 7 | discard 8 | 9 | var fun = if true: foo else: foo 10 | -------------------------------------------------------------------------------- /tests/generics/t7446.nim: -------------------------------------------------------------------------------- 1 | proc foo(x: Natural or SomeUnsignedInt):int = 2 | when x is int: 3 | result = 1 4 | else: 5 | result = 2 6 | let a = 10 7 | doAssert foo(a) == 1 8 | 9 | let b = 10'u8 10 | doAssert foo(b) == 2 -------------------------------------------------------------------------------- /tests/generics/t8270.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot instantiate: \'T\'" 3 | line: 6 4 | """ 5 | 6 | proc m[T](x: T): int = discard 7 | echo [m] 8 | -------------------------------------------------------------------------------- /tests/generics/taliashijack.nim: -------------------------------------------------------------------------------- 1 | # issue #23977 2 | 3 | type Foo[T] = int 4 | 5 | proc foo(T: typedesc) = 6 | var a: T 7 | 8 | foo(int) 9 | -------------------------------------------------------------------------------- /tests/generics/tbadgenericlambda.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "nested proc can have generic parameters only when" 3 | line: 6 4 | """ 5 | 6 | let x = proc (x, y: auto): auto = x + y 7 | 8 | -------------------------------------------------------------------------------- /tests/generics/tfriends.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "3" 3 | """ 4 | 5 | # Tests that a generic instantiation from a different module may access 6 | # private object fields: 7 | 8 | import mfriends 9 | 10 | echo gen[int]() 11 | 12 | -------------------------------------------------------------------------------- /tests/generics/tgenericbodyreturn1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot instantiate: 'T'" 3 | file: "system.nim" 4 | """ 5 | 6 | # issue #24091 7 | 8 | type M[V] = object 9 | echo default(M) 10 | -------------------------------------------------------------------------------- /tests/generics/topensymimport.nim: -------------------------------------------------------------------------------- 1 | # issue #23386 2 | 3 | import mopensymimport2 4 | 5 | doAssert g(int) == "f" 6 | -------------------------------------------------------------------------------- /tests/generics/tpragma.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | nimout: ''' 3 | in macro 4 | ''' 5 | """ 6 | 7 | # issue #18649 8 | 9 | import mpragma2 10 | p[string]() 11 | -------------------------------------------------------------------------------- /tests/global/a_module.nim: -------------------------------------------------------------------------------- 1 | # a.nim 2 | {.push stackTrace: off.} 3 | proc foo*(): int = 4 | var a {.global.} = 0 5 | result = a 6 | {.pop.} -------------------------------------------------------------------------------- /tests/global/globalaux2.nim: -------------------------------------------------------------------------------- 1 | import globalaux 2 | 3 | echo "in globalaux2: ", globalInstance[int]().val 4 | 5 | -------------------------------------------------------------------------------- /tests/global/t21896.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot assign local to global variable" 3 | line: 7 4 | """ 5 | 6 | proc example(a:int) = 7 | let b {.global.} = a 8 | 9 | example(1) 10 | -------------------------------------------------------------------------------- /tests/global/t5958.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: 'a'" 3 | line: 9 4 | """ 5 | 6 | static: 7 | var a = 1 8 | 9 | echo a 10 | -------------------------------------------------------------------------------- /tests/global/tglobal2.nim: -------------------------------------------------------------------------------- 1 | # b.nim 2 | import a_module 3 | doAssert foo() == 0 4 | 5 | proc hello(x: type) = 6 | var s {.global.} = default(x) 7 | doAssert s == 0 8 | 9 | hello(int) 10 | -------------------------------------------------------------------------------- /tests/global/tglobalforvar.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: 100 3 | """ 4 | 5 | var funcs: seq[proc (): int {.nimcall.}] = @[] 6 | for i in 0..10: 7 | funcs.add((proc (): int = return i * i)) 8 | 9 | echo(funcs[3]()) 10 | -------------------------------------------------------------------------------- /tests/ic/config.nims: -------------------------------------------------------------------------------- 1 | --mm:refc 2 | -------------------------------------------------------------------------------- /tests/ic/mbaseobj.nim: -------------------------------------------------------------------------------- 1 | 2 | type 3 | Base* = ref object of RootObj 4 | s*: string 5 | 6 | method m*(b: Base) {.base.} = 7 | echo "Base ", b.s 8 | -------------------------------------------------------------------------------- /tests/ic/mdefconverter.nim: -------------------------------------------------------------------------------- 1 | 2 | converter toBool*(x: int): bool = x != 0 3 | -------------------------------------------------------------------------------- /tests/ic/mimports.nim: -------------------------------------------------------------------------------- 1 | from mimportsb {.all.} import fnb1, hfnb3 2 | 3 | proc fn1*(): int = 1 4 | proc fn2*(): int = 2 5 | proc hfn3(): int = 3 6 | proc hfn4(): int = 4 7 | proc hfn5(): int = 5 8 | 9 | export mimportsb.fnb2, hfnb3 10 | -------------------------------------------------------------------------------- /tests/ic/mimportsb.nim: -------------------------------------------------------------------------------- 1 | proc fnb1*(): int = 1 2 | proc fnb2*(): int = 2 3 | proc hfnb3(): int = 3 4 | proc hfnb4(): int = 4 5 | -------------------------------------------------------------------------------- /tests/import/buzz/m21496.nim: -------------------------------------------------------------------------------- 1 | proc fb*: string = "buzz!" -------------------------------------------------------------------------------- /tests/import/fizz/m21496.nim: -------------------------------------------------------------------------------- 1 | proc fb*: string = "fizz!" -------------------------------------------------------------------------------- /tests/import/t21496.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "ambiguous identifier: 'm21496'" 3 | """ 4 | 5 | import fizz/m21496, buzz/m21496 6 | 7 | # bug #21496 8 | 9 | discard m21496.fb() 10 | -------------------------------------------------------------------------------- /tests/import/t22065.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot open file: ./sugar" 3 | """ 4 | 5 | import ./sugar -------------------------------------------------------------------------------- /tests/import/t22208.nim: -------------------------------------------------------------------------------- 1 | import fizz/m21496 as alas 2 | import buzz/m21496 3 | 4 | # bug #21496 5 | 6 | doAssert m21496.fb() == "buzz!" 7 | -------------------------------------------------------------------------------- /tests/import/t23167.nim: -------------------------------------------------------------------------------- 1 | # bug #23167 2 | template sharedImport() = 3 | import std / os 4 | 5 | sharedImport() 6 | -------------------------------------------------------------------------------- /tests/import_in_config/nim.cfg: -------------------------------------------------------------------------------- 1 | import = "other" 2 | path = "$projectDir" 3 | -------------------------------------------------------------------------------- /tests/import_in_config/other.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/import_in_config/other.nim -------------------------------------------------------------------------------- /tests/import_in_config/tmain.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/import_in_config/tmain.nim -------------------------------------------------------------------------------- /tests/importalls/m2.nim: -------------------------------------------------------------------------------- 1 | const bar1* = 2 2 | const bar2 = 2 3 | const bar3 = 3 4 | -------------------------------------------------------------------------------- /tests/importalls/m3.nim: -------------------------------------------------------------------------------- 1 | # xxx use below naming convention in other test files: p: public, h: hidden 2 | const m3p1* = 2 3 | const m3h2 = 2 4 | const m3h3 = 3 5 | const m3h4 = 4 6 | -------------------------------------------------------------------------------- /tests/importalls/m4.nim: -------------------------------------------------------------------------------- 1 | import ./m3 {.all.} 2 | import ./m3 as m3b 3 | export m3b 4 | export m3h3 5 | export m3.m3h4 6 | 7 | import ./m2 {.all.} as m2b 8 | export m2b except bar3 9 | 10 | -------------------------------------------------------------------------------- /tests/importalls/mt0.nim: -------------------------------------------------------------------------------- 1 | import ./m1 as m 2 | doAssert compiles(foo0) 3 | doAssert not compiles(foo1) 4 | doAssert foo6b() == 2 5 | doAssert m3h2 == 2 6 | 7 | var f = initFoo5(z3=3) 8 | doAssert f.z3 == 30 9 | doAssert z3(f) == 30 10 | -------------------------------------------------------------------------------- /tests/importalls/mt4.nim: -------------------------------------------------------------------------------- 1 | import ./m1 {.all.} except foo1 2 | doAssert foo2 == 2 3 | doAssert declared(foo2) 4 | doAssert not compiles(foo1) 5 | -------------------------------------------------------------------------------- /tests/importalls/mt4b.nim: -------------------------------------------------------------------------------- 1 | from ./m1 {.all.} as m2 import nil 2 | doAssert not compiles(foo1) 3 | doAssert m2.foo1 == 2 4 | -------------------------------------------------------------------------------- /tests/init/tlet_uninit2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'let' symbol requires an initialization" 3 | """ 4 | 5 | let x: int -------------------------------------------------------------------------------- /tests/int/twrongvarconv.nim: -------------------------------------------------------------------------------- 1 | proc `++`(n: var int) = 2 | n += 1 3 | 4 | var a: int32 = 15 5 | 6 | ++a #[tt.Error 7 | ^ type mismatch: got ]# 8 | 9 | echo a 10 | -------------------------------------------------------------------------------- /tests/iter/titer14.nim: -------------------------------------------------------------------------------- 1 | proc f() = 2 | var s: seq[int] 3 | iterator a(): int = 4 | for x in s: yield x 5 | 6 | iterator b(): int = 7 | for x in a(): yield x 8 | -------------------------------------------------------------------------------- /tests/iter/titerautoerr1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got but expected 'string'" 3 | line: 8 4 | """ 5 | 6 | iterator a(): auto {.closure.} = 7 | if true: return "str" 8 | yield 1 9 | -------------------------------------------------------------------------------- /tests/iter/titerautoerr2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got but expected 'int literal(1)'" 3 | line: 8 4 | """ 5 | 6 | iterator b(): auto {.closure.} = 7 | yield 1 8 | if true: return "str" 9 | -------------------------------------------------------------------------------- /tests/iter/titerautoerr3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot infer the return type of 'bar'" 3 | line: 6 4 | """ 5 | 6 | iterator bar(): auto = 7 | discard 8 | for t in bar(): 9 | discard 10 | -------------------------------------------------------------------------------- /tests/iter/titerslice.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''2 3 | 3 4 | 4''' 5 | """ 6 | 7 | var t1 = @["1", "2", "3", "4"] 8 | for t in t1[1..3]: 9 | echo t 10 | -------------------------------------------------------------------------------- /tests/iter/tsubscript.nim: -------------------------------------------------------------------------------- 1 | # issue #14860 2 | 3 | type 4 | Dummie = object 5 | 6 | iterator `[]`(d: Dummie, a, b: int): int = discard 7 | 8 | let d = Dummie() 9 | 10 | for s in d[0, 1]: discard # error here 11 | -------------------------------------------------------------------------------- /tests/iter/ttypeofclosureiter.nim: -------------------------------------------------------------------------------- 1 | # issue #24859 2 | 3 | template u(): int = 4 | yield 0 5 | 0 6 | iterator s(): int {.closure.} = discard default(typeof(u())) 7 | let _ = s 8 | -------------------------------------------------------------------------------- /tests/js/t11353.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | {} 4 | {} 5 | ''' 6 | """ 7 | 8 | proc foo() = 9 | var bar: set[int16] = {} 10 | echo bar 11 | bar.incl(1) 12 | 13 | foo() 14 | foo() 15 | -------------------------------------------------------------------------------- /tests/js/t11697.nim: -------------------------------------------------------------------------------- 1 | import tables 2 | 3 | var xs: Table[int, Table[int, int]] 4 | 5 | doAssertRaises(KeyError): reset xs[0] 6 | -------------------------------------------------------------------------------- /tests/js/t12672.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "" 3 | """ 4 | 5 | proc foo = 6 | var x: seq[seq[int]] 7 | for row in x.mitems: 8 | let i = 1 9 | echo row 10 | inc row[i-1] 11 | 12 | foo() 13 | -------------------------------------------------------------------------------- /tests/js/t14570.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | 18 4 | ''' 5 | """ 6 | 7 | type A = range[15 .. 30] 8 | 9 | let a: A = 18 10 | 11 | echo ord(a) 12 | -------------------------------------------------------------------------------- /tests/js/t20233.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "yes" 3 | """ 4 | case 1.0 5 | of 1.0..2.0, 4.0: echo "yes" 6 | of 3.0: discard 7 | else: echo "no" -------------------------------------------------------------------------------- /tests/js/t20235.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: "run" 3 | output: "0 4" 4 | """ 5 | 6 | proc main = 7 | var s = "" 8 | s.setLen(4) 9 | echo s[0].ord, " ", s.len 10 | 11 | main() 12 | -------------------------------------------------------------------------------- /tests/js/t21209.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: "compile" 3 | cmd: "nim check --warning[UnusedImport]:off $file" 4 | """ 5 | 6 | import std/times 7 | -------------------------------------------------------------------------------- /tests/js/t21209.nims: -------------------------------------------------------------------------------- 1 | --b:js -------------------------------------------------------------------------------- /tests/js/t21439.nim: -------------------------------------------------------------------------------- 1 | proc test(a: openArray[string]): proc = 2 | let a = @a 3 | result = proc = 4 | for i in a: 5 | discard i 6 | 7 | 8 | const a = ["t1", "t2"] 9 | 10 | discard test(a) 11 | 12 | -------------------------------------------------------------------------------- /tests/js/t7109.nim: -------------------------------------------------------------------------------- 1 | iterator iter*(): int {.closure.} = 2 | yield 3 3 | 4 | var x = iter 5 | doAssert x() == 3 6 | 7 | let fIt = iterator(): int = yield 70 8 | doAssert fIt() == 70 9 | -------------------------------------------------------------------------------- /tests/js/t7127.nim: -------------------------------------------------------------------------------- 1 | doAssertRaises(DivByZeroDefect): discard 1 mod 0 2 | doAssertRaises(DivByZeroDefect): discard 1 div 0 -------------------------------------------------------------------------------- /tests/js/t7534.nim: -------------------------------------------------------------------------------- 1 | proc f(x: int): int = 2 | result = case x 3 | of 1: 2 4 | elif x == 2: 3 5 | else: 1 6 | 7 | doAssert 2 == f(f(f(f(1)))) 8 | -------------------------------------------------------------------------------- /tests/js/t8231.nim: -------------------------------------------------------------------------------- 1 | import strutils 2 | 3 | doAssert formatSize(2462056448, '.', bpIEC, false) == "2.293GiB" -------------------------------------------------------------------------------- /tests/js/t8821.nim: -------------------------------------------------------------------------------- 1 | 2 | proc isInt32(i: int): bool = 3 | case i 4 | of 1 .. 70000: 5 | return true 6 | else: 7 | return false 8 | 9 | doAssert isInt32(1) == true -------------------------------------------------------------------------------- /tests/js/t8914.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | @[42] 4 | @[24, 42] 5 | ''' 6 | """ 7 | 8 | var x = @[42,4242] 9 | x.delete(1) 10 | echo x 11 | x.insert(24) 12 | echo x 13 | -------------------------------------------------------------------------------- /tests/js/tcodegendeclvar.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | -1 4 | 2 5 | ''' 6 | ccodecheck: "'console.log(-1); var v_' \\d+ ' = [2]'" 7 | """ 8 | 9 | var v {.codegenDecl: "console.log(-1); var $2".} = 2 10 | echo v 11 | -------------------------------------------------------------------------------- /tests/js/tcsymbol.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--cc:gcc; --cc:tcc" 3 | """ 4 | 5 | doAssert not defined(gcc) 6 | doAssert not defined(tcc) -------------------------------------------------------------------------------- /tests/js/tdiscard.nim: -------------------------------------------------------------------------------- 1 | import dom 2 | 3 | discard Node() -------------------------------------------------------------------------------- /tests/js/temptyseq.nim: -------------------------------------------------------------------------------- 1 | # #12671 2 | 3 | proc foo = 4 | var x: seq[int] 5 | doAssertRaises(IndexDefect): 6 | inc x[0] 7 | 8 | foo() 9 | -------------------------------------------------------------------------------- /tests/js/testmagic.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''true 3 | 123 4 | ''' 5 | """ 6 | 7 | # This file tests some magic 8 | 9 | var foo = cstring("foo") 10 | var bar = cstring("foo") 11 | echo(foo == bar) 12 | echo "01234"[1 .. ^2] 13 | -------------------------------------------------------------------------------- /tests/js/testtojsstr.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output = "И\n" 3 | """ 4 | 5 | let s: string = "И\n" 6 | let cs = s.cstring 7 | 8 | echo $s 9 | -------------------------------------------------------------------------------- /tests/js/tfloatround.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | 3 4 | ''' 5 | """ 6 | 7 | echo int(22 / 7) 8 | -------------------------------------------------------------------------------- /tests/js/tjshello_stacktrace.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "Hello World" 3 | maxcodesize: 4500 4 | ccodecheck: "!@'function'" 5 | """ 6 | 7 | import jsconsole 8 | 9 | console.log "Hello World" 10 | -------------------------------------------------------------------------------- /tests/js/tjsnimscombined.nim: -------------------------------------------------------------------------------- 1 | import std/jsffi 2 | -------------------------------------------------------------------------------- /tests/js/tjsnimscombined.nims: -------------------------------------------------------------------------------- 1 | # test the condition where both `js` and `nimscript` are defined (nimscript receives priority) 2 | -------------------------------------------------------------------------------- /tests/js/tmodify_cstring.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cstring doesn't support `[]=` operator" 3 | """ 4 | 5 | var x = cstring"abcd" 6 | x[0] = 'x' 7 | -------------------------------------------------------------------------------- /tests/js/tunion.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "`{.union.}` is not implemented for js backend." 3 | """ 4 | 5 | type Foo {.union.} = object 6 | as_bytes: array[8, int8] 7 | data: int64 8 | -------------------------------------------------------------------------------- /tests/let/timportc2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'let' symbol requires an initialization" 3 | line: "7" 4 | """ 5 | 6 | # Test that this still works when not annotated with importc 7 | let test: cint 8 | echo test 9 | -------------------------------------------------------------------------------- /tests/lexer/tinvalidintegerliteral1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid number" 3 | file: "tinvalidintegerliteral1.nim" 4 | line: 7 5 | """ 6 | 7 | echo 0b 8 | -------------------------------------------------------------------------------- /tests/lexer/tinvalidintegerliteral2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid number" 3 | file: "tinvalidintegerliteral2.nim" 4 | line: 7 5 | """ 6 | 7 | echo 0x 8 | -------------------------------------------------------------------------------- /tests/lexer/tinvalidintegerliteral3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "0O5 is an invalid int literal; For octal literals use the '0o' prefix." 3 | file: "tinvalidintegerliteral3.nim" 4 | line: 7 5 | """ 6 | 7 | echo 0O5 8 | -------------------------------------------------------------------------------- /tests/lexer/tmissingnl.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid indentation" 3 | file: "tmissingnl.nim" 4 | line: 7 5 | """ 6 | 7 | import strutils let s: seq[int] = @[0, 1, 2, 3, 4, 5, 6] 8 | 9 | #s[1..3] = @[] 10 | -------------------------------------------------------------------------------- /tests/lookups/issue_23032/deep_scope.nim: -------------------------------------------------------------------------------- 1 | type A*[T] = object 2 | proc foo*(a: A[int]): bool = false 3 | -------------------------------------------------------------------------------- /tests/lookups/issue_23172/m23172.nim: -------------------------------------------------------------------------------- 1 | type 2 | Foo* = object 3 | Bar* = object 4 | 5 | func `$`*(x: Foo | Bar): string = 6 | "X" 7 | -------------------------------------------------------------------------------- /tests/lookups/mambsym1.nim: -------------------------------------------------------------------------------- 1 | import mambsym2 # import TExport 2 | 3 | type 4 | TExport* = enum x, y, z 5 | TOtherEnum* = enum mDec, mInc, mAssign 6 | 7 | proc ha() = 8 | var 9 | x: TExport # no error 10 | discard 11 | -------------------------------------------------------------------------------- /tests/lookups/mambsym2.nim: -------------------------------------------------------------------------------- 1 | type 2 | TExport* = enum a, b, c 3 | 4 | -------------------------------------------------------------------------------- /tests/lookups/mambsym3.nim: -------------------------------------------------------------------------------- 1 | # Module A 2 | var x*: string 3 | proc foo*(a: string) = 4 | echo "A: ", a 5 | -------------------------------------------------------------------------------- /tests/lookups/mambsym4.nim: -------------------------------------------------------------------------------- 1 | # Module B 2 | var x*: int 3 | proc foo*(b: int) = 4 | echo "B: ", b 5 | -------------------------------------------------------------------------------- /tests/lookups/mambsys1.nim: -------------------------------------------------------------------------------- 1 | import mambsys2 # import TExport 2 | 3 | type 4 | TExport* = enum x, y, z 5 | 6 | proc foo*(x: int) = 7 | discard 8 | -------------------------------------------------------------------------------- /tests/lookups/mambsys2.nim: -------------------------------------------------------------------------------- 1 | type 2 | TExport* = enum x, y, z # exactly the same type! 3 | 4 | proc foo*(x: int) = discard 5 | -------------------------------------------------------------------------------- /tests/lookups/mambtype1.nim: -------------------------------------------------------------------------------- 1 | type K* = object 2 | -------------------------------------------------------------------------------- /tests/lookups/mambtype2.nim: -------------------------------------------------------------------------------- 1 | import ./mambtype1 2 | export mambtype1 3 | template K*(kind: static int): auto = typedesc[mambtype1.K] 4 | template B*(kind: static int): auto = typedesc[mambtype1.K] 5 | -------------------------------------------------------------------------------- /tests/lookups/mbind3.nim: -------------------------------------------------------------------------------- 1 | # Module A 2 | var 3 | lastId = 0 4 | 5 | template genId*: int = 6 | bind lastId 7 | inc(lastId) 8 | lastId 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/lookups/mdisambsym1.nim: -------------------------------------------------------------------------------- 1 | proc count*(s: string): int = 2 | s.len 3 | -------------------------------------------------------------------------------- /tests/lookups/mdisambsym2.nim: -------------------------------------------------------------------------------- 1 | var count*: int = 10 2 | -------------------------------------------------------------------------------- /tests/lookups/mdisambsym3.nim: -------------------------------------------------------------------------------- 1 | const count* = 3.142 2 | -------------------------------------------------------------------------------- /tests/lookups/t23172.nim: -------------------------------------------------------------------------------- 1 | import issue_23172/m23172 2 | 3 | type FooX = distinct Foo 4 | 5 | func `$`*(x: FooX): string = 6 | $m23172.Foo(x) 7 | 8 | var a: FooX 9 | doAssert $a == "X" 10 | -------------------------------------------------------------------------------- /tests/lookups/tambsys.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "" 3 | """ 4 | # Test ambiguous symbols 5 | 6 | import mambsys1, mambsys2 7 | 8 | var 9 | v: mambsys1.TExport 10 | mambsys2.foo(3) #OUT 11 | -------------------------------------------------------------------------------- /tests/lookups/tdisambsym.nim: -------------------------------------------------------------------------------- 1 | # issue #15247 2 | 3 | import mdisambsym1, mdisambsym2, mdisambsym3 4 | 5 | proc twice(n: int): int = 6 | n*2 7 | 8 | doAssert twice(count) == 20 9 | -------------------------------------------------------------------------------- /tests/lookups/tmacroamb.nim: -------------------------------------------------------------------------------- 1 | # issue #12732 2 | 3 | import mmacroamb 4 | const s0 = currentPkgDir2 #[tt.Error 5 | ^ ambiguous identifier: 'currentPkgDir2' -- use one of the following:]# 6 | -------------------------------------------------------------------------------- /tests/lookups/tmoduleclash2.nim: -------------------------------------------------------------------------------- 1 | import std/heapqueue 2 | proc heapqueue(x: int) = discard 3 | let x: proc (x: int) = heapqueue 4 | let y: proc = heapqueue 5 | when false: 6 | let z = heapqueue 7 | -------------------------------------------------------------------------------- /tests/macros/mparsefile.nim: -------------------------------------------------------------------------------- 1 | let a = 1 2 | let b = 2 3 | let c = 4 | let d = 4 5 | -------------------------------------------------------------------------------- /tests/macros/t14329.nim: -------------------------------------------------------------------------------- 1 | import macros 2 | 3 | macro myMacro(n) = 4 | let x = if true: newLit"test" else: error "error", n 5 | -------------------------------------------------------------------------------- /tests/macros/t15751.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --hints:off $file" 3 | nimout: "out" 4 | """ 5 | 6 | # bug #15751 7 | macro print(n: untyped): untyped = 8 | echo n.repr 9 | 10 | print: 11 | out 12 | -------------------------------------------------------------------------------- /tests/macros/t21593.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | nimout: ''' 3 | StmtList 4 | UIntLit 18446744073709551615 5 | IntLit -1''' 6 | """ 7 | 8 | import macros 9 | 10 | dumpTree: 11 | 0xFFFFFFFF_FFFFFFFF'u 12 | 0xFFFFFFFF_FFFFFFFF 13 | 14 | -------------------------------------------------------------------------------- /tests/macros/t7454.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "expression has no type:" 3 | line: 8 4 | """ 5 | 6 | macro p(t: typedesc): typedesc = 7 | discard 8 | var a: p(int) 9 | -------------------------------------------------------------------------------- /tests/macros/tmacroaspragma.nim: -------------------------------------------------------------------------------- 1 | import macros 2 | 3 | macro foo(x: untyped): untyped = 4 | echo treerepr(callsite()) 5 | result = newNimNode(nnkStmtList) 6 | 7 | proc zoo() {.foo.} = echo "hi" 8 | -------------------------------------------------------------------------------- /tests/macros/treturnsempty.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch" 3 | line: 11 4 | """ 5 | # bug #2372 6 | macro foo(dummy: int): untyped = 7 | discard 8 | 9 | proc takeStr(s: string) = echo s 10 | 11 | takeStr foo(12) 12 | -------------------------------------------------------------------------------- /tests/macros/tsame_name_497.nim: -------------------------------------------------------------------------------- 1 | 2 | import macro_bug 3 | 4 | type TObj = object 5 | 6 | proc f(o: TObj) {.macro_bug.} = discard 7 | -------------------------------------------------------------------------------- /tests/manyloc/argument_parser/ex_wget.nim.cfg: -------------------------------------------------------------------------------- 1 | # This file exists only to mark 'ex_wget' as the project file 2 | -------------------------------------------------------------------------------- /tests/manyloc/keineschweine/dependencies/sfml/sfml_vector.nim: -------------------------------------------------------------------------------- 1 | import sfml, math, strutils 2 | -------------------------------------------------------------------------------- /tests/manyloc/keineschweine/server/dirserver_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "network":"lamenet", 3 | "port":2049, 4 | "zones":[ 5 | {"name":"alphazone","key":"skittles"} 6 | ] 7 | } -------------------------------------------------------------------------------- /tests/manyloc/keineschweine/server/nim.cfg: -------------------------------------------------------------------------------- 1 | debugger = off 2 | path = ".." 3 | path = "../genpacket" 4 | path = "../helpers" 5 | define = NoSFML 6 | -------------------------------------------------------------------------------- /tests/manyloc/nake/nakefile.nim.cfg: -------------------------------------------------------------------------------- 1 | path = "dependencies/nake" 2 | -------------------------------------------------------------------------------- /tests/manyloc/named_argument_bug/main.nim.cfg: -------------------------------------------------------------------------------- 1 | # this file only exists to mark 'main.nim' as the main file 2 | 3 | --path:"$projectpath" 4 | -------------------------------------------------------------------------------- /tests/manyloc/named_argument_bug/tri_engine/config.nim: -------------------------------------------------------------------------------- 1 | when defined(doublePrecision): 2 | type 3 | TR* = float64 4 | else: 5 | type 6 | TR* = float32 7 | -------------------------------------------------------------------------------- /tests/manyloc/named_argument_bug/tri_engine/math/circle.nim: -------------------------------------------------------------------------------- 1 | import 2 | ../config, 3 | vec 4 | 5 | type 6 | TCircle* = tuple[p: TV2[TR], r: TR] 7 | 8 | converter toCircle*(o: TR): TCircle = 9 | (newV2(), o) 10 | -------------------------------------------------------------------------------- /tests/manyloc/named_argument_bug/tri_engine/math/rect.nim: -------------------------------------------------------------------------------- 1 | import 2 | tri_engine/config, 3 | tri_engine/math/vec 4 | 5 | type 6 | TRect* = tuple[min, size: TV2[TR]] 7 | 8 | proc max*(o: TRect): TV2[TR] = o.min + o.size 9 | -------------------------------------------------------------------------------- /tests/manyloc/packages/noconflicts.nim.cfg: -------------------------------------------------------------------------------- 1 | # Mark noconflicts as project file -------------------------------------------------------------------------------- /tests/manyloc/packages/os.nim: -------------------------------------------------------------------------------- 1 | 2 | # Overrides lib/pure/os.nim 3 | 4 | proc yay* = echo "new os.nim" 5 | 6 | -------------------------------------------------------------------------------- /tests/manyloc/packages/package1/p1.babel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/manyloc/packages/package1/p1.babel -------------------------------------------------------------------------------- /tests/manyloc/packages/package1/strutils.nim: -------------------------------------------------------------------------------- 1 | 2 | # Overrides lib/pure/os.nim 3 | 4 | proc foo* = echo "package1/strutils" 5 | 6 | -------------------------------------------------------------------------------- /tests/manyloc/packages/package2/p2.babel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/manyloc/packages/package2/p2.babel -------------------------------------------------------------------------------- /tests/manyloc/packages/package2/strutils.nim: -------------------------------------------------------------------------------- 1 | 2 | # Overrides lib/pure/os.nim 3 | 4 | proc foo* = echo "package2/strutils" 5 | 6 | -------------------------------------------------------------------------------- /tests/manyloc/standalone/barebone.nim.cfg: -------------------------------------------------------------------------------- 1 | --os:standalone 2 | --gc:none 3 | -------------------------------------------------------------------------------- /tests/manyloc/standalone2/tavr.nim: -------------------------------------------------------------------------------- 1 | # bug #16404 2 | 3 | proc printf(frmt: cstring) {.varargs, header: "", cdecl.} 4 | 5 | var x = 0 6 | inc x 7 | printf("hi %ld\n", x+4777) 8 | -------------------------------------------------------------------------------- /tests/manyloc/standalone2/tavr.nim.cfg: -------------------------------------------------------------------------------- 1 | --gc:arc 2 | --cpu:avr 3 | --os:standalone 4 | --compileOnly 5 | --threads:off 6 | -------------------------------------------------------------------------------- /tests/metatype/typedesc_as_value.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'typedesc[int]' for var" 3 | """ 4 | 5 | 6 | var x = int 7 | 8 | echo x 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/method/tmethod.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "\'method\' needs a parameter that has an object type" 3 | file: "tmethod.nim" 4 | line: 7 5 | """ 6 | 7 | method m(i: int): int = 8 | return 5 9 | -------------------------------------------------------------------------------- /tests/misc/99bottles.nim: -------------------------------------------------------------------------------- 1 | # Test if the compiler detects invalid module names 2 | -------------------------------------------------------------------------------- /tests/misc/m15316.nim: -------------------------------------------------------------------------------- 1 | proc foo = (if) 2 | -------------------------------------------------------------------------------- /tests/misc/m15955.nim: -------------------------------------------------------------------------------- 1 | proc add*(a, b: int): int {.cdecl, exportc.} = 2 | a + b 3 | proc sub*(a, b: int): int {.cdecl, exportc.} = 4 | a - b -------------------------------------------------------------------------------- /tests/misc/m20149.nim: -------------------------------------------------------------------------------- 1 | let x = 12 2 | echo x 3 | -------------------------------------------------------------------------------- /tests/misc/m20456.nims: -------------------------------------------------------------------------------- 1 | echo 123 -------------------------------------------------------------------------------- /tests/misc/mbetterrun.nim: -------------------------------------------------------------------------------- 1 | const mbetterrunVal {.strdefine.} = "" 2 | static: echo "compiling: " & mbetterrunVal 3 | echo "running: " & mbetterrunVal 4 | -------------------------------------------------------------------------------- /tests/misc/minit.nim: -------------------------------------------------------------------------------- 1 | # Test the new initialization for modules 2 | write(stdout, "Hello from module! ") 3 | -------------------------------------------------------------------------------- /tests/misc/modulea.nim: -------------------------------------------------------------------------------- 1 | type modulea* = object 2 | a: int 3 | -------------------------------------------------------------------------------- /tests/misc/mvarious.nim: -------------------------------------------------------------------------------- 1 | # Test a submodule 2 | 3 | #type 4 | # TStringArr = array[0.. *] of string 5 | 6 | proc exportme* = discard 7 | -------------------------------------------------------------------------------- /tests/misc/t12480.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'return' not allowed here" 3 | """ 4 | 5 | return -------------------------------------------------------------------------------- /tests/misc/t15351.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: "compile" 3 | """ 4 | var 5 | ## TODO: broken 6 | -------------------------------------------------------------------------------- /tests/misc/t16244.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got " 3 | line: 9 4 | """ 5 | 6 | proc g(): auto = 1 7 | proc h(): auto = 1.0 8 | 9 | var a = g() + h() 10 | -------------------------------------------------------------------------------- /tests/misc/t16264.nim: -------------------------------------------------------------------------------- 1 | import times 2 | doAssert low(Time) == fromUnix(0) -------------------------------------------------------------------------------- /tests/misc/t20253.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'result' requires explicit initialization" 3 | line: 10 4 | """ 5 | 6 | type Meow {.requiresInit.} = object 7 | init: bool 8 | 9 | proc initMeow(): Meow = 10 | discard 11 | -------------------------------------------------------------------------------- /tests/misc/t21443.nim: -------------------------------------------------------------------------------- 1 | import std/envvars 2 | 3 | # bug #19292 4 | putEnv("NimPutEnvTest", "test") 5 | # bug #21122 6 | doAssert getEnv("NimPutEnvTest") == "test" 7 | -------------------------------------------------------------------------------- /tests/misc/t23240.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c foo/bar.nim" 3 | action: "reject" 4 | errormsg: "cannot open 'foo/'" 5 | file: "" 6 | """ 7 | -------------------------------------------------------------------------------- /tests/misc/t3907.nim: -------------------------------------------------------------------------------- 1 | import std/assertions 2 | 3 | let a = 0 4 | let b = if false: -1 else: a 5 | doAssert b == 0 6 | 7 | let c: range[0..high(int)] = 0 8 | let d = if false: -1 else: c 9 | 10 | doAssert d == 0 11 | -------------------------------------------------------------------------------- /tests/misc/t6549.nim: -------------------------------------------------------------------------------- 1 | 2 | const l = $(range[low(uint64) .. high(uint64)]) 3 | const r = "range 0..18446744073709551615(uint64)" 4 | doAssert l == r 5 | -------------------------------------------------------------------------------- /tests/misc/t9710.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--debugger:native" 3 | """ 4 | # bug #9710 5 | for i in 1 || 200: 6 | discard i 7 | -------------------------------------------------------------------------------- /tests/misc/tcharinc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "1" 3 | """ 4 | 5 | var c = '\0' 6 | while true: 7 | if c == '\xFF': break 8 | inc c 9 | 10 | echo "1" 11 | -------------------------------------------------------------------------------- /tests/misc/tfib.nim: -------------------------------------------------------------------------------- 1 | 2 | iterator fibonacci(): int = 3 | var a = 0 4 | var b = 1 5 | while true: 6 | yield a 7 | var c = b 8 | b = a 9 | a = a + c 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/misc/tjoinable.nim: -------------------------------------------------------------------------------- 1 | # checks that megatest allows duplicate names, see also `tests/testament/tjoinable.nim` 2 | doAssert defined(testing) 3 | doAssert defined(nimMegatest) 4 | -------------------------------------------------------------------------------- /tests/misc/tmodulea.nim: -------------------------------------------------------------------------------- 1 | from modulea import modulea 2 | 3 | #bug #6731 4 | -------------------------------------------------------------------------------- /tests/misc/tnolen.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got " 3 | line: 8 4 | """ 5 | 6 | # please finally disallow Len(3) 7 | 8 | echo len(3) 9 | -------------------------------------------------------------------------------- /tests/misc/tparedef.nim: -------------------------------------------------------------------------------- 1 | # This test is now superfluous: 2 | 3 | proc a(a: int) = 4 | return 5 | -------------------------------------------------------------------------------- /tests/misc/tsamename2.nim: -------------------------------------------------------------------------------- 1 | proc fooBar*()=discard 2 | proc fooBar2*()=discard 3 | proc callFun*[Fun](processPattern: Fun) = 4 | processPattern() 5 | -------------------------------------------------------------------------------- /tests/misc/tvcc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--cc:vcc" 3 | disabled: "linux" 4 | disabled: "bsd" 5 | disabled: "osx" 6 | disabled: "unix" 7 | disabled: "posix" 8 | """ 9 | doAssert true 10 | -------------------------------------------------------------------------------- /tests/misc/åäö.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: run 3 | """ 4 | 5 | # Tests that module names can contain multi byte characters 6 | 7 | let a = 1 8 | doAssert åäö.a == 1 9 | 10 | proc inlined() {.inline.} = discard 11 | inlined() -------------------------------------------------------------------------------- /tests/modules/UpperCased.nim: -------------------------------------------------------------------------------- 1 | 2 | # bug #5076 3 | 4 | var str*: string 5 | 6 | UpperCased.str = "hello" 7 | -------------------------------------------------------------------------------- /tests/modules/a/module_name_clashes.nim: -------------------------------------------------------------------------------- 1 | # See `tmodule_name_clashes` 2 | 3 | import ../b/module_name_clashes 4 | type A* = object 5 | b*: B 6 | 7 | proc print*(a: A) = 8 | echo repr a 9 | -------------------------------------------------------------------------------- /tests/modules/a/utils.nim: -------------------------------------------------------------------------------- 1 | proc burnMem*(a: int) = 2 | discard 3 | -------------------------------------------------------------------------------- /tests/modules/b/module_name_clashes.nim: -------------------------------------------------------------------------------- 1 | # See `tmodule_name_clashes` 2 | 3 | type B* = object 4 | -------------------------------------------------------------------------------- /tests/modules/b/utils.nim: -------------------------------------------------------------------------------- 1 | # module b/utils.nim 2 | let x* = 10 3 | -------------------------------------------------------------------------------- /tests/modules/definitions.nim: -------------------------------------------------------------------------------- 1 | var v*: int 2 | proc p* = echo "proc p called" 3 | template t* = echo "template t expanded" 4 | 5 | -------------------------------------------------------------------------------- /tests/modules/m9627/a.nim: -------------------------------------------------------------------------------- 1 | var a = 10 2 | -------------------------------------------------------------------------------- /tests/modules/m9627/b.nim: -------------------------------------------------------------------------------- 1 | var b = 9 2 | -------------------------------------------------------------------------------- /tests/modules/mexport2a.nim: -------------------------------------------------------------------------------- 1 | 2 | import mexport2b 3 | export mexport2b 4 | proc printAbc*() = echo "abc" 5 | 6 | proc foo*() = echo "A.foo" 7 | 8 | -------------------------------------------------------------------------------- /tests/modules/mexport2b.nim: -------------------------------------------------------------------------------- 1 | proc printXyz*() = echo "xyz" 2 | 3 | proc foo*(x: int) = echo "B.foo" 4 | -------------------------------------------------------------------------------- /tests/modules/mexporta.nim: -------------------------------------------------------------------------------- 1 | # module A 2 | import mexportb 3 | export mexportb.TMyObject, mexportb.xyz 4 | 5 | export mexportb.q 6 | 7 | proc `$`*(x: TMyObject): string = "my object" 8 | 9 | -------------------------------------------------------------------------------- /tests/modules/mexportb.nim: -------------------------------------------------------------------------------- 1 | # module B 2 | type TMyObject* = object 3 | 4 | const xyz* = 13 5 | 6 | proc q*(x: int): int = 6 7 | proc q*(x: string): string = "8" 8 | -------------------------------------------------------------------------------- /tests/modules/mforwarded_pure_enum.nim: -------------------------------------------------------------------------------- 1 | 2 | import mforwarded_pure_enum2 3 | export mforwarded_pure_enum2.PureEnum 4 | -------------------------------------------------------------------------------- /tests/modules/mforwarded_pure_enum2.nim: -------------------------------------------------------------------------------- 1 | 2 | type 3 | PureEnum* {.pure.} = enum 4 | x, y, z 5 | -------------------------------------------------------------------------------- /tests/modules/mimport_in_config.nim: -------------------------------------------------------------------------------- 1 | type 2 | DefinedInB* = int 3 | -------------------------------------------------------------------------------- /tests/modules/mincludeprefix.nim: -------------------------------------------------------------------------------- 1 | const bar = 456 2 | -------------------------------------------------------------------------------- /tests/modules/mincludetemplate.nim: -------------------------------------------------------------------------------- 1 | const foo = 123 2 | -------------------------------------------------------------------------------- /tests/modules/mmodule_same_proc.nim: -------------------------------------------------------------------------------- 1 | 2 | # the module being the same name as the proc 3 | # is a requirement to trigger the error 4 | import mmodule_same_proc_client 5 | 6 | proc bar*[T](foo: T): bool = foo.mmodule_same_proc_client() 7 | -------------------------------------------------------------------------------- /tests/modules/mmodule_same_proc_client.nim: -------------------------------------------------------------------------------- 1 | 2 | proc mmodule_same_proc_client*(x: string): bool = x.len > 0 3 | -------------------------------------------------------------------------------- /tests/modules/mnamspc1.nim: -------------------------------------------------------------------------------- 1 | import mnamspc2 2 | 3 | -------------------------------------------------------------------------------- /tests/modules/mnamspc2.nim: -------------------------------------------------------------------------------- 1 | # export an identifier: 2 | var 3 | global*: int 4 | -------------------------------------------------------------------------------- /tests/modules/mnotuniquename.nim: -------------------------------------------------------------------------------- 1 | proc flat*() = echo "flat" 2 | -------------------------------------------------------------------------------- /tests/modules/mopaque.nim: -------------------------------------------------------------------------------- 1 | type 2 | TLexer* {.final.} = object 3 | line*: int 4 | filename*: string 5 | buffer: cstring 6 | 7 | proc noProcVar*(): int = 18 8 | -------------------------------------------------------------------------------- /tests/modules/morder_depa.nim: -------------------------------------------------------------------------------- 1 | 2 | import morder_depb 3 | 4 | proc Foo*(x: int): Foo = discard 5 | 6 | -------------------------------------------------------------------------------- /tests/modules/morder_depb.nim: -------------------------------------------------------------------------------- 1 | type Foo* = array[2, byte] 2 | -------------------------------------------------------------------------------- /tests/modules/mrange.nim: -------------------------------------------------------------------------------- 1 | 2 | proc range*() = echo "yo" 3 | 4 | proc set*(a: int) = 5 | discard 6 | -------------------------------------------------------------------------------- /tests/modules/mrecmod.nim: -------------------------------------------------------------------------------- 1 | import trecmod 2 | -------------------------------------------------------------------------------- /tests/modules/proxy_module.nim: -------------------------------------------------------------------------------- 1 | import definitions 2 | export definitions except p 3 | 4 | -------------------------------------------------------------------------------- /tests/modules/seq.nim: -------------------------------------------------------------------------------- 1 | var seq: seq[int] 2 | var b: seq[float] 3 | 4 | echo seq 5 | echo b 6 | -------------------------------------------------------------------------------- /tests/modules/t8665.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | import treorder 6 | -------------------------------------------------------------------------------- /tests/modules/t9627.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "109" 3 | """ 4 | 5 | include m9627 / [a, b] 6 | 7 | echo a, b 8 | -------------------------------------------------------------------------------- /tests/modules/texplicit_system_import.nim: -------------------------------------------------------------------------------- 1 | import system except `+` 2 | 3 | discard """ 4 | errormsg: "undeclared identifier: '+'" 5 | line: 9 6 | """ 7 | 8 | 9 | echo 4+5 10 | -------------------------------------------------------------------------------- /tests/modules/tfowarded_pure_enum.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''z''' 3 | """ 4 | 5 | import mforwarded_pure_enum as t2 6 | 7 | echo z 8 | -------------------------------------------------------------------------------- /tests/modules/timport_in_config.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''hallo''' 3 | joinable: false 4 | """ 5 | 6 | # bug #9978, #9994 7 | var x: DefinedInB 8 | 9 | echo "hi".replace("i", "allo") 10 | -------------------------------------------------------------------------------- /tests/modules/timport_in_config.nim.cfg: -------------------------------------------------------------------------------- 1 | --import: "strutils" 2 | --import: "mimport_in_config" 3 | -------------------------------------------------------------------------------- /tests/modules/timportexcept.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: '%'" 3 | line: 9 4 | """ 5 | 6 | import strutils except `%` 7 | 8 | # doesn't work 9 | echo "$1" % "abc" 10 | -------------------------------------------------------------------------------- /tests/modules/tincludeas.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Cannot use 'as' in 'include'." 3 | line: 6 4 | """ 5 | 6 | include foobar as foo 7 | -------------------------------------------------------------------------------- /tests/modules/tincludeprefix.nim: -------------------------------------------------------------------------------- 1 | include ./[mincludeprefix, mincludetemplate] 2 | doAssert foo == 123 3 | doAssert bar == 456 4 | -------------------------------------------------------------------------------- /tests/modules/tincludetemplate.nim: -------------------------------------------------------------------------------- 1 | # issue #12539 2 | 3 | template includePath(n: untyped) = include ../modules/n # But `include n` works 4 | includePath(mincludetemplate) 5 | doAssert foo == 123 6 | -------------------------------------------------------------------------------- /tests/modules/tmodule_same_proc.nim: -------------------------------------------------------------------------------- 1 | 2 | import mmodule_same_proc 3 | 4 | # importing baz causes the error not to trigger 5 | #import baz 6 | 7 | # bug #11188 8 | 9 | discard "foo".bar() 10 | -------------------------------------------------------------------------------- /tests/modules/tnotuniquename.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''nested 3 | flat''' 4 | """ 5 | 6 | import mnotuniquename 7 | import tnotuniquename_dir/mnotuniquename as nun 8 | 9 | nested() 10 | flat() 11 | -------------------------------------------------------------------------------- /tests/modules/tnotuniquename_dir/mnotuniquename.nim: -------------------------------------------------------------------------------- 1 | 2 | proc nested*() = echo "nested" 3 | -------------------------------------------------------------------------------- /tests/modules/torder_dep.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''[0, 0]''' 3 | """ 4 | 5 | import morder_depb 6 | import morder_depa 7 | 8 | # bug #11187 9 | 10 | echo Foo(3) 11 | -------------------------------------------------------------------------------- /tests/modules/trecinca.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "recursive dependency: 'trecincb.nim'" 3 | file: "trecincb.nim" 4 | line: 9 5 | """ 6 | # Test recursive includes 7 | 8 | include trecincb 9 | 10 | echo "trecina" 11 | -------------------------------------------------------------------------------- /tests/modules/trecincb.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "recursive dependency: 'trecincb.nim'" 3 | file: "trecincb.nim" 4 | line: 9 5 | """ 6 | # Test recursive includes 7 | 8 | 9 | include trecincb 10 | 11 | echo "trecinb" 12 | -------------------------------------------------------------------------------- /tests/modules/trecmod.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "recursive module dependency detected" 3 | file: "mrecmod.nim" 4 | line: 1 5 | disabled: true 6 | """ 7 | # recursive module 8 | import mrecmod 9 | -------------------------------------------------------------------------------- /tests/modules/tseq.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | joinable: false 3 | output: '''@[] 4 | @[] 5 | ''' 6 | """ 7 | 8 | import seq 9 | -------------------------------------------------------------------------------- /tests/modules/tuppercased.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "hello" 3 | """ 4 | 5 | import UpperCased 6 | 7 | # stress normalization rules: 8 | echo Upper_Cased.str 9 | -------------------------------------------------------------------------------- /tests/modules/tutils_ab.nim: -------------------------------------------------------------------------------- 1 | import a/utils as autils, b/utils 2 | 3 | # bug #12420 4 | 5 | burnMem(x) 6 | -------------------------------------------------------------------------------- /tests/msgs/mspellsuggest.nim: -------------------------------------------------------------------------------- 1 | proc fooBar4*(a: int) = discard 2 | var fooBar9* = 0 3 | 4 | var fooCar* = 0 5 | type FooBar* = int 6 | type FooCar* = int 7 | type GooBa* = int 8 | -------------------------------------------------------------------------------- /tests/msgs/mused2b.nim: -------------------------------------------------------------------------------- 1 | import mused2c 2 | export mused2c 3 | 4 | -------------------------------------------------------------------------------- /tests/msgs/mused2c.nim: -------------------------------------------------------------------------------- 1 | proc baz*() = discard -------------------------------------------------------------------------------- /tests/msgs/thints_off.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--hints:off" 3 | """ 4 | doAssert true 5 | -------------------------------------------------------------------------------- /tests/navigator/minclude.nim: -------------------------------------------------------------------------------- 1 | # An include file. 2 | foo(3) 3 | -------------------------------------------------------------------------------- /tests/newconfig/bar/config.nims: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/newconfig/bar/config.nims -------------------------------------------------------------------------------- /tests/newconfig/bar/mfoo.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/newconfig/bar/mfoo.nim -------------------------------------------------------------------------------- /tests/newconfig/bar/mfoo.nim.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/newconfig/bar/mfoo.nim.cfg -------------------------------------------------------------------------------- /tests/newconfig/bar/mfoo.nims: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/newconfig/bar/mfoo.nims -------------------------------------------------------------------------------- /tests/newconfig/bar/nim.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/newconfig/bar/nim.cfg -------------------------------------------------------------------------------- /tests/newconfig/foo2/mfoo2.customext: -------------------------------------------------------------------------------- 1 | doAssert defined(nimscript) 2 | echo "123" 3 | -------------------------------------------------------------------------------- /tests/newconfig/mconfigcheck.nims: -------------------------------------------------------------------------------- 1 | mode = ScriptMode.Verbose 2 | proc build() = 3 | echo "building nim... " 4 | exec "sleep 10" 5 | exec "nonexistant command" 6 | echo getCurrentDir() 7 | 8 | echo "hello" 9 | build() 10 | -------------------------------------------------------------------------------- /tests/newconfig/mymath.nim: -------------------------------------------------------------------------------- 1 | 2 | 3 | proc ln*(x: float): float = 4 | return 0.5 5 | -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/linkedPkgs/pkgA-0.1.0/pkgA.nimble-link: -------------------------------------------------------------------------------- 1 | ../../simplePkgs/pkgA-0.1.0/pkgA.nimble 2 | ../../simplePkgs/pkgA-0.1.0/ -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/linkedPkgs/pkgB-#head/pkgB.nimble-link: -------------------------------------------------------------------------------- 1 | ../../simplePkgs/pkgB-#head/pkgB.nimble 2 | ../../simplePkgs/pkgB-#head/ -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/linkedPkgs/pkgB-0.1.0/pkgB.nimble-link: -------------------------------------------------------------------------------- 1 | ../../simplePkgs/pkgB-0.1.0/pkgB.nimble 2 | ../../simplePkgs/pkgB-0.1.0/ -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgA-0.1.0/pkgA.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/nimble/nimbleDir/simplePkgs/pkgA-0.1.0/pkgA.nimble -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgA-0.1.0/pkgA/module.nim: -------------------------------------------------------------------------------- 1 | proc pkgATest*(): int = 1 -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgB-#head/pkgB.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/nimble/nimbleDir/simplePkgs/pkgB-#head/pkgB.nimble -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgB-#head/pkgB/module.nim: -------------------------------------------------------------------------------- 1 | proc pkgBTest*(): int64 = 0xDEADBEEF -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgB-0.1.0/pkgB.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/nimble/nimbleDir/simplePkgs/pkgB-0.1.0/pkgB.nimble -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgB-0.1.0/pkgB/module.nim: -------------------------------------------------------------------------------- 1 | proc pkgBTest*(): int64 = 0 -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgC-#aa11/pkgC.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/nimble/nimbleDir/simplePkgs/pkgC-#aa11/pkgC.nimble -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgC-#aa11/pkgC/module.nim: -------------------------------------------------------------------------------- 1 | proc pkgCTest*(): int64 = 1 -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgC-#head/pkgC.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/nimble/nimbleDir/simplePkgs/pkgC-#head/pkgC.nimble -------------------------------------------------------------------------------- /tests/nimble/nimbleDir/simplePkgs/pkgC-#head/pkgC/module.nim: -------------------------------------------------------------------------------- 1 | proc pkgCTest*(): int64 = 0xDEADBEEF -------------------------------------------------------------------------------- /tests/nimble/readme.md: -------------------------------------------------------------------------------- 1 | This directory contains tests for the --nimblePath feature. 2 | 3 | -------------------------------------------------------------------------------- /tests/nimdoc/imp.nim: -------------------------------------------------------------------------------- 1 | proc fn5*() = discard 2 | -------------------------------------------------------------------------------- /tests/nimdoc/readme.md: -------------------------------------------------------------------------------- 1 | ## links 2 | * $nim/nimdoc/tester.nim: tests html validation 3 | * $nim/tests/nimdoc/: tests `runnableExamples` + `nim doc` logic 4 | -------------------------------------------------------------------------------- /tests/nimdoc/sub/imp.nim: -------------------------------------------------------------------------------- 1 | proc fn4*() = discard 2 | -------------------------------------------------------------------------------- /tests/nimdoc/sub/imp2.nim: -------------------------------------------------------------------------------- 1 | proc fn3*() = discard 2 | -------------------------------------------------------------------------------- /tests/nimdoc/sub/mmain.nim: -------------------------------------------------------------------------------- 1 | {.warning[UnusedImport]: off.} 2 | 3 | import ../imp as impa 4 | import imp as impb 5 | import imp2 6 | 7 | proc fn1*() = discard 8 | proc fn2*() = discard 9 | -------------------------------------------------------------------------------- /tests/niminaction/Chapter2/explicit_discard.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "has to be used (or discarded)" 3 | line: 7 4 | """ 5 | 6 | proc myProc(name: string): string = "Hello " & name 7 | myProc("Dominik") 8 | -------------------------------------------------------------------------------- /tests/niminaction/Chapter2/no_iterator.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch" 3 | line: 6 4 | """ 5 | 6 | for i in 5: 7 | echo i 8 | -------------------------------------------------------------------------------- /tests/niminaction/Chapter2/no_seq_type.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot infer the type of the sequence" 3 | line: 6 4 | """ 5 | 6 | var list = @[] 7 | -------------------------------------------------------------------------------- /tests/niminaction/Chapter3/ChatApp/src/client.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on 2 | -------------------------------------------------------------------------------- /tests/niminaction/Chapter3/various3.nim.cfg: -------------------------------------------------------------------------------- 1 | threads:on -------------------------------------------------------------------------------- /tests/niminaction/Chapter6/WikipediaStats/concurrency.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on 2 | -------------------------------------------------------------------------------- /tests/niminaction/Chapter6/WikipediaStats/concurrency_regex.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on 2 | -------------------------------------------------------------------------------- /tests/niminaction/Chapter6/WikipediaStats/parallel_counts.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on -------------------------------------------------------------------------------- /tests/niminaction/Chapter6/WikipediaStats/race_condition.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on -------------------------------------------------------------------------------- /tests/niminaction/Chapter6/WikipediaStats/unguarded_access.nim.cfg: -------------------------------------------------------------------------------- 1 | --threads:on -------------------------------------------------------------------------------- /tests/niminaction/Chapter7/Tweeter/tests/database_test.nims: -------------------------------------------------------------------------------- 1 | --path:"../src" 2 | #switch("path", "./src") 3 | -------------------------------------------------------------------------------- /tests/objects/mobjconstr_msgs.nim: -------------------------------------------------------------------------------- 1 | type 2 | PrivateField* = object 3 | priv: string 4 | -------------------------------------------------------------------------------- /tests/objects/tillegal_recursion.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Cannot inherit from: 'Foo:ObjectType'" 3 | line: 7 4 | """ 5 | # bug #1691 6 | type 7 | Foo = ref object of Foo 8 | -------------------------------------------------------------------------------- /tests/objects/tillegal_recursion2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Cannot inherit from: 'Foo'" 3 | line: 6 4 | """ 5 | type 6 | Foo = object of Foo 7 | -------------------------------------------------------------------------------- /tests/objects/tillegal_recursion3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Cannot inherit from: 'Foo'" 3 | line: 6 4 | """ 5 | type 6 | Foo = object of ref Foo 7 | -------------------------------------------------------------------------------- /tests/objects/trefobjfieldoverload.nim: -------------------------------------------------------------------------------- 1 | block: # issue #24492 2 | type MyType = ref object 3 | a: int 4 | 5 | proc a(val: MyType, i: int) = discard 6 | MyType().a(100) 7 | -------------------------------------------------------------------------------- /tests/objects/tunsafenew.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "conversion from int literal(-1) to Natural is invalid" 3 | """ 4 | 5 | type 6 | Obj = object 7 | case b: bool 8 | else: discard 9 | var o: ref Obj 10 | unsafeNew(o, -1) -------------------------------------------------------------------------------- /tests/openarray/t8259.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'openArray[int]' for result" 3 | line: 6 4 | """ 5 | 6 | proc foo(a: openArray[int]):auto = a 7 | echo foo(toOpenArray([1, 2], 0, 2)) 8 | -------------------------------------------------------------------------------- /tests/openarray/topena1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type" 3 | file: "topena1.nim" 4 | line: 9 5 | """ 6 | # Tests a special bug 7 | 8 | var 9 | x: ref openArray[string] #ERROR_MSG invalid type 10 | -------------------------------------------------------------------------------- /tests/overflow/tdistinct_range.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | outputsub: "Error: unhandled exception: over- or underflow [OverflowDefect]" 3 | exitcode: "1" 4 | """ 5 | var x: distinct range[0..5] 6 | dec(x) -------------------------------------------------------------------------------- /tests/overflow/toverflow2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | outputsub: "Error: unhandled exception: over- or underflow [OverflowDefect]" 3 | exitcode: "1" 4 | """ 5 | var a : int32 = 2147483647 6 | var b : int32 = 2147483647 7 | var c = a + b 8 | -------------------------------------------------------------------------------- /tests/overflow/twronginference.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot convert 256 to int8" 3 | line: 9 4 | """ 5 | 6 | # issue #23177 7 | 8 | var x: int8 9 | x = 256 10 | echo x # 0 11 | -------------------------------------------------------------------------------- /tests/overload/importA.nim: -------------------------------------------------------------------------------- 1 | type 2 | Field* = object 3 | elemSize*: int 4 | 5 | template `+`*(x: untyped, y: Field): untyped = x 6 | -------------------------------------------------------------------------------- /tests/overload/t7416.nim: -------------------------------------------------------------------------------- 1 | type 2 | Foo[T] = object 3 | IntFoo = Foo[int] 4 | 5 | proc bar(b: object|tuple) = discard 6 | proc bar(b: IntFoo) = discard 7 | 8 | var f: IntFoo 9 | bar(f) -------------------------------------------------------------------------------- /tests/overload/tambiguousexplicitgeneric.nim: -------------------------------------------------------------------------------- 1 | # related to issue #8064 2 | 3 | import tables 4 | 5 | let x = values[int] #[tt.Error 6 | ^ ambiguous identifier: 'values' -- use one of the following:]# 7 | -------------------------------------------------------------------------------- /tests/overload/texplicitgenericdiscard.nim: -------------------------------------------------------------------------------- 1 | # issue #8064 2 | 3 | import tables 4 | 5 | values[int] #[tt.Error 6 | ^ ambiguous identifier: 'values' -- use one of the following:]# 7 | # this happens before discard check, so no discard error 8 | -------------------------------------------------------------------------------- /tests/overload/tissue966.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got " 3 | """ 4 | 5 | type 6 | PTest = ref object 7 | 8 | proc test(x: PTest, y: int) = discard 9 | 10 | var buf: PTest 11 | buf.test() 12 | 13 | -------------------------------------------------------------------------------- /tests/package/stdlib/stdlib.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/package/stdlib/stdlib.nimble -------------------------------------------------------------------------------- /tests/package/stdlib/system.nim: -------------------------------------------------------------------------------- 1 | # this module is part of tstdlib_name_not_special 2 | doAssert true -------------------------------------------------------------------------------- /tests/package/tstdlib_name_not_special.nim: -------------------------------------------------------------------------------- 1 | # Test whether a another package named 'stdlib' can be imported and used. 2 | # This caused a crash in the past. 3 | import stdlib/system -------------------------------------------------------------------------------- /tests/package_level_objects/definefoo.nim: -------------------------------------------------------------------------------- 1 | type 2 | Foo* {.package.} = object 3 | x, y: int 4 | -------------------------------------------------------------------------------- /tests/package_level_objects/mypackage.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/package_level_objects/mypackage.nimble -------------------------------------------------------------------------------- /tests/parallel/nim.cfg: -------------------------------------------------------------------------------- 1 | threads:on 2 | --experimental 3 | -------------------------------------------------------------------------------- /tests/parallel/t9691.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--mm:refc; --mm:orc" 3 | errormsg: "'spawn'ed function cannot have a 'typed' or 'untyped' parameter" 4 | """ 5 | 6 | # bug #9691 7 | 8 | import threadpool 9 | spawn echo() 10 | -------------------------------------------------------------------------------- /tests/parallel/tsysspawnbadarg.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'spawn' takes a call expression" 3 | line: 9 4 | cmd: "nim $target --threads:on $options $file" 5 | """ 6 | 7 | import threadpool 8 | 9 | let foo = spawn(1) 10 | -------------------------------------------------------------------------------- /tests/parser/t12274.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | joinable: false 3 | """ 4 | 5 | var s: seq[int] 6 | s.add block: 7 | let i = 1 8 | i 9 | s.add try: 10 | 2 11 | except: 12 | 3 13 | doAssert s == @[1, 2] 14 | -------------------------------------------------------------------------------- /tests/parser/t19430.nim: -------------------------------------------------------------------------------- 1 | let x = proc() = ## abc 2 | let y = 3 #[tt.Error 3 | ^ invalid indentation]# 4 | -------------------------------------------------------------------------------- /tests/parser/t19662.nim: -------------------------------------------------------------------------------- 1 | var i: int # bug #19662 2 | echo i 3 | 4 | discard """ 5 | errormsg: "invalid indentation" 6 | """ -------------------------------------------------------------------------------- /tests/parser/tbinarynotindented.nim: -------------------------------------------------------------------------------- 1 | type Foo = ref int 2 | not nil #[tt.Error 3 | ^ invalid indentation]# 4 | -------------------------------------------------------------------------------- /tests/parser/tbinarynotsameline.nim: -------------------------------------------------------------------------------- 1 | # issue #23565 2 | 3 | func foo: bool = 4 | true 5 | 6 | const bar = block: 7 | type T = int 8 | not foo() 9 | 10 | doAssert not bar 11 | -------------------------------------------------------------------------------- /tests/parser/tdoublenotnil.nim: -------------------------------------------------------------------------------- 1 | when false: 2 | type Foo = Bar not nil not nil #[tt.Error 3 | ^ invalid indentation]# 4 | -------------------------------------------------------------------------------- /tests/parser/tifexprs.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | 1 4 | ''' 5 | """ 6 | 7 | var a, b: int 8 | let x = if a > b: 9 | 0 10 | else: 1 11 | 12 | echo x 13 | -------------------------------------------------------------------------------- /tests/parser/tifextracolon.nim: -------------------------------------------------------------------------------- 1 | # issue #21982 2 | 3 | if true: 4 | if true: 5 | discard default int: 6 | else: #[tt.Error 7 | ^ invalid indentation]# 8 | discard 9 | -------------------------------------------------------------------------------- /tests/parser/tinvifstmt.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid indentation" 3 | line: 9 4 | column: 3 5 | """ 6 | 7 | if true: 8 | echo "a" 9 | elif: 10 | echo "b" 11 | else: 12 | echo "c" 13 | -------------------------------------------------------------------------------- /tests/parser/tstatementoperators.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | nimout: ''' 3 | Infix 4 | Ident "from" 5 | Ident "a" 6 | Ident "b" 7 | ''' 8 | """ 9 | 10 | from macros import dumpTree 11 | 12 | dumpTree(a from b) -------------------------------------------------------------------------------- /tests/parser/tstmtlistexprindent.nim: -------------------------------------------------------------------------------- 1 | type E = enum A, B, C 2 | proc junk(e: E) = 3 | case e 4 | of A: (echo "a"; 5 | discard; discard; 6 | discard) 7 | else: discard 8 | -------------------------------------------------------------------------------- /tests/parser/ttypecommandcomma.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid indentation" 3 | line: 8 4 | column: 19 5 | """ 6 | 7 | type 8 | Foo = call(1, 2), 3: 9 | 4 -------------------------------------------------------------------------------- /tests/parser/ttypecommandindent1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid indentation" 3 | line: 9 4 | column: 3 5 | """ 6 | 7 | type 8 | Foo = call x, y, z: 9 | abc 10 | -------------------------------------------------------------------------------- /tests/parser/ttypecommandindent2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid indentation" 3 | line: 10 4 | column: 5 5 | """ 6 | 7 | type 8 | Foo = call x, y, z: 9 | abc 10 | do: 11 | def 12 | -------------------------------------------------------------------------------- /tests/parser/ttypecommandindent3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "expression expected, but found 'keyword do'" 3 | line: 10 4 | column: 1 5 | """ 6 | 7 | type 8 | Foo = call x, y, z: 9 | abc 10 | do: 11 | def 12 | -------------------------------------------------------------------------------- /tests/parser/twrongcmdsyntax.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: '''in expression '4 2': identifier expected, but found '4''' 3 | line: 6 4 | """ 5 | 6 | echo 4 +2 7 | -------------------------------------------------------------------------------- /tests/pragmas/cfunction.c: -------------------------------------------------------------------------------- 1 | 2 | int cfunction(void) { 3 | return NUMBER_HERE; 4 | } 5 | -------------------------------------------------------------------------------- /tests/pragmas/foobar.nim: -------------------------------------------------------------------------------- 1 | import macros 2 | macro async*(body: untyped): untyped = 3 | return newStmtList() 4 | -------------------------------------------------------------------------------- /tests/pragmas/monoff1.nim: -------------------------------------------------------------------------------- 1 | proc on*() = discard 2 | -------------------------------------------------------------------------------- /tests/pragmas/t13306.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'testEpo' can have side effects" 3 | line: 8 4 | """ 5 | 6 | import times 7 | 8 | func testEpo(x: float): float = epochTime() + x 9 | 10 | echo testEpo(1.0) 11 | -------------------------------------------------------------------------------- /tests/pragmas/t4384.nim: -------------------------------------------------------------------------------- 1 | macro testMacro(body: untyped): untyped = discard 2 | macro testMacro(s: string, body: untyped): untyped = discard 3 | proc foo() {.testMacro: "foo".} = discard 4 | -------------------------------------------------------------------------------- /tests/pragmas/tcompile_missing_file.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | joinable: false 3 | errormsg: "cannot find: noexist.c" 4 | """ 5 | {.compile: "noexist.c".} 6 | -------------------------------------------------------------------------------- /tests/pragmas/tcompile_pragma.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''34''' 3 | joinable: false 4 | """ 5 | 6 | {.compile("cfunction.c", "-DNUMBER_HERE=34").} 7 | 8 | proc cfunction(): cint {.importc.} 9 | 10 | echo cfunction() 11 | -------------------------------------------------------------------------------- /tests/pragmas/tonoff1.nim: -------------------------------------------------------------------------------- 1 | # issue #23002 2 | 3 | import monoff1 4 | 5 | proc test() = 6 | {.warning[ProveInit]: on.} 7 | 8 | test() 9 | -------------------------------------------------------------------------------- /tests/pragmas/tpragmablock.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--warningaserror:BareExcept" 3 | """ 4 | 5 | {.warning[BareExcept]:on.}: 6 | discard 7 | 8 | try: 9 | echo "Y" 10 | except: # warning disabled here 11 | discard -------------------------------------------------------------------------------- /tests/pragmas/tpushexperimental.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''0 1 3 | 1 2 4 | 2 3 5 | 0 1 6 | 1 2 7 | 2 3 8 | 3 5''' 9 | """ 10 | 11 | import mpushexperimental 12 | 13 | main(12) 14 | -------------------------------------------------------------------------------- /tests/pragmas/tsym_as_pragma.nim: -------------------------------------------------------------------------------- 1 | 2 | # bug #3171 3 | 4 | template newDataWindow(): untyped = 5 | let eventClosure = proc (closure: pointer): bool {.closure, cdecl.} = 6 | discard 7 | 8 | newDataWindow() 9 | -------------------------------------------------------------------------------- /tests/pragmas/tuserpragma.nim: -------------------------------------------------------------------------------- 1 | 2 | {.pragma: rtl, cdecl, exportc.} 3 | 4 | proc myproc(x, y: int): int {.rtl} = 5 | nil 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/pragmas/tuserpragmaargs.nim: -------------------------------------------------------------------------------- 1 | var foo {.exportc: "abc".} = 123 2 | {.pragma: importc2, importc.} 3 | var bar {.importc2: "abc".}: int #[tt.Error 4 | ^ user pragma cannot have arguments]# 5 | echo bar 6 | -------------------------------------------------------------------------------- /tests/pragmas/warn_module.nim: -------------------------------------------------------------------------------- 1 | 2 | {.warning[UnusedImport]: off.} 3 | 4 | import hashes 5 | 6 | proc test(a: float): float = 7 | a 8 | -------------------------------------------------------------------------------- /tests/proc/mdefaultprocparam.nim: -------------------------------------------------------------------------------- 1 | 2 | 3 | proc p*(f = (proc(): string = "hi")) = 4 | echo f() 5 | 6 | -------------------------------------------------------------------------------- /tests/proc/msugarcrash1.nim: -------------------------------------------------------------------------------- 1 | import std/options 2 | 3 | type 4 | Address* = object 5 | port*: int 6 | 7 | Node* = ref object 8 | address*: Option[Address] 9 | -------------------------------------------------------------------------------- /tests/proc/t17157.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'untyped' is only allowed in templates and macros or magic procs" 3 | """ 4 | 5 | template something(op: proc (v: untyped): void): void = 6 | discard 7 | -------------------------------------------------------------------------------- /tests/proc/tlambdapragma.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid pragma: exportc" 3 | """ 4 | 5 | let _ = proc () {.exportc.} = 6 | # this would previously cause a codegen error 7 | discard 8 | -------------------------------------------------------------------------------- /tests/proc/tprocredef.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "redefinition of \'foo\'" 3 | file: "tprocredef.nim" 4 | line: 8 5 | """ 6 | 7 | proc foo(a: int, b: string) = discard 8 | proc foo(a: int, b: string) = discard 9 | -------------------------------------------------------------------------------- /tests/proc/typed.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'typed' is only allowed in templates and macros" 3 | line: 6 4 | """ 5 | 6 | proc fun(x:typed)=discard 7 | fun(10) 8 | -------------------------------------------------------------------------------- /tests/range/compilehelpers.nim: -------------------------------------------------------------------------------- 1 | template accept(e) = 2 | static: assert(compiles(e)) 3 | 4 | template reject(e) = 5 | static: assert(not compiles(e)) 6 | -------------------------------------------------------------------------------- /tests/rectest.nim: -------------------------------------------------------------------------------- 1 | # Test the error message 2 | 3 | proc main() = 4 | main() 5 | 6 | main() 7 | -------------------------------------------------------------------------------- /tests/sandwich/config.nims: -------------------------------------------------------------------------------- 1 | switch("experimental", "typeBoundOps") 2 | -------------------------------------------------------------------------------- /tests/sandwich/generic_library.nim: -------------------------------------------------------------------------------- 1 | 2 | proc libraryFunc*[T](x: T) = 3 | mixin mixedIn, indirectlyMixedIn 4 | echo mixedIn() 5 | echo indirectlyMixedIn() 6 | 7 | -------------------------------------------------------------------------------- /tests/sandwich/helper_module.nim: -------------------------------------------------------------------------------- 1 | 2 | proc indirectlyMixedIn*: int = 3 | 200 4 | -------------------------------------------------------------------------------- /tests/sandwich/mdollar1.nim: -------------------------------------------------------------------------------- 1 | type Foo* = object 2 | x*, y*: int 3 | 4 | proc `$`*(f: Foo): string = 5 | "Foo(" & $f.x & ", " & $f.y & ")" 6 | -------------------------------------------------------------------------------- /tests/sandwich/mdollar2.nim: -------------------------------------------------------------------------------- 1 | import mdollar1 2 | 3 | proc makeFoo*(x, y: int): Foo = 4 | Foo(x: x, y: y) 5 | 6 | proc useFoo*(f: Foo) = 7 | echo "used: ", f # directly calls `foo.$` from scope 8 | -------------------------------------------------------------------------------- /tests/sandwich/mdollar3.nim: -------------------------------------------------------------------------------- 1 | proc debug*[T](obj: T) = 2 | echo "debugging: ", obj # calls generic `$` 3 | -------------------------------------------------------------------------------- /tests/sandwich/msetiter1.nim: -------------------------------------------------------------------------------- 1 | import sets 2 | 3 | proc initH*[V]: HashSet[V] = 4 | result = initHashSet[V]() 5 | 6 | proc foo*[V](h: var HashSet[V], c: seq[V]) = 7 | h = h + c.toHashSet() 8 | -------------------------------------------------------------------------------- /tests/sandwich/msetiter2.nim: -------------------------------------------------------------------------------- 1 | import sets, sequtils 2 | 3 | proc dedupe*[T](arr: openArray[T]): seq[T] = 4 | arr.toHashSet.toSeq 5 | -------------------------------------------------------------------------------- /tests/sandwich/mstatic.nim: -------------------------------------------------------------------------------- 1 | type Foo* = object 2 | x*, y*: int 3 | 4 | proc `$`*(x: static Foo): string = 5 | "static Foo(" & $x.x & ", " & $x.y & ")" 6 | 7 | proc `$`*(x: Foo): string = 8 | "runtime Foo(" & $x.x & ", " & $x.y & ")" 9 | -------------------------------------------------------------------------------- /tests/sandwich/tfilehandles.nim: -------------------------------------------------------------------------------- 1 | # issue #16755 2 | 3 | import mfiles 4 | from mhandles import FD 5 | #import handles <- do this and it works 6 | 7 | let wr = newFile(FD -1) 8 | close wr 9 | -------------------------------------------------------------------------------- /tests/sandwich/tmain.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: '''100 3 | 200''' 4 | """ 5 | 6 | import 7 | module_using_generic_library 8 | 9 | makeUseOfLibrary "test" 10 | -------------------------------------------------------------------------------- /tests/sandwich/tsetin.nim: -------------------------------------------------------------------------------- 1 | # issue #18150 2 | 3 | import msetin 4 | foo(1) 5 | -------------------------------------------------------------------------------- /tests/sandwich/tsetiter2.nim: -------------------------------------------------------------------------------- 1 | # comment on issue #11167 2 | 3 | import msetiter2 4 | 5 | let x = dedupe([1, 2, 3]) 6 | doAssert x.len == 3 7 | doAssert 1 in x 8 | doAssert 2 in x 9 | doAssert 3 in x 10 | -------------------------------------------------------------------------------- /tests/sandwich/tstatic.nim: -------------------------------------------------------------------------------- 1 | from mstatic import Foo 2 | 3 | doAssert $Foo(x: 1, y: 2) == "static Foo(1, 2)" 4 | let foo = Foo(x: 3, y: 4) 5 | doAssert $foo == "runtime Foo(3, 4)" 6 | -------------------------------------------------------------------------------- /tests/sets/t13764.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "conversion from int literal(1000000) to range 0..255(int) is invalid" 3 | line: 6 4 | """ 5 | 6 | let a = {1_000_000} # Compiles 7 | -------------------------------------------------------------------------------- /tests/sets/t17385.nim: -------------------------------------------------------------------------------- 1 | import m17385 2 | 3 | let a = Diff[int]() 4 | a.test() 5 | -------------------------------------------------------------------------------- /tests/sets/t2669.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot convert 6 to range 1..5(int8)" 3 | line: 6 4 | """ 5 | 6 | var c: set[range[1i8..5i8]] = {1i8, 2i8, 6i8} 7 | -------------------------------------------------------------------------------- /tests/sets/tnewsets.nim: -------------------------------------------------------------------------------- 1 | # new test for sets: 2 | 3 | const elem = ' ' 4 | 5 | var s: set[char] = {elem} 6 | assert(elem in s and 'a' not_in s and 'c' not_in s ) 7 | -------------------------------------------------------------------------------- /tests/showoff/thtml1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "
" 3 | """ 4 | 5 | template htmlTag(tag: untyped) = 6 | proc tag(): string = "<" & astToStr(tag) & ">" 7 | 8 | htmlTag(br) 9 | htmlTag(html) 10 | 11 | echo br() 12 | -------------------------------------------------------------------------------- /tests/statictypes/t5780.nim: -------------------------------------------------------------------------------- 1 | type StringArray[N:int] = array[N, string] 2 | let a = ["one", "two"] 3 | doAssert a is StringArray 4 | -------------------------------------------------------------------------------- /tests/stckovfl.nim: -------------------------------------------------------------------------------- 1 | # To test stack overflow message 2 | 3 | proc over(a: int): int = 4 | if a >= 10: 5 | assert false 6 | return 7 | result = over(a+1)+5 8 | 9 | Echo($over(0)) 10 | 11 | -------------------------------------------------------------------------------- /tests/stdlib/mjsonexternproc.nim: -------------------------------------------------------------------------------- 1 | # Test case for https://github.com/nim-lang/Nim/issues/6385 2 | 3 | import json 4 | # export json 5 | 6 | proc foo*[T](a: T) = 7 | let params = %*{ 8 | "data": [ 1 ] 9 | } 10 | echo $params -------------------------------------------------------------------------------- /tests/stdlib/mstrscans_undecl_scanf.nim: -------------------------------------------------------------------------------- 1 | import std/strscans 2 | 3 | proc scan*[T](s: string): (bool, string) = 4 | s.scanTuple("$+") 5 | -------------------------------------------------------------------------------- /tests/stdlib/nre/escape.nim: -------------------------------------------------------------------------------- 1 | import nre, unittest 2 | 3 | block: # escape strings 4 | block: # escape strings 5 | check("123".escapeRe() == "123") 6 | check("[]".escapeRe() == r"\[\]") 7 | check("()".escapeRe() == r"\(\)") 8 | -------------------------------------------------------------------------------- /tests/stdlib/nre/optional_nonstrict.nim: -------------------------------------------------------------------------------- 1 | import options 2 | converter option2val*[T](val: Option[T]): T = 3 | return val.get() 4 | -------------------------------------------------------------------------------- /tests/stdlib/osproctest.nim: -------------------------------------------------------------------------------- 1 | # This is test program for the osproc module. 2 | 3 | import os 4 | 5 | echo getCurrentDir() 6 | 7 | for i in 1..paramCount(): 8 | echo paramStr(i) 9 | -------------------------------------------------------------------------------- /tests/stdlib/t15663.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --gc:arc $file" 3 | output: "Test" 4 | """ 5 | 6 | import std/widestrs 7 | 8 | let ws = newWideCString("Test") 9 | echo ws 10 | -------------------------------------------------------------------------------- /tests/stdlib/t21251.nim: -------------------------------------------------------------------------------- 1 | import std / [tables, sets, sharedtables] 2 | 3 | var shared: SharedTable[int, int] 4 | shared.init 5 | 6 | shared[1] = 1 7 | -------------------------------------------------------------------------------- /tests/stdlib/t21406.nim: -------------------------------------------------------------------------------- 1 | import std/[times, strformat] 2 | import std/assertions 3 | 4 | let aTime = getTime() 5 | doAssert fmt"{aTime}" == $aTime 6 | let aNow = now() 7 | doAssert fmt"{aNow}" == $aNow 8 | -------------------------------------------------------------------------------- /tests/stdlib/t7686.nim: -------------------------------------------------------------------------------- 1 | import std/strutils 2 | import std/assertions 3 | 4 | type 5 | MyEnum = enum 6 | A, 7 | a 8 | 9 | doAssert parseEnum[MyEnum]("A") == A 10 | doAssert parseEnum[MyEnum]("a") == a 11 | -------------------------------------------------------------------------------- /tests/stdlib/t9754.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | joinable: false 3 | """ 4 | 5 | import tmarshal 6 | import tparsesql -------------------------------------------------------------------------------- /tests/stdlib/tbitops.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:noUndefinedBitOpts 2 | -------------------------------------------------------------------------------- /tests/stdlib/tdb.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/stdlib/tdb.nim -------------------------------------------------------------------------------- /tests/stdlib/tdb.nims: -------------------------------------------------------------------------------- 1 | --styleCheck:off -------------------------------------------------------------------------------- /tests/stdlib/tdb_mysql.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/stdlib/tdb_mysql.nim -------------------------------------------------------------------------------- /tests/stdlib/tfenv.nim: -------------------------------------------------------------------------------- 1 | import std/fenv 2 | import std/assertions 3 | 4 | 5 | func is_significant(x: float): bool = 6 | x > minimumPositiveValue(float) and x < maximumPositiveValue(float) 7 | 8 | doAssert is_significant(10.0) 9 | -------------------------------------------------------------------------------- /tests/stdlib/tintsets.nim: -------------------------------------------------------------------------------- 1 | import ./mintsets 2 | 3 | block: # bug https://github.com/nim-lang/Nim/pull/15564#issuecomment-729878104 4 | # related to bug #11167 5 | test1() 6 | test2() 7 | -------------------------------------------------------------------------------- /tests/stdlib/tjsonexternproc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: ''' 3 | {"data":[1]} 4 | ''' 5 | """ 6 | 7 | # Test case for https://github.com/nim-lang/Nim/issues/6385 8 | 9 | import mjsonexternproc 10 | # import json 11 | foo(1) 12 | -------------------------------------------------------------------------------- /tests/stdlib/tjsontestsuite.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/stdlib/tjsontestsuite.nim -------------------------------------------------------------------------------- /tests/stdlib/tmemlines.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | outputsub: "" 3 | """ 4 | 5 | import memfiles 6 | var inp = memfiles.open("tests/stdlib/tmemlines.nim") 7 | for line in lines(inp): 8 | echo("#" & line & "#") 9 | close(inp) 10 | -------------------------------------------------------------------------------- /tests/stdlib/toserrors.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | import std/oserrors 6 | 7 | let x1 = osLastError() 8 | raiseOSError(x1) 9 | echo osErrorMsg(x1) 10 | -------------------------------------------------------------------------------- /tests/stdlib/tsqlitebindatas.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tests/stdlib/tsqlitebindatas.nim -------------------------------------------------------------------------------- /tests/stdlib/tstrformatlineinfo.nim: -------------------------------------------------------------------------------- 1 | # issue #21759 2 | 3 | {.hint[ConvFromXToItselfNotNeeded]: on.} 4 | 5 | import std/strformat 6 | 7 | echo fmt"{string ""abc""}" #[tt.Hint 8 | ^ conversion from string to itself is pointless]# 9 | -------------------------------------------------------------------------------- /tests/stdlib/tstrscans_undecl_scanf.nim: -------------------------------------------------------------------------------- 1 | import std/assertions 2 | import ./mstrscans_undecl_scanf 3 | doAssert scan[int]("foo") == (true, "foo") 4 | -------------------------------------------------------------------------------- /tests/stdlib/tstrtabs.nims: -------------------------------------------------------------------------------- 1 | import std/[strtabs, assertions] 2 | 3 | static: 4 | let t = {"name": "John", "city": "Monaco"}.newStringTable 5 | doAssert "${name} lives in ${city}" % t == "John lives in Monaco" 6 | -------------------------------------------------------------------------------- /tests/stdlib/tterminal.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | import terminal, colors 5 | 6 | styledEcho fgColor, colRed, "Test" 7 | styledEcho bgColor, colBlue, "Test" 8 | -------------------------------------------------------------------------------- /tests/stdlib/tterminal_15874.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --app:console $file" 3 | action: "compile" 4 | """ 5 | 6 | import terminal 7 | 8 | writeStyled("hello", {styleBright}) 9 | -------------------------------------------------------------------------------- /tests/stdlib/ttypeinfo.nims: -------------------------------------------------------------------------------- 1 | --styleCheck:off -------------------------------------------------------------------------------- /tests/stmt/tforloop_underscore.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "the special identifier '_' is ignored in declarations and cannot be used" 3 | """ 4 | 5 | for _ in ["a"]: 6 | echo _ 7 | -------------------------------------------------------------------------------- /tests/stmt/tgenericsunderscore.nim: -------------------------------------------------------------------------------- 1 | # issue #21435 2 | 3 | proc foo[_](x: typedesc[_]): string = "BAR" #[tt.Error 4 | ^ the special identifier '_' is ignored in declarations and cannot be used]# 5 | -------------------------------------------------------------------------------- /tests/stylecheck/fileinfo.nim: -------------------------------------------------------------------------------- 1 | # fileinfo.nim 2 | type FileInfo* = object -------------------------------------------------------------------------------- /tests/stylecheck/foreign_package/foreign_package.nim: -------------------------------------------------------------------------------- 1 | include ../thint -------------------------------------------------------------------------------- /tests/stylecheck/foreign_package/foreign_package.nimble: -------------------------------------------------------------------------------- 1 | # See `tstyleCheck` 2 | # Needed to mark `mstyleCheck` as a foreign package. 3 | -------------------------------------------------------------------------------- /tests/stylecheck/t20397.nim: -------------------------------------------------------------------------------- 1 | {.hintAsError[Name]:on.} 2 | var a_b = 1 3 | discard a_b 4 | {.hintAsError[Name]:off.} -------------------------------------------------------------------------------- /tests/stylecheck/t20397_1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--styleCheck:off --hint:Name:on" 3 | """ 4 | 5 | {.hintAsError[Name]:on.} 6 | var a_b = 1 7 | discard a_b 8 | {.hintAsError[Name]:off.} 9 | -------------------------------------------------------------------------------- /tests/stylecheck/t20397_2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "'a_b' should be: 'aB'" 3 | matrix: "--styleCheck:error" 4 | """ 5 | 6 | var a_b = 1 7 | discard a_b -------------------------------------------------------------------------------- /tests/system/helpers/readall_echo.nim: -------------------------------------------------------------------------------- 1 | when true: 2 | echo(stdin.readAll) 3 | -------------------------------------------------------------------------------- /tests/system/t20938.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --mm:refc $file" 3 | action: "compile" 4 | """ 5 | 6 | template foo(x: typed) = 7 | discard x 8 | 9 | foo: 10 | var x = "hello" 11 | x.shallowCopy("test") 12 | true 13 | -------------------------------------------------------------------------------- /tests/system/tatomics1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "c cpp js" 3 | """ 4 | 5 | var x = 10 6 | atomicInc(x) 7 | doAssert x == 11 8 | atomicDec(x) 9 | doAssert x == 10 10 | -------------------------------------------------------------------------------- /tests/system/tconcat.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "DabcD" 3 | """ 4 | 5 | const 6 | x = "abc" 7 | 8 | var v = "D" & x & "D" 9 | 10 | echo v 11 | 12 | -------------------------------------------------------------------------------- /tests/system/tcopyprotected_arrayinit.nim: -------------------------------------------------------------------------------- 1 | type 2 | Bar = object 3 | b: int = 1 4 | 5 | Foo = object 6 | f: array[1, Bar] 7 | 8 | proc `=copy`(dest: var Bar, source: Bar) {.error.} 9 | 10 | discard Foo() 11 | -------------------------------------------------------------------------------- /tests/system/temptyecho.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "\n" 3 | """ 4 | 5 | echo() 6 | 7 | -------------------------------------------------------------------------------- /tests/system/tgcnone.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--mm:none -d:useMalloc" 3 | """ 4 | # bug #15617 5 | # bug #22262 6 | let x = 4 7 | doAssert x == 4 8 | -------------------------------------------------------------------------------- /tests/system/tgcregions.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim c --gc:regions $file" 3 | """ 4 | 5 | # issue #12597 6 | # it just tests that --gc:regions compiles. Nothing else. :'( 7 | -------------------------------------------------------------------------------- /tests/system/tgogc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | disabled: "windows" 3 | cmd: "nim c --gc:go $file" 4 | action: "compile" 5 | """ 6 | # bug #11447 7 | echo "Go GC test" 8 | -------------------------------------------------------------------------------- /tests/system/timmutableinc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got " 3 | file: "timmutableinc.nim" 4 | line: 8 5 | """ 6 | var x = 0 7 | 8 | inc(x+1) 9 | -------------------------------------------------------------------------------- /tests/system/tnewderef.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: 3 3 | 4 | """ 5 | 6 | var x: ref int 7 | new(x) 8 | x[] = 3 9 | 10 | echo x[] 11 | 12 | -------------------------------------------------------------------------------- /tests/system/treprconverter.nim: -------------------------------------------------------------------------------- 1 | # issue #24864 2 | 3 | type S = distinct uint16 4 | converter d(field: uint8 | uint16): S = discard 5 | discard (repr(0'u16), repr(0'u8)) 6 | -------------------------------------------------------------------------------- /tests/system/tslimsystem.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "123" 3 | matrix: "-d:nimPreviewSlimSystem --mm:refc; -d:nimPreviewSlimSystem --mm:arc" 4 | """ 5 | 6 | echo 123 -------------------------------------------------------------------------------- /tests/template/i2416.nim: -------------------------------------------------------------------------------- 1 | template i2416*() = echo "i2416" 2 | -------------------------------------------------------------------------------- /tests/template/m1027a.nim: -------------------------------------------------------------------------------- 1 | const version_str* = "mod a" 2 | -------------------------------------------------------------------------------- /tests/template/m1027b.nim: -------------------------------------------------------------------------------- 1 | const version_str* = "mod b" 2 | -------------------------------------------------------------------------------- /tests/template/m19277_1.nim: -------------------------------------------------------------------------------- 1 | template foo*(x: untyped) = 2 | echo "got: ", x 3 | -------------------------------------------------------------------------------- /tests/template/m19277_2.nim: -------------------------------------------------------------------------------- 1 | proc foo*(a: string) = 2 | echo "got string: ", a 3 | -------------------------------------------------------------------------------- /tests/template/mcan_access_hidden_field.nim: -------------------------------------------------------------------------------- 1 | 2 | type 3 | Foo* = object 4 | fooa, foob: int 5 | 6 | proc createFoo*(a, b: int): Foo = Foo(fooa: a, foob: b) 7 | 8 | template geta*(f: Foo): untyped = f.fooa 9 | -------------------------------------------------------------------------------- /tests/template/mdotcall2.nim: -------------------------------------------------------------------------------- 1 | # imported by mdotcall 2 | 3 | proc baseAddr*[T](x: openarray[T]): pointer = 4 | cast[pointer](x) 5 | 6 | proc shift*(p: pointer, delta: int): pointer = 7 | cast[pointer](cast[int](p) + delta) 8 | -------------------------------------------------------------------------------- /tests/template/mlt.nim: -------------------------------------------------------------------------------- 1 | 2 | type Point* = ref object of RootObj 3 | proc `>`*(p1, p2: Point): bool = false 4 | -------------------------------------------------------------------------------- /tests/template/mqualifiedtype1.nim: -------------------------------------------------------------------------------- 1 | type A* = object 2 | x*: int 3 | -------------------------------------------------------------------------------- /tests/template/mqualifiedtype2.nim: -------------------------------------------------------------------------------- 1 | type A* = object 2 | x*: array[1000, byte] 3 | -------------------------------------------------------------------------------- /tests/template/t21231.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: 'x'" 3 | """ 4 | 5 | var x: int 6 | # bug #21231 7 | template f(y: untyped) = echo y.x 8 | for i in 1 .. 10: 9 | x = i 10 | f(system) 11 | -------------------------------------------------------------------------------- /tests/template/t21532.nim: -------------------------------------------------------------------------------- 1 | 2 | template elementType(a: untyped): typedesc = 3 | typeof(block: (for ai in a: ai)) 4 | 5 | func fn[T](a: T) = 6 | doAssert elementType(a) is int 7 | 8 | @[1,2,3].fn -------------------------------------------------------------------------------- /tests/template/template_pragmas.nim: -------------------------------------------------------------------------------- 1 | proc output_x:string {.compileTime.} = "x" 2 | 3 | template t = 4 | const x = output_x() 5 | let 6 | bar {.exportc:"bar" & x.} = 100 7 | 8 | static: 9 | doAssert(compiles (t())) 10 | -------------------------------------------------------------------------------- /tests/template/tfielduse.nim: -------------------------------------------------------------------------------- 1 | # issue #24657 2 | 3 | proc g() {.error.} = discard 4 | 5 | type T = object 6 | g: int 7 | 8 | template B(): untyped = typeof(T.g) 9 | type _ = B() 10 | -------------------------------------------------------------------------------- /tests/template/tparamscope.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "undeclared identifier: 'a'" 3 | line: 10 4 | """ 5 | 6 | 7 | template secondArg(a, b: typed): untyped = 8 | b 9 | 10 | echo secondArg((var a = 1; 1), a) 11 | -------------------------------------------------------------------------------- /tests/template/tqualifiedident.nim: -------------------------------------------------------------------------------- 1 | block: # issue #19865 2 | template f() = discard default(system.int) 3 | f() 4 | 5 | # issue #21221, same as above 6 | type M = object 7 | template r() = discard default(tqualifiedident.M) 8 | r() 9 | -------------------------------------------------------------------------------- /tests/template/tsighash_regression.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | exitcode: 1 3 | outputsub: "0" 4 | """ 5 | 6 | import tconfusinglocal 7 | 8 | fail "foo" 9 | -------------------------------------------------------------------------------- /tests/testament/t16576.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix:"-d:nimTest_t16576" 3 | """ 4 | 5 | # bug #16576 6 | doAssert defined(nimTest_t16576) 7 | doAssert not defined(nimMegatest) 8 | -------------------------------------------------------------------------------- /tests/testament/treject.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: "reject" 3 | """ 4 | 5 | # this line does not compile, so the test should pass, since action="reject" 6 | let x: int = "type mismatch" 7 | -------------------------------------------------------------------------------- /tests/testdata/csvtest.csv: -------------------------------------------------------------------------------- 1 | headerField1,headerField2,headerField3 2 | 12,12132,"hallo "" 3 | du" 4 | 1,, 5 | ,2, 6 | ,,3 7 | 1,2,3 8 | 9 | -------------------------------------------------------------------------------- /tests/testdata/data.csv: -------------------------------------------------------------------------------- 1 | Algo_A; Algo_B; Algo_C 2 | 12; 12; 16 3 | 2; 5; 9 4 | 63; 65.3; 90 5 | 0; 1.2; 3 6 | 7 | -------------------------------------------------------------------------------- /tests/testdata/jsonwithextradata.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": 123, 3 | "bar": 456 4 | } 5 | 6 | "foobar" 7 | -------------------------------------------------------------------------------- /tests/threads/nim.cfg: -------------------------------------------------------------------------------- 1 | threads:on 2 | -------------------------------------------------------------------------------- /tests/threads/tjsthreads.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | targets: "js" 3 | matrix: "--threads:on" 4 | """ 5 | 6 | echo 123 7 | -------------------------------------------------------------------------------- /tests/tools/compile/config.nims: -------------------------------------------------------------------------------- 1 | switch("path", "$lib/../") -------------------------------------------------------------------------------- /tests/tools/compile/readme.md: -------------------------------------------------------------------------------- 1 | Test whether the tools compile. -------------------------------------------------------------------------------- /tests/tools/compile/tdeps.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | include tools/deps 6 | -------------------------------------------------------------------------------- /tests/tools/compile/tdetect.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | include tools/detect/detect 6 | -------------------------------------------------------------------------------- /tests/tools/compile/tkoch.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | include koch -------------------------------------------------------------------------------- /tests/tools/compile/tniminst.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | """ 4 | 5 | include tools/niminst/niminst -------------------------------------------------------------------------------- /tests/tools/config.nims: -------------------------------------------------------------------------------- 1 | --d:nimPreviewSlimSystem 2 | --d:nimPreviewCstringConversion 3 | --d:nimPreviewProcConversion 4 | -------------------------------------------------------------------------------- /tests/tools/dontmentionme.nim: -------------------------------------------------------------------------------- 1 | {.used.} 2 | 3 | proc nothing* = echo "nothing to see here" 4 | -------------------------------------------------------------------------------- /tests/tools/second.nim: -------------------------------------------------------------------------------- 1 | import tables 2 | 3 | let dataEx* = {1: 2, 3: 4}.toTable 4 | -------------------------------------------------------------------------------- /tests/tools/tctags2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: '''nim ctags $file''' 3 | action: "compile" 4 | """ 5 | 6 | type 7 | Foo = object 8 | 9 | proc hello() = discard 10 | 11 | proc `$`(x: Foo): string = "foo" 12 | -------------------------------------------------------------------------------- /tests/tools/tloadstdin.nims: -------------------------------------------------------------------------------- 1 | --d:nimscriptConfigLoaded 2 | -------------------------------------------------------------------------------- /tests/tuples/mnimsconstunpack.nim: -------------------------------------------------------------------------------- 1 | proc foo(): tuple[a, b: string] = 2 | result = ("a", "b") 3 | 4 | const (a, b*) = foo() 5 | -------------------------------------------------------------------------------- /tests/tuples/t7012.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'Node'" 3 | """ 4 | 5 | type Node[T] = tuple 6 | next: ref Node[T] 7 | var n: Node[int] -------------------------------------------------------------------------------- /tests/tuples/tnimsconstunpack.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | action: compile 3 | cmd: "nim e $file" 4 | """ 5 | 6 | import mnimsconstunpack 7 | 8 | doAssert b == "b" 9 | -------------------------------------------------------------------------------- /tests/tuples/ttypedesc_in_tuple_a.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "typedesc not allowed as tuple field." 3 | """ 4 | 5 | var bar = (a: int, b: 1) 6 | -------------------------------------------------------------------------------- /tests/tuples/ttypedesc_in_tuple_b.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Mixing types and values in tuples is not allowed." 3 | """ 4 | 5 | var bar = (int, 1) 6 | -------------------------------------------------------------------------------- /tests/tuples/twrong_generic_caching.nim: -------------------------------------------------------------------------------- 1 | 2 | import parsecfg 3 | 4 | import asynchttpserver 5 | -------------------------------------------------------------------------------- /tests/tuples/twrongtupleaccess.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "attempting to call undeclared routine: \'setBLAH\'" 3 | file: "twrongtupleaccess.nim" 4 | line: 9 5 | """ 6 | # Bugfix 7 | 8 | var v = (5.0, 10.0) 9 | v.setBLAH(10) 10 | -------------------------------------------------------------------------------- /tests/typerel/t8905.nim: -------------------------------------------------------------------------------- 1 | type 2 | Foo[T] = distinct seq[T] 3 | Bar[T] = object 4 | 5 | proc newFoo[T](): Foo[T] = Foo[T](newSeq[T]()) 6 | 7 | var x = newFoo[Bar[int]]() 8 | -------------------------------------------------------------------------------- /tests/typerel/tno_int_in_bool_context.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got but expected 'bool'" 3 | line: 6 4 | """ 5 | 6 | if 1: 7 | echo "wtf?" 8 | -------------------------------------------------------------------------------- /tests/typerel/tptrs.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type mismatch: got but expected 'ptr int'" 3 | line: 8 4 | """ 5 | 6 | var 7 | n: int16 8 | p: ptr int = addr n 9 | -------------------------------------------------------------------------------- /tests/typerel/tsigmatch.nim: -------------------------------------------------------------------------------- 1 | block: # bug #13618 2 | proc test(x: Natural or BackwardsIndex): int = 3 | int(x) 4 | 5 | doAssert test(^1) == 1 6 | doAssert test(1) == 1 7 | -------------------------------------------------------------------------------- /tests/typerel/ttynilinstantiation.nim: -------------------------------------------------------------------------------- 1 | proc foo[T: proc](x: T) = 2 | # old error here: 3 | let y = x 4 | # invalid type: 'typeof(nil)' for let 5 | 6 | foo(nil) #[tt.Error 7 | ^ type mismatch: got ]# 8 | -------------------------------------------------------------------------------- /tests/typerel/ttypedesc_as_genericparam1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--mm:refc" 3 | errormsg: "type mismatch: got " 4 | line: 7 5 | """ 6 | # bug #3079, #1146 7 | echo repr(int) -------------------------------------------------------------------------------- /tests/typerel/ttypedesc_as_genericparam1_orc.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--mm:orc" 3 | """ 4 | 5 | doAssert repr(int) == "int" 6 | -------------------------------------------------------------------------------- /tests/typerel/ttypedesc_as_genericparam2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | matrix: "--mm:refc" 3 | errormsg: "'repr' doesn't support 'void' type" 4 | line: 10 5 | """ 6 | 7 | # bug #2879 8 | 9 | var s: seq[int] 10 | echo repr(s.new_seq(3)) 11 | -------------------------------------------------------------------------------- /tests/typerel/ttypelessemptyset.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "statement returns no value that can be discarded" 3 | """ 4 | var q = false 5 | discard (if q: {} else: {}) 6 | 7 | -------------------------------------------------------------------------------- /tests/typerel/tuncheckedarray_eq.nim: -------------------------------------------------------------------------------- 1 | type p = ptr UncheckedArray[char] 2 | doAssert p is ptr UncheckedArray -------------------------------------------------------------------------------- /tests/typerel/typredef.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type \'Uint8\'" 3 | file: "typredef.nim" 4 | line: 7 5 | """ 6 | type 7 | Uint8 = Uint8 #ERROR_MSG illegal recursion in type 'Uint8' 8 | -------------------------------------------------------------------------------- /tests/types/t21027.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Invalid usage of cast, cast requires a type to convert to, e.g., cast[int](0d)." 3 | """ 4 | # bug #21027 5 | let x: uint64 = cast(5) 6 | -------------------------------------------------------------------------------- /tests/types/t6456.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "type \'ptr void\' is not allowed" 3 | line: 6 4 | """ 5 | 6 | proc foo(x: ptr void) = 7 | discard 8 | -------------------------------------------------------------------------------- /tests/types/t6969.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid type: 'object' for var" 3 | line: 6 4 | """ 5 | 6 | var a: object 7 | -------------------------------------------------------------------------------- /tests/types/texportgeneric.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "{.exportc.} not allowed for generic types" 3 | line: 6 4 | """ 5 | 6 | type Struct[T] {.exportc.} = object 7 | a:int 8 | b: T -------------------------------------------------------------------------------- /tests/types/tforwty.nim: -------------------------------------------------------------------------------- 1 | # Test 13: forward types 2 | 3 | type 4 | PSym = ref TSym 5 | 6 | TSym = object 7 | next: PSym 8 | 9 | var s: PSym 10 | -------------------------------------------------------------------------------- /tests/types/tillegalseqrecursion.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'CyclicSeq'" 3 | """ 4 | # issue #13715 5 | type 6 | CyclicSeq = seq[ref CyclicSeq] 7 | -------------------------------------------------------------------------------- /tests/types/tillegaltuplerecursiongeneric.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'RefTree'" 3 | """ 4 | 5 | type 6 | RefTree[T] = ref tuple[le, ri: RefTree[T]; data: T] 7 | RefTreeInt = RefTree[int] 8 | -------------------------------------------------------------------------------- /tests/types/tillegaltuplerecursiongeneric2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'TPearl'" 3 | """ 4 | 5 | type 6 | TPearl[T] = tuple 7 | next: TPearl[T] 8 | 9 | var x: TPearl[int] 10 | -------------------------------------------------------------------------------- /tests/types/tillegaltyperecursion2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'Executor'" 3 | line: 8 4 | """ 5 | # bug reported by PR #5637 6 | type 7 | Executor[N] = Executor[N] 8 | var e: Executor[int] 9 | -------------------------------------------------------------------------------- /tests/types/tillegaltyperecursion3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'Weird'" 3 | """ 4 | 5 | # issue #3456 6 | 7 | import tables 8 | type 9 | Weird = ref seq[Weird] 10 | var t = newTable[int, Weird]() 11 | -------------------------------------------------------------------------------- /tests/types/tinfiniterecursion.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "illegal recursion in type 'XIM'" 3 | line: 8 4 | """ 5 | 6 | type 7 | XIM* = ptr XIM 8 | XIMProc* = proc (a2: XIM) 9 | -------------------------------------------------------------------------------- /tests/types/tnontype.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "expected type, but got: 3" 3 | """ 4 | 5 | type 6 | Foo = (block: 7 | int) 8 | 9 | Bar = 3 10 | -------------------------------------------------------------------------------- /tests/types/told_pragma_syntax1.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid indentation" 3 | """ 4 | 5 | type Foo = object {.final.} 6 | -------------------------------------------------------------------------------- /tests/types/told_pragma_syntax2.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "invalid indentation" 3 | """ 4 | 5 | type Bar {.final.} [T] = object 6 | -------------------------------------------------------------------------------- /tests/types/ttypeofobjconstr.nim: -------------------------------------------------------------------------------- 1 | # issue #24751 2 | 3 | type A = object 4 | 5 | var a: typeof(A()) 6 | -------------------------------------------------------------------------------- /tests/untestable/tpostgres.nim: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/valgrind/tbasic_valgrind.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | valgrind: true 3 | cmd: "nim c --gc:destructors $file" 4 | """ 5 | 6 | echo "hello world" 7 | -------------------------------------------------------------------------------- /tests/varres/tvarres3.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | output: "45" 3 | """ 4 | 5 | var 6 | g = 5 7 | 8 | proc p(): var int = 9 | var bla = addr(g) #: array[0..7, int] 10 | result = bla[] 11 | 12 | p() = 45 13 | 14 | echo g 15 | 16 | -------------------------------------------------------------------------------- /tests/views/tcan_compile_nim.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim check --hints:on --experimental:strictFuncs --experimental:views compiler/nim.nim" 3 | action: "compile" 4 | """ 5 | -------------------------------------------------------------------------------- /tests/vm/mscriptcompiletime.nim: -------------------------------------------------------------------------------- 1 | # bug.nim 2 | var bar* {.compileTime.} = 1 3 | 4 | proc dummy = discard 5 | 6 | static: 7 | inc bar -------------------------------------------------------------------------------- /tests/vm/t17039.nim: -------------------------------------------------------------------------------- 1 | type 2 | Obj1 = object 3 | case kind: bool 4 | of false: 5 | field: seq[int] 6 | else: discard 7 | 8 | static: 9 | var obj1 = Obj1() 10 | obj1.field.add(@[]) 11 | -------------------------------------------------------------------------------- /tests/vm/t19199.nim: -------------------------------------------------------------------------------- 1 | # bug #19199 2 | proc mikasa(x: float) = doAssert x == 42 3 | 4 | static: 5 | mikasa 42.uint.float 6 | mikasa 42.uint.float 7 | -------------------------------------------------------------------------------- /tests/vm/tcgemptycallarg.nim: -------------------------------------------------------------------------------- 1 | static: 2 | doAssertRaises(ValueError): 3 | raise newException(ValueError, "Yes") 4 | -------------------------------------------------------------------------------- /tests/vm/tclosureiterator.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "Closure iterators are not supported by VM!" 3 | """ 4 | 5 | iterator iter*(): int {.closure.} = 6 | yield 3 7 | 8 | static: 9 | var x = iter 10 | -------------------------------------------------------------------------------- /tests/vm/tconst_float_as_int.nim: -------------------------------------------------------------------------------- 1 | 2 | # bug #4619 3 | const x: float = 0 4 | -------------------------------------------------------------------------------- /tests/vm/tconstscope1.nim: -------------------------------------------------------------------------------- 1 | # issue #5395 2 | 3 | const a = (var b = 3; b) 4 | echo b #[tt.Error 5 | ^ undeclared identifier: 'b']# 6 | -------------------------------------------------------------------------------- /tests/vm/tconstscope2.nim: -------------------------------------------------------------------------------- 1 | const 2 | a = (var x = 3; x) 3 | # should we allow this? 4 | b = x #[tt.Error 5 | ^ undeclared identifier: 'x']# 6 | -------------------------------------------------------------------------------- /tests/vm/tconststaticvar2.nim: -------------------------------------------------------------------------------- 1 | # issue #24634 2 | 3 | type J = object 4 | 5 | template m(u: J): int = 6 | let v = u 7 | 0 8 | 9 | proc g() = 10 | const x = J() 11 | const _ = m(x) 12 | 13 | g() 14 | -------------------------------------------------------------------------------- /tests/vm/tconststaticvar3.nim: -------------------------------------------------------------------------------- 1 | # issue #24633 2 | 3 | import std/sequtils 4 | 5 | proc f(a: static openArray[int]) = 6 | const s1 = a.mapIt(it) 7 | const s2 = a.toSeq() 8 | 9 | f([1,2,3]) 10 | -------------------------------------------------------------------------------- /tests/vm/tconststaticvar_wrong.nim: -------------------------------------------------------------------------------- 1 | proc test = 2 | const TEST = block: 3 | let i = 1 4 | const j = i + 1 #[tt.Error 5 | ^ cannot evaluate at compile time: i]# 6 | j 7 | -------------------------------------------------------------------------------- /tests/vm/tgorge.bat: -------------------------------------------------------------------------------- 1 | @echo gorge test -------------------------------------------------------------------------------- /tests/vm/tgorge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "gorge test" -------------------------------------------------------------------------------- /tests/vm/tgorgeex.bat: -------------------------------------------------------------------------------- 1 | @echo gorgeex test 2 | @exit /b 1 3 | -------------------------------------------------------------------------------- /tests/vm/tgorgeex.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "gorgeex test" 3 | exit 1 4 | -------------------------------------------------------------------------------- /tests/vm/tnilclosurecall.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "attempt to call nil closure" 3 | line: 8 4 | """ 5 | 6 | static: 7 | let x: proc () = nil 8 | x() 9 | -------------------------------------------------------------------------------- /tests/vm/tnilref.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "attempt to access a nil address" 3 | """ 4 | 5 | static: 6 | var s: ref int 7 | s[] = 1 -------------------------------------------------------------------------------- /tests/vm/tnocompiletimefunclambda.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "request to generate code for .compileTime proc: :anonymous" 3 | """ 4 | 5 | let a = func(a: varargs[int]) {.compileTime, closure.} = 6 | discard a[0] -------------------------------------------------------------------------------- /tests/vm/toverflowopcaddimmint.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "over- or underflow" 3 | """ 4 | 5 | static: 6 | proc p = 7 | var 8 | x = int64.high 9 | discard x + 1 10 | doAssert false 11 | p() 12 | -------------------------------------------------------------------------------- /tests/vm/toverflowopcaddint.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "over- or underflow" 3 | """ 4 | 5 | static: 6 | proc p = 7 | var 8 | x = int64.high 9 | y = 1 10 | discard x + y 11 | doAssert false 12 | p() 13 | -------------------------------------------------------------------------------- /tests/vm/toverflowopcmulint.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "over- or underflow" 3 | """ 4 | 5 | static: 6 | proc p = 7 | var 8 | x = 1'i64 shl 62 9 | discard x * 2 10 | doAssert false 11 | p() 12 | -------------------------------------------------------------------------------- /tests/vm/toverflowopcsubimmint.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "over- or underflow" 3 | """ 4 | 5 | static: 6 | proc p = 7 | var x = int64.low 8 | discard x - 1 9 | doAssert false 10 | p() 11 | -------------------------------------------------------------------------------- /tests/vm/toverflowopcsubint.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "over- or underflow" 3 | """ 4 | 5 | static: 6 | proc p = 7 | var 8 | x = int64.low 9 | y = 1 10 | discard x - y 11 | doAssert false 12 | p() 13 | -------------------------------------------------------------------------------- /tests/vm/tscriptcompiletime.nims: -------------------------------------------------------------------------------- 1 | discard """ 2 | cmd: "nim e $file" 3 | """ 4 | 5 | import mscriptcompiletime 6 | 7 | macro foo = 8 | doAssert bar == 2 9 | foo() 10 | -------------------------------------------------------------------------------- /tests/vm/tunsupportedintfloatcast.nim: -------------------------------------------------------------------------------- 1 | static: 2 | echo cast[int32](12.0) #[tt.Error 3 | ^ VM does not support 'cast' from tyFloat with size 8 to tyInt32 with size 4 due to different sizes]# 4 | -------------------------------------------------------------------------------- /tests/vm/tvarsection.nim: -------------------------------------------------------------------------------- 1 | var 2 | a {.compileTime.} = 2 3 | b = -1 4 | c {.compileTime.} = 3 5 | d = "abc" 6 | 7 | static: 8 | doAssert a == 2 9 | doAssert c == 3 10 | 11 | doAssert ($b & $d) == "-1abc" 12 | -------------------------------------------------------------------------------- /tests/vm/twrongconst.nim: -------------------------------------------------------------------------------- 1 | discard """ 2 | errormsg: "cannot evaluate at compile time: x" 3 | line: 7 4 | """ 5 | 6 | var x: array[100, char] 7 | template foo : char = x[42] 8 | 9 | const myConst = foo 10 | -------------------------------------------------------------------------------- /tools/detect/.gitignore: -------------------------------------------------------------------------------- 1 | pre.c 2 | pre.i 3 | genconsts.c 4 | other_consts.nim 5 | linux_amd64_consts.nim 6 | -------------------------------------------------------------------------------- /tools/detect/timesize.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(void) { 6 | printf("%ld\n", sizeof(time_t)); 7 | return 0; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /tools/niminst/nim-file.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tools/niminst/nim-file.ico -------------------------------------------------------------------------------- /tools/niminst/setup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tools/niminst/setup.ico -------------------------------------------------------------------------------- /tools/niminst/uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-lang/Nim/807840dc5bda1e6e218be24d704efb77421e0ccb/tools/niminst/uninstall.ico -------------------------------------------------------------------------------- /tools/ssl_config_parser.nims: -------------------------------------------------------------------------------- 1 | --d:ssl 2 | -------------------------------------------------------------------------------- /tools/start.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM COLOR 0A 3 | chcp 65001 4 | SET NIMPATH=%~dp0\.. 5 | SET PATH=%NIMPATH%\bin;%NIMPATH%\dist\mingw\bin;%PATH% 6 | cd %NIMPATH% 7 | cmd 8 | 9 | 10 | --------------------------------------------------------------------------------