Closed ghost closed 12 years ago
Code is not correct and can't be compiled by command line compiler.
Quasiquatation has been designed for usage in the macros only. This sample can be compiled with required Nemerle.Compiler.dll, -r Nemerle.Compiler switch, but runtime error throws. Because Nemerle AST requires initialized compiler context.
NPad crash is a bug that should be fixed, but code can not be executed correctrly.
Thats it, this crash is bug, in VS it compiles but not runs.
I was recompile NPad and can't reproduce a crash.
Your code compilation shows compiler error propertly.
This code:
using System.Console;
using Nemerle.Compiler; // reference
def expr = <[ 1 + 1 ]>;
def expr2 = <[ 1 + 1 ]>;
WriteLine($"expr type is $expr");
WriteLine($"expr2 type is $expr2");
works on my NPad without any modifications. Because NPad initializes compiler context.
Try to recompile NPad with latest Nemerle version.
yes with reference it's ok, but without it is a problem, and error is very informateless. It seems Nemerle.Compiler reference removes this error. Yes error is in invalid code and unreferenced Nemerle.Compiler.
This code not worked properly in Npad:
error says: