public override IEnumerable <string> Dump() => new[] { "lambda:\n", " type:\n" } .Concat(GetExpressionType().Dump().Select(MapFunc2)) .Concat(new[] { " parameters:\n" }) .Concat( from i in ParameterList from j in i.Dump().Select(MapFunc2) select j) .Concat(new[] { " body:\n" }) .Concat(Body.Dump().Select(MapFunc2));
public void TypeInferenceTest3() { const string varName = "otherVar"; var example = new StatementList(MetaData.Empty, new VariableDeclaration(MetaData.Empty, varName, new NullExpression(MetaData.Empty), type: new UnknownType(MetaData.Empty, "i8")), new ExpressionStatement(MetaData.Empty, new VariableExpression(MetaData.Empty, varName))); example.SurroundWith(Environment.SolarSystem); Console.WriteLine(string.Join("", example.Dump())); Assert.AreEqual("i8", ((ExpressionStatement)example.Statements.Last()) .Expression.GetExpressionType().ToString()); }