| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:11:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. |
| // Try replacing the null-check pattern with its nested pattern. |
| // if (x case var y?) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:12:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. |
| // Try replacing the null-check pattern with its nested pattern. |
| // if (x case int y?) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:13:22: Warning: The null-check pattern will have no effect because the matched type isn't nullable. |
| // Try replacing the null-check pattern with its nested pattern. |
| // if (x case String y?) {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| static method test1(dynamic x) → dynamic { |
| { |
| hoisted dynamic y; |
| final synthesized dynamic #0#0 = x; |
| if(!(#0#0 == null) ?{core::bool} let final dynamic #t1 = y = #0#0 in true : false) { |
| } |
| } |
| { |
| hoisted core::int y; |
| final synthesized dynamic #1#0 = x; |
| if(!(#1#0 == null) ?{core::bool} #1#0 is core::int && (let final dynamic #t2 = y = #1#0{core::int} in true) : false) { |
| } |
| } |
| } |
| static method test2(core::num x) → dynamic { |
| { |
| hoisted core::num y; |
| final synthesized core::num #0#0 = x; |
| if(!(#0#0 == null) ?{core::bool} let final dynamic #t3 = y = #0#0 in true : false) { |
| } |
| } |
| { |
| hoisted core::int y; |
| final synthesized core::num #1#0 = x; |
| if(!(#1#0 == null) ?{core::bool} #1#0 is core::int && (let final dynamic #t4 = y = #1#0{core::int} in true) : false) { |
| } |
| } |
| { |
| hoisted core::String y; |
| final synthesized core::num #2#0 = x; |
| if(!(#2#0 == null) ?{core::bool} #2#0 is core::String && (let final dynamic #t5 = y = #2#0{core::String} in true) : false) { |
| } |
| } |
| } |