blob: 6330d3262a211163b35ebbcf3559a9e03462cfba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
(
(library "alterto.yql")
(import alterto_module '"alterto.yql")
(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))
# List<Int32> -> List<Uint16> (success)
(let targetType (ListType (DataType 'Uint16)))
(let emptyTarget (List targetType))
(let src (AsList (Int32 '1) (Int32 '2) (Int32 '3)))
(let world (Apply (bind alterto_module 'doAlterTo) world src targetType emptyTarget))
# List<Int32> -> List<Uint16> (fail)
(let targetType (ListType (DataType 'Uint16)))
(let emptyTarget (List targetType))
(let src (AsList (Int32 '1) (Int32 '"-2") (Int32 '3)))
(let world (Apply (bind alterto_module 'doAlterTo) world src targetType emptyTarget))
# List<Int32?> -> List<Uint16> (fail)
(let targetType (ListType (DataType 'Uint16)))
(let emptyTarget (List targetType))
(let src (AsList (Just (Int32 '1)) (Null) (Just (Int32 '3))))
(let world (Apply (bind alterto_module 'doAlterTo) world src targetType emptyTarget))
(return world)
)
|