mirror of https://github.com/adamdruppe/arsd.git
test fail omg
This commit is contained in:
parent
be3d42a436
commit
afbb2f144c
16
script.d
16
script.d
|
@ -1,6 +1,9 @@
|
||||||
// dmd -g -ofscripttest -unittest -main script.d jsvar.d && ./scripttest
|
// dmd -g -ofscripttest -unittest -main script.d jsvar.d && ./scripttest
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
FIXME: fix `(new A()).b`
|
||||||
|
|
||||||
|
|
||||||
FIXME: i kinda do want a catch type filter e.g. catch(Exception f)
|
FIXME: i kinda do want a catch type filter e.g. catch(Exception f)
|
||||||
and perhaps overloads
|
and perhaps overloads
|
||||||
|
|
||||||
|
@ -2035,6 +2038,17 @@ unittest {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unittest {
|
||||||
|
// new nested class
|
||||||
|
interpret(q{
|
||||||
|
class A {}
|
||||||
|
A.b = class B { var c; this(a) { this.c = a; } }
|
||||||
|
var c = new A.b(5);
|
||||||
|
assert(A.b.c == null);
|
||||||
|
assert(c.c == 5);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
class ForeachExpression : Expression {
|
class ForeachExpression : Expression {
|
||||||
VariableDeclaration decl;
|
VariableDeclaration decl;
|
||||||
Expression subject;
|
Expression subject;
|
||||||
|
@ -2566,7 +2580,7 @@ Expression parseDottedVariableName(MyTokenStreamHere)(ref MyTokenStreamHere toke
|
||||||
tokens.popFront();
|
tokens.popFront();
|
||||||
return new DotVarExpression(ve, parseVariableName(tokens));
|
return new DotVarExpression(ve, parseVariableName(tokens));
|
||||||
}
|
}
|
||||||
throw new ScriptCompileException("Found "~token.str~" when expecting identifier", token.scriptFilename, token.lineNumber);
|
return ve;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue