Typesystem and profile updates

This commit is contained in:
Pieter Vander Vennet 2020-06-16 17:37:32 +02:00
parent 537fb2c613
commit 173756818e
17 changed files with 189 additions and 69 deletions

View file

@ -322,9 +322,19 @@ namespace AspectedRouting.Test
new Curry(Typs.String, Typs.String));
var f1 = f.Specialize(strstrstr);
Assert.Equal(new[] {strstrb, strstrstr}, f1.Types);
Assert.Equal(new[] {strstrb, strstrstr}, f1.Types);
}
[Fact]
public void SpecializeToCommonType()
{
var p0 = Funcs.Parse;
var p1 = Funcs.Const.Apply(new Constant(1.0));
var exprs = new[] {p0, p1};
var newTypes = exprs.SpecializeToCommonTypes(out var specializedExpressions);
Assert.Single(newTypes);
}
}
}