mirror of
https://github.com/enso-org/enso.git
synced 2024-12-28 11:25:30 +03:00
wip
This commit is contained in:
parent
b0e811aff2
commit
c30d171457
@ -592,7 +592,13 @@ type Vector a
|
||||
case result.is_error of
|
||||
False ->
|
||||
if Warning.has_warnings result . not then result else
|
||||
Warning.map_attached_warnings (w-> Maybe.Some (Map_Error.Error i w)) result
|
||||
##
|
||||
IO.println 'AAA'
|
||||
IO.println (Warning.get_all result)
|
||||
IO.println (Warning.get_all result . map (w-> Maybe.Some (Map_Error.Error i w)))
|
||||
r = Warning.map_attached_warnings (w-> Maybe.Some (Map_Error.Error i w)) result
|
||||
rws = Warning.get_all r
|
||||
#IO.println rws
|
||||
True ->
|
||||
case on_problems of
|
||||
Problem_Behavior.Ignore ->
|
||||
|
@ -47,7 +47,7 @@ public final class Warning implements EnsoObject {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Builtin.Method(name = "origin", description = "Gets the payload of the warning.")
|
||||
@Builtin.Method(name = "origin", description = "Gets the origin (stack trace) of the warning.")
|
||||
public Object getOrigin() {
|
||||
return origin;
|
||||
}
|
||||
|
@ -284,9 +284,9 @@ spec = Test.group "Dataflow Warnings" <|
|
||||
res = [1,2,3,4].map even
|
||||
|
||||
res . should_equal [1, 0, 1, 0]
|
||||
Warning.get_all res . map .value . should_equal [4, 3, 2, 1]
|
||||
Warning.get_all res . map .value . should_equal [(Map_Error.Error 3 4), 4, (Map_Error.Error 2 3), 3, (Map_Error.Error 1 2), 2, (Map_Error.Error 0 1), 1]
|
||||
res.at 0 . should_equal 1
|
||||
Warning.get_all (res.at 0) . map .value . should_equal [4, 3, 2, 1]
|
||||
Warning.get_all (res.at 0) . map .value . should_equal [(Map_Error.Error 3 4), 4, (Map_Error.Error 2 3), 3, (Map_Error.Error 1 2), 2, (Map_Error.Error 0 1), 1]
|
||||
|
||||
slice = res.slice 1 4
|
||||
Warning.get_all slice . map .value . should_equal [4, 3, 2, 1]
|
||||
|
Loading…
Reference in New Issue
Block a user