diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-19 23:44:11 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-19 23:47:15 -0800 |
commit | 9aacd50defdb4c6eb5d860a905af4d572cf7598a (patch) | |
tree | da5bbbfeab5aeb91e2d2e9f8a565279f6dfe3eb4 /edit | |
parent | 8a0f55cdffc03ee10b0d7b6740db89e622b4c1c1 (diff) | |
download | mu-9aacd50defdb4c6eb5d860a905af4d572cf7598a.tar.gz |
2464: edit/: update errors in shape-shifting recipes
Requires carefully deleting specializations so that they can be reintroduced each time.
Diffstat (limited to 'edit')
-rw-r--r-- | edit/010-warnings.mu | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/edit/010-warnings.mu b/edit/010-warnings.mu index b2d927c2..b84a512c 100644 --- a/edit/010-warnings.mu +++ b/edit/010-warnings.mu @@ -150,6 +150,55 @@ scenario run-hides-warnings-from-past-sandboxes [ ] ] +scenario run-updates-warnings-for-shape-shifting-recipes [ + trace-until 100/app # trace too long + assume-screen 100/width, 15/height + # define a shape-shifting recipe with an error + 1:address:array:character <- new [recipe foo x:_elem -> z:_elem [ +local-scope +load-ingredients +z <- add x, [a] +]] + 2:address:array:character <- new [foo 2] + 3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character + assume-console [ + press F4 + ] + run [ + event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data + ] + screen-should-contain [ + . run (F4) . + .recipe foo x:_elem -> z:_elem [ ┊ . + .local-scope ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .load-ingredients ┊ x. + .z <- add x, [a] ┊foo 2 . + .] ┊foo_3: 'add' requires number ingredients, but go↩. + .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊t [a] . + . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ . + ] + # now rerun everything + assume-console [ + press F4 + ] + run [ + event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data + ] + # error should remain unchanged + screen-should-contain [ + . run (F4) . + .recipe foo x:_elem -> z:_elem [ ┊ . + .local-scope ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .load-ingredients ┊ x. + .z <- add x, [a] ┊foo 2 . + .] ┊foo_3: 'add' requires number ingredients, but go↩. + .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊t [a] . + . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ . + ] +] + scenario run-shows-missing-type-warnings [ trace-until 100/app # trace too long assume-screen 100/width, 15/height |