Comments (3)
Compiling in static
section gives expected results (no action/crash at compile-time). In general NimNode
cannot be used at runtime, so I suspect it is a compiler bug instead, and has nothing to do with pattern matching itself (except it being able to trigger sempass failure. Just using newLit(0).kind
fails with "kind can only be used in compile-time context"
)
import macros, fusion/matching
{.experimental: "caseStmtMacros".}
static:
case newLit(0):
else:
discard
^ Simply compiles with no error, outputs "executed else"
from fusion.
but in macros it gives same error
import macros, fusion/matching
{.experimental: "caseStmtMacros".}
macro m =
case newLit 0
else: discard
m()
from fusion.
Fixed in #94 along with your example added to test suite.
from fusion.
Related Issues (20)
- Using caseStmtMacros inside a generic function fails HOT 3
- RFC: adopt semver, like almost all nimble packages
- Type naming for `btreetables` HOT 2
- `min` example for fusion/astdsl.nim is wrong HOT 4
- where is fusion.since? HOT 1
- fusion CI should run tests and docs for js HOT 5
- btreesets HOT 2
- regression: fusion CI doesn't run
- macos CI queues for a very long time HOT 6
- fusion CI should run js tests that require browser
- [matching] assertMatch not raise exception when failed HOT 1
- deprecate or remove fusion/[jsformdata,jsheaders] because of the new [std/jsformdata,jsheaders] HOT 5
- `matching` bug with `{orc,arc}` HOT 10
- Run CI tests with arc/orc in addition to default GC
- matching and tmatching trigger a ton of styleCheck hints HOT 5
- Support qualified variant selectors with matching? HOT 1
- open(f: var File, filehandle: FileHandle) does not work on Windows HOT 3
- fusion/matching should also use some and none instead of Some and None: HOT 1
- Matching example at top of docs fails to compile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fusion.