remove error set casting syntax. add @errSetCast

See #1061
This commit is contained in:
Andrew Kelley
2018-06-18 15:01:42 -04:00
parent 1ca90b5856
commit 5d705fc6e3
6 changed files with 109 additions and 16 deletions

View File

@@ -124,8 +124,8 @@ const Set2 = error{
};
fn testExplicitErrorSetCast(set1: Set1) void {
var x = Set2(set1);
var y = Set1(x);
var x = @errSetCast(Set2, set1);
var y = @errSetCast(Set1, x);
assert(y == error.A);
}