Diff of the two buildlogs: -- --- b1/build.log 2025-03-18 01:00:08.131654211 +0000 +++ b2/build.log 2025-03-18 02:46:28.435243559 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Mon Mar 17 12:02:32 -12 2025 -I: pbuilder-time-stamp: 1742256152 +I: Current time: Mon Apr 20 21:23:10 +14 2026 +I: pbuilder-time-stamp: 1776669790 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -26,51 +26,83 @@ dpkg-source: info: applying update-packaged-javascript-links.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/1144590/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/661133/tmp/hooks/D01_modify_environment starting +debug: Running on infom02-amd64. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Apr 20 07:23 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/661133/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/661133/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='amd64' - DEBIAN_FRONTEND='noninteractive' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="37" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu") + BASH_VERSION='5.2.37(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=amd64 + DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=12 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='amd64' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=x86_64 + HOST_ARCH=amd64 IFS=' ' - INVOCATION_ID='7fceaa7a558b46ae92cc2224ba75af01' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='1144590' - PS1='# ' - PS2='> ' + INVOCATION_ID=d70d90b7eb7342bdbc35e269d9a57809 + LANG=C + LANGUAGE=et_EE:et + LC_ALL=C + MACHTYPE=x86_64-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=661133 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.DYZmo1SU/pbuilderrc_JaC4 --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.DYZmo1SU/b1 --logfile b1/build.log crystal_1.14.0+dfsg-1.dsc' - SUDO_GID='109' - SUDO_UID='104' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.DYZmo1SU/pbuilderrc_7CSG --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.DYZmo1SU/b2 --logfile b2/build.log crystal_1.14.0+dfsg-1.dsc' + SUDO_GID=109 + SUDO_UID=104 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' I: uname -a - Linux infom01-amd64 6.1.0-32-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.12.12+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.12-1~bpo12+1 (2025-02-23) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Mar 4 11:20 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/1144590/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Mar 4 2025 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/661133/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -256,7 +288,7 @@ Get: 116 http://deb.debian.org/debian trixie/main amd64 llvm-19-tools amd64 1:19.1.7-1+b1 [511 kB] Get: 117 http://deb.debian.org/debian trixie/main amd64 llvm-19-dev amd64 1:19.1.7-1+b1 [43.2 MB] Get: 118 http://deb.debian.org/debian trixie/main amd64 zlib1g-dev amd64 1:1.3.dfsg+really1.3.1-1+b1 [920 kB] -Fetched 191 MB in 4s (45.1 MB/s) +Fetched 191 MB in 3s (59.5 MB/s) Preconfiguring packages ... Selecting previously unselected package libpython3.13-minimal:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19785 files and directories currently installed.) @@ -648,8 +680,8 @@ Setting up tzdata (2025a-2) ... Current default time zone: 'Etc/UTC' -Local time is now: Tue Mar 18 00:03:52 UTC 2025. -Universal Time is now: Tue Mar 18 00:03:52 UTC 2025. +Local time is now: Mon Apr 20 07:24:10 UTC 2026. +Universal Time is now: Mon Apr 20 07:24:10 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up liberror-perl (0.17030-1) ... @@ -755,7 +787,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/crystal-1.14.0+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../crystal_1.14.0+dfsg-1_source.changes +I: user script /srv/workspace/pbuilder/661133/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/661133/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/crystal-1.14.0+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../crystal_1.14.0+dfsg-1_source.changes dpkg-buildpackage: info: source package crystal dpkg-buildpackage: info: source version 1.14.0+dfsg-1 dpkg-buildpackage: info: source distribution unstable @@ -805,7 +841,7 @@ Warning: expanding macro -There was a problem expanding macro 'macro_140627337121056' +There was a problem expanding macro 'macro_140349667973872' Called macro defined in lib/markd/src/markd/renderers/html_renderer.cr:238:7 @@ -821,16988 +857,14363 @@ A total of 1 warnings were found. [1/13] Parse [1/13] Parse [2/13] Semantic (top level) [2/13] Semantic (top level) [3/13] Semantic (new) [3/13] Semantic (new) [4/13] Semantic (type declarations) [4/13] Semantic (type declarations) [5/13] Semantic (abstract def check) [5/13] Semantic (abstract def check) [6/13] Semantic (restrictions augmenter) [6/13] Semantic (restrictions augmenter) [7/13] Semantic (ivars initializers) [7/13] Semantic (ivars initializers) [8/13] Semantic (cvars initializers) [8/13] Semantic (cvars initializers) [9/13] Semantic (main) [9/13] Semantic (main) [10/13] Semantic (cleanup) [10/13] Semantic (cleanup) [11/13] Semantic (recursive struct check) [11/13] Semantic (recursive struct check) [12/13] Codegen (crystal) [12/13] Codegen (crystal) [13/13] Codegen (bc+obj) [13/13] [0/1] Codegen (bc+obj) [13/13] [1/1] Codegen (bc+obj) [13/13] [1/1] Codegen (bc+obj) [14/13] Codegen (linking) [14/13] Codegen (linking) .build/compiler_spec -v --order=random -Randomized with seed: 31974 -Normalize: regex literal - options - im im - imx imx - empty empty - x x - i i - StringInterpolation - simple simple - StringLiteral - expands to const expands to const - simple simple -Parser warnings - warns on suffix-less UInt64 literals > Int64::MAX warns on suffix-less UInt64 literals > Int64::MAX - warns on missing space before colon - in return type restriction in return type restriction - in type declaration in type declaration - in block param type restriction in block param type restriction - in anonymous block param type restriction in anonymous block param type restriction -Code gen: def with default value - considers first the one with a restriction considers first the one with a restriction - codegens def new with one default value codegens def new with one default value - codegens def with one default value codegens def with one default value - resolves expanded call to current type, not to virtual type resolves expanded call to current type, not to virtual type - considers first the one with more arguments considers first the one with more arguments - doesn't mix types of instance vars with initialize and new doesn't mix types of instance vars with initialize and new -Code gen: C ABI - promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) - passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) - passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) - passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) - promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) - returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) - passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) - promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) - accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) - returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) - promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) - returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret - passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) - promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) +Randomized with seed: 31763 +Normalize: and + normalizes and with assignment normalizes and with assignment + normalizes and with ! on var.is_a?(...) normalizes and with ! on var.is_a?(...) + normalizes and with is_a? on exp normalizes and with is_a? on exp + normalizes and without variable normalizes and without variable + normalizes and with ! on var normalizes and with ! on var + normalizes and with variable on the left normalizes and with variable on the left + normalizes and with is_a? on var normalizes and with is_a? on var +View#module_name + hyphen followed by non-ascii letter is replaced by its character hyphen followed by non-ascii letter is replaced by its character + namespace is divided by hyphen namespace is divided by hyphen + underscore is ignored underscore is ignored +Semantic: closure + doesn't assign all types to metavar if closured but declared inside block and never re-assigned doesn't assign all types to metavar if closured but declared inside block and never re-assigned + doesn't assign all types to metavar if closured but only assigned to once doesn't assign all types to metavar if closured but only assigned to once + doesn't closure typeof local var doesn't closure typeof local var + correctly captures type of closured block arg correctly captures type of closured block arg + errors when transforming block to proc literal if type mismatch errors when transforming block to proc literal if type mismatch + allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal + errors if sending closured proc pointer to C (2) errors if sending closured proc pointer to C (2) + doesn't mark var as closured if only used in block doesn't mark var as closured if only used in block + allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize + marks outer fun as closured when using self marks outer fun as closured when using self + transforms block to proc literal without parameters transforms block to proc literal without parameters + doesn't assign all types to metavar if closured but declared inside block and re-assigned inside the same context before the closure doesn't assign all types to metavar if closured but declared inside block and re-assigned inside the same context before the closure + errors if sending closured proc pointer to C (1) errors if sending closured proc pointer to C (1) + is considered as closure if assigned once but comes from a method arg is considered as closure if assigned once but comes from a method arg + doesn't mark var as closured if only used in two block doesn't mark var as closured if only used in two block + errors if sending closured proc literal to C errors if sending closured proc literal to C + errors if forwarding block param doesn't match input type errors if forwarding block param doesn't match input type + doesn't mark self var as closured, but marks method as self closured doesn't mark self var as closured, but marks method as self closured + gives error when doing yield inside proc literal gives error when doing yield inside proc literal + marks variable as closured in program marks variable as closured in program + marks variable as closured in def marks variable as closured in def + doesn't crash for non-existing variable (#3789) doesn't crash for non-existing variable (#3789) + says can't send closure to C with new notation says can't send closure to C with new notation + marks method as self closured if instance var is read marks method as self closured if instance var is read + transforms block to proc literal with void type transforms block to proc literal with void type + marks method as self closured if explicit self call is made marks method as self closured if explicit self call is made + transforms block to proc literal transforms block to proc literal + marks variable as closured inside block in fun marks variable as closured inside block in fun + does assign all types to metavar if closured but only assigned to once in a loop through block does assign all types to metavar if closured but only assigned to once in a loop through block + does assign all types to metavar if closured but only assigned to once in a loop does assign all types to metavar if closured but only assigned to once in a loop + marks method as self closured if instance var is written marks method as self closured if instance var is written + considers var as closure-readonly if it was assigned multiple times before it was closured considers var as closure-readonly if it was assigned multiple times before it was closured + unifies types of closured var (2) unifies types of closured var (2) + marks variable as closured in program on assign marks variable as closured in program on assign + errors if giving more block args when transforming block to proc literal errors if giving more block args when transforming block to proc literal + doesn't closure typeof instance var (#9479) doesn't closure typeof instance var (#9479) + errors if sending closured proc pointer to C (3) errors if sending closured proc pointer to C (3) + does assign all types to metavar if closured but only assigned to once in a loop through captured block does assign all types to metavar if closured but only assigned to once in a loop through captured block + marks outer fun inside a block as closured marks outer fun inside a block as closured + marks method as self closured if used inside a block marks method as self closured if used inside a block + errors if forwarding block param doesn't match input type size errors if forwarding block param doesn't match input type size + errors if sending closured proc pointer to C (1.2) errors if sending closured proc pointer to C (1.2) + transforms block to proc literal with free var transforms block to proc literal with free var + says can't send closure to C with captured block says can't send closure to C with captured block + can use fun typedef as block type can use fun typedef as block type + correctly detects previous var as closured (#5609) correctly detects previous var as closured (#5609) + marks method as self closured if implicit self call is made marks method as self closured if implicit self call is made + passes #227 passes #227 + gives error when doing yield inside proc literal gives error when doing yield inside proc literal + unifies types of closured var (1) unifies types of closured var (1) + lookups return type in correct scope lookups return type in correct scope + marks variable as closured in block marks variable as closured in block +MacroExpander + expands macro with boolean expands macro with boolean + does not expand when macro expression is {% ... %} does not expand when macro expression is {% ... %} + expands macro with string substitution expands macro with string substitution + expands macro with char expands macro with char + does regular unless does regular unless + if + expands macro with if else when falsey expands macro with if else when falsey + expands macro with if when falsey expands macro with if when falsey + expands macro with if with nop expands macro with if with nop + expands macro with if when truthy expands macro with if when truthy + expands macro with if with not expands macro with if with not + expands macro with string expands macro with string + expands macro with hash expands macro with hash + does regular if does regular if + can't use `yield` outside a macro can't use `yield` outside a macro + expands macro with argument-less call substitution expands macro with argument-less call substitution + expands macro with symbol substitution expands macro with symbol substitution + expands macro with var substitution expands macro with var substitution + expands simple macro expands simple macro + for + expands macro with for over range literal expands macro with for over range literal + expands macro with for over array literal expands macro with for over array literal + expands macro with for over hash literal expands macro with for over hash literal + expands macro with for over range literal, evaluating elements (exclusive) expands macro with for over range literal, evaluating elements (exclusive) + expands macro with for over range literal, evaluating elements expands macro with for over range literal, evaluating elements + expands macro with for over array literal with index expands macro with for over array literal with index + expands macro with for over tuple literal expands macro with for over tuple literal + expands macro with for over embedded array literal expands macro with for over embedded array literal + expands macro with for over hash literal with index expands macro with for over hash literal with index + expands macro with tuple expands macro with tuple + expands macro with and (1) expands macro with and (1) + expands macro with and (2) expands macro with and (2) + outputs invisible location pragmas outputs invisible location pragmas + expands macro with range expands macro with range + expands macro with array expands macro with array + expands macro with integer expands macro with integer + expands macro with or (2) expands macro with or (2) + expands macro with or (1) expands macro with or (1) + expands macro with symbol expands macro with symbol + expands macro with string interpolation expands macro with string interpolation + expands macro with nil expands macro with nil +Codegen: extern struct + declares extern struct, sets and gets instance var declares extern struct, sets and gets instance var + codegens proc that takes and returns large extern struct by value codegens proc that takes and returns large extern struct by value + declares extern union with no constructor declares extern union with no constructor + declares extern union, sets and gets instance var declares extern union, sets and gets instance var + sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union + declares extern struct with no constructor, assigns var declares extern struct with no constructor, assigns var + sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct + codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI + invokes proc with extern struct invokes proc with extern struct + codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret + invokes proc with extern struct with sret invokes proc with extern struct with sret + codegens extern proc call twice (#4982) codegens extern proc call twice (#4982) + codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) + codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil + codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI + doesn't crash with proc with extern struct that's a closure doesn't crash with proc with extern struct that's a closure + declares extern struct with no constructor declares extern struct with no constructor + codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI +Code gen: uninitialized + codegens declare var and changes it codegens declare var and changes it + codegens declare var and read it codegens declare var and read it + doesn't break on inherited declared var (#390) doesn't break on inherited declared var (#390) + works with uninitialized NoReturn (#3314) works with uninitialized NoReturn (#3314) + codegens value (#3641) codegens value (#3641) + works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) works inside while/begin/rescue (bug inside #759) + codegens declare instance var with static array type codegens declare instance var with static array type + codegens declare instance var codegens declare instance var Normalize: block - normalizes unpacking with single expression body normalizes unpacking with single expression body - normalizes nested unpacking normalizes nested unpacking normalizes unpacking with underscore normalizes unpacking with underscore + normalizes nested unpacking normalizes nested unpacking + normalizes unpacking with splat normalizes unpacking with splat + normalizes unpacking with single expression body normalizes unpacking with single expression body + normalizes unpacking with multiple body expressions normalizes unpacking with multiple body expressions normalizes multiple nested unpackings normalizes multiple nested unpackings normalizes unpacking with empty body normalizes unpacking with empty body - normalizes unpacking with multiple body expressions normalizes unpacking with multiple body expressions - normalizes unpacking with splat normalizes unpacking with splat -Code gen: splat - evaluates splat argument just once (#2677) evaluates splat argument just once (#2677) - splats in initialize splats in initialize - splats without args splats without args - splats with default value (2) splats with default value (2) - splats with default value splats with default value - splats on call splats on call - splats with another arg splats with another arg - splats splats - splats with default value (3) splats with default value (3) - does #2407 does #2407 -Semantic: did you mean - suggest that there might be a typo for an initialize method with overload suggest that there might be a typo for an initialize method with overload - says did you mean for class says did you mean for class - says did you mean for global method with parenthesis says did you mean for global method with parenthesis - suggest that there might be a typo for an initialize method in inherited class suggest that there might be a typo for an initialize method in inherited class - suggests a better alternative to logical operators (#2715) suggests a better alternative to logical operators (#2715) - suggest that there might be a typo for an initialize method suggest that there might be a typo for an initialize method - doesn't suggest when declaring var inside macro (#466) doesn't suggest when declaring var inside macro (#466) - doesn't suggest for operator doesn't suggest for operator - says did you mean for variable says did you mean for variable - says did you mean for named argument says did you mean for named argument - says did you mean for global method without parenthesis says did you mean for global method without parenthesis - doesn't suggest when declaring var with suffix if and using it (#946) doesn't suggest when declaring var with suffix if and using it (#946) - says did you mean for one mistake in short word in instance method says did you mean for one mistake in short word in instance method - says did you mean finds most similar in type says did you mean finds most similar in type - says did you mean for instance var says did you mean for instance var - says did you mean for two mistakes in long word in instance method says did you mean for two mistakes in long word in instance method - says did you mean finds most similar in def says did you mean finds most similar in def - suggests for class variable suggests for class variable - says did you mean for nested class says did you mean for nested class - says did you mean for instance var in subclass says did you mean for instance var in subclass - says did you mean in instance var declaration says did you mean in instance var declaration -Code gen: magic constants - does __LINE__ when specifying one middle argument does __LINE__ when specifying one middle argument - does __FILE__ does __FILE__ - does __DIR__ does __DIR__ - does __END_LINE__ without block does __END_LINE__ without block - does __LINE__ in macro does __LINE__ in macro - does __DIR__ in macro does __DIR__ in macro - does __END_LINE__ with block does __END_LINE__ with block - does __FILE__ in macro does __FILE__ in macro - does __LINE__ with dispatch does __LINE__ with dispatch - does __LINE__ does __LINE__ - does __END_LINE__ in macro without block does __END_LINE__ in macro without block - does __LINE__ when specifying one normal default arg does __LINE__ when specifying one normal default arg - does __END_LINE__ in macro with block does __END_LINE__ in macro with block - does __LINE__ when specifying one default arg with __FILE__ does __LINE__ when specifying one default arg with __FILE__ -Crystal::Repl::Interpreter - class vars - does class var initializer with union (#12633) does class var initializer with union (#12633) - reads class var initializer with union (#12633) reads class var initializer with union (#12633) - interprets class var for virtual metaclass type interprets class var for virtual metaclass type - finds self in class var initializer (#12439) finds self in class var initializer (#12439) - interprets class var for virtual type interprets class var for virtual type - interprets class var with initializer interprets class var with initializer - interprets class var without initializer interprets class var without initializer -Normalize: case - normalizes case with var in cond normalizes case with var in cond - normalizes case without cond, when and else normalizes case without cond, when and else - normalizes case with Path.class to is_a? normalizes case with Path.class to is_a? - normalizes case with multiple expressions and comma normalizes case with multiple expressions and comma - normalizes case with nil to is_a? normalizes case with nil to is_a? - normalizes case with multiple expressions normalizes case with multiple expressions - normalizes case without value normalizes case without value - normalizes case with Generic.class to is_a? normalizes case with Generic.class to is_a? - normalizes case with many expressions in when normalizes case with many expressions in when - normalizes case without cond, when but else normalizes case without cond, when but else - normalizes case with multiple expressions with all underscores normalizes case with multiple expressions with all underscores - normalizes case with implicit as (#3040) normalizes case with implicit as (#3040) - normalizes case with assignment wrapped by paren normalizes case with assignment wrapped by paren - normalizes case with generic to is_a? normalizes case with generic to is_a? - normalizes case with multiple expressions with underscore normalizes case with multiple expressions with underscore - normalizes case with call normalizes case with call - normalizes case with implicit call normalizes case with implicit call - normalizes case without when and else normalizes case without when and else - normalizes case with Path to is_a? normalizes case with Path to is_a? - normalizes case with multiple expressions and types normalizes case with multiple expressions and types - normalizes case with implicit as? (#3040) normalizes case with implicit as? (#3040) - normalizes case with multiple expressions and non-tuple normalizes case with multiple expressions and non-tuple - normalizes case with implicit is_a? (#3040) normalizes case with implicit is_a? (#3040) - normalizes case without when but else normalizes case without when but else - normalizes case with multiple expressions and implicit obj normalizes case with multiple expressions and implicit obj - normalizes case with assignment normalizes case with assignment - normalizes case with implicit responds_to? (#3040) normalizes case with implicit responds_to? (#3040) - normalizes case without value with many expressions in when normalizes case without value with many expressions in when - normalizes case with implicit ! normalizes case with implicit ! - normalizes case with multiple expressions with all underscores twice normalizes case with multiple expressions with all underscores twice - normalizes case with Path.class to is_a? (in) normalizes case with Path.class to is_a? (in) -Semantic: return - can use non-type free var in return type (#6543) can use non-type free var in return type (#6543) - can use type var as return type with an inherited generic class can use type var as return type with an inherited generic class - infers return type infers return type - errors on return in top level errors on return in top level - can use non-type free var in return type (2) (#6543) can use non-type free var in return type (2) (#6543) - errors if non-type free var cannot be inferred errors if non-type free var cannot be inferred - types return if true types return if true - doesn't confuse return type from base class doesn't confuse return type from base class - can use type var as return type with an included generic module can use type var as return type with an included generic module - infers return type with many returns (1) infers return type with many returns (1) - types bug (#1823) types bug (#1823) - flattens splats inside multiple return values flattens splats inside multiple return values - can use free var in return type (#2492) can use free var in return type (#2492) - allows nilable return type to match subclasses (#1735) allows nilable return type to match subclasses (#1735) - allows returning NoReturn instead of the wanted type allows returning NoReturn instead of the wanted type - forms a tuple from multiple return values forms a tuple from multiple return values - can use type var as return type (#1226) can use type var as return type (#1226) - infers return type with many returns (2) infers return type with many returns (2) -Code gen: multi assign - supports m to n assignment, splat is empty tuple (1) supports m to n assignment, splat is empty tuple (1) - supports 1 to n assignment, splat is empty (2) supports 1 to n assignment, splat is empty (2) - supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short supports 1 to n assignment, raises if too short - supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) supports 1 to n assignment, raises if out of bounds (1) - supports 1 to n assignment, with splat on left-hand side (2) supports 1 to n assignment, with splat on left-hand side (2) - supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) supports 1 to n assignment, splat is empty (1) - supports m to n assignment, splat is empty tuple (2) supports m to n assignment, splat is empty tuple (2) - without strict_multi_assign - supports 1 to n assignment supports 1 to n assignment - doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count doesn't raise if value size in 1 to n assignment doesn't match target count - supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) supports 1 to n assignment, raises if out of bounds (2) - supports 1 to n assignment, with splat on left-hand side (3) supports 1 to n assignment, with splat on left-hand side (3) - supports m to n assignment, with splat on left-hand side (2) supports m to n assignment, with splat on left-hand side (2) - supports n to n assignment supports n to n assignment - supports m to n assignment, with splat on left-hand side (3) supports m to n assignment, with splat on left-hand side (3) - supports 1 to n assignment, splat is empty (3) supports 1 to n assignment, splat is empty (3) - strict_multi_assign - supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment supports 1 to n assignment - raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count raises if value size in 1 to n assignment doesn't match target count - supports m to n assignment, with splat on left-hand side (1) supports m to n assignment, with splat on left-hand side (1) - supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) supports 1 to n assignment, with splat on left-hand side (1) - supports m to n assignment, splat is empty tuple (3) supports m to n assignment, splat is empty tuple (3) -Crystal::Repl::Interpreter - sizeof - interprets sizeof typeof interprets sizeof typeof - instance_alignof - interprets instance_alignof typeof interprets instance_alignof typeof - alignof - interprets alignof typeof interprets alignof typeof - instance_sizeof - interprets instance_sizeof typeof interprets instance_sizeof typeof -Crystal::Repl::Interpreter - exception handling - captures exception in variable captures exception in variable - raises and rescues anything, does ensure when an exception is rescued raises and rescues anything, does ensure when an exception is rescued - does ensure with explicit return does ensure with explicit return - executes ensure when returning a big value from a block executes ensure when returning a big value from a block - does ensure without rescue/raise does ensure without rescue/raise - executes ensure when exception is raised in rescue executes ensure when exception is raised in rescue - does ensure for else when else raises does ensure for else when else raises - raises and rescues anything raises and rescues anything - does rescue when nothing is raised does rescue when nothing is raised - raises and rescues specific exception type raises and rescues specific exception type - does ensure for else does ensure for else - executes ensure when exception is raised in body executes ensure when exception is raised in body - executes ensure when returning from a block executes ensure when returning from a block - does else does else - executes ensure when returning from a block (2) executes ensure when returning from a block (2) - executes ensure when breaking from a block executes ensure when breaking from a block -Semantic: ssa - types a var with an if with nested if types a var with an if with nested if - types block with next types block with next - doesn't change type to nilable inside if doesn't change type to nilable inside if - types a var inside an if without change in else types a var inside an if without change in else - types while with break with new var types while with break with new var - types re-assign inside while (bug) types re-assign inside while (bug) - types if with restricted type in then types if with restricted type in then - types while with break doesn't infect initial vars types while with break doesn't infect initial vars - types a redefined variable types a redefined variable - types a var that is re-assigned in a while and used in condition types a var that is re-assigned in a while and used in condition - types a var inside an if with previous definition types a var inside an if with previous definition - types if with return in else types if with return in else - types if/else with var (bug) types if/else with var (bug) - types a var after begin ensure as having last type (2) types a var after begin ensure as having last type (2) - types if with next in then types if with next in then - doesn't error if same variable is declared in multiple typeofs doesn't error if same variable is declared in multiple typeofs - types a var that is re-assigned in a while condition types a var that is re-assigned in a while condition - types if with return in then with assign types if with return in then with assign - types block with break doesn't infect initial vars types block with break doesn't infect initial vars - types a var that is declared in a while with out types a var that is declared in a while with out - types a var inside an if without previous definition types a var inside an if without previous definition - types if with return in both branches types if with return in both branches - types a var that is re-assigned in a while types a var that is re-assigned in a while - types while with break types while with break - types a var inside an if without change in then types a var inside an if without change in then - types if with break in then types if with break in then - types if with unreachable in then types if with unreachable in then - types a var that is re-assigned in a while in next and used in condition types a var that is re-assigned in a while in next and used in condition - preserves type filters after block (bug) preserves type filters after block (bug) - types if with return in then types if with return in then - types a var with an if but without change types a var with an if but without change - types a var that is declared in a while condition with break before re-assignment types a var that is declared in a while condition with break before re-assignment - types block with break types block with break - types a var that is declared in a while condition types a var that is declared in a while condition - types a var inside an if without definition in then types a var inside an if without definition in then - types re-assign inside if (bug) types re-assign inside if (bug) - types a var after begin ensure as having last type types a var after begin ensure as having last type - doesn't error if same variable is used in multiple arguments of same typeof doesn't error if same variable is used in multiple arguments of same typeof - types a var that is declared in a while types a var that is declared in a while - errors if accessing variable declared inside typeof errors if accessing variable declared inside typeof - types while with next types while with next - types if with return in else with assign types if with return in else with assign - types if with restricted type in else types if with restricted type in else - types a var that is re-assigned in a block types a var that is re-assigned in a block - types a var inside an if without definition in else types a var inside an if without definition in else - types a var that is declared in a while condition with break after re-assignment types a var that is declared in a while condition with break after re-assignment -Crystal::Repl::Interpreter - enum - does enum new does enum new - does enum value does enum value -Crystal::JSONHierarchyPrinter - works works -Semantic: hooks - errors if wrong finished params length errors if wrong finished params length - includes error message in included hook (#889) includes error message in included hook (#889) - does included macro for generic module does included macro for generic module - errors if wrong included params size errors if wrong included params size - errors if wrong extended params length errors if wrong extended params length - types macro finished hook bug regarding initialize (#3964) types macro finished hook bug regarding initialize (#3964) - does not invoke 'method_added' hook recursively does not invoke 'method_added' hook recursively - does included macro does included macro - does extended macro does extended macro - does inherited macro through generic instance type (#9693) does inherited macro through generic instance type (#9693) - does inherited macro does inherited macro - does added method macro does added method macro - types initializer in inherited types initializer in inherited - errors if wrong extended params size errors if wrong extended params size - does inherited macro for generic class does inherited macro for generic class - errors if wrong inherited params size errors if wrong inherited params size -Code gen: method_missing - forwards forwards - finds method_missing with 'with ... yield' finds method_missing with 'with ... yield' - does method_missing macro with block but not using it does method_missing macro with block but not using it - does method_missing generating method does method_missing generating method - works with named arguments that aren't legal variable names (#10381) works with named arguments that aren't legal variable names (#10381) - does method_missing macro with virtual type (2) does method_missing macro with virtual type (2) - does method_missing macro without args does method_missing macro without args - works with named arguments (#3654) works with named arguments (#3654) - does method_missing macro with virtual type (3) does method_missing macro with virtual type (3) - does method_missing macro with virtual type (5) does method_missing macro with virtual type (5) - does method_missing macro with virtual type (8) does method_missing macro with virtual type (8) - does method_missing macro with module involved does method_missing macro with module involved - does method_missing macro with virtual type (6) does method_missing macro with virtual type (6) - does method_missing macro with top level method involved does method_missing macro with top level method involved - does method_missing with assignment (2) (bug) does method_missing with assignment (2) (bug) - does method_missing macro with virtual type (1) does method_missing macro with virtual type (1) - does method_missing macro with included module does method_missing macro with included module - does method_missing macro with args does method_missing macro with args - does method_missing macro with args (with call) does method_missing macro with args (with call) - does method_missing macro with virtual type (7) does method_missing macro with virtual type (7) - does method_missing macro with virtual type (4) does method_missing macro with virtual type (4) - does method_missing macro without args (with call) does method_missing macro without args (with call) - does method_missing macro with block does method_missing macro with block - does method_missing with assignment (bug) does method_missing with assignment (bug) -Semantic: yield with scope - finds macro finds macro - infer type of block body infer type of block body - infer type of block body with yield scope and arguments infer type of block body with yield scope and arguments - infer type of empty block body infer type of empty block body - errors if using instance variable at top level errors if using instance variable at top level - uses method of enclosing scope uses method of enclosing scope - uses instance variable of enclosing scope uses instance variable of enclosing scope - mentions with yield scope and current scope in error mentions with yield scope and current scope in error - passes #229 passes #229 - infer type of block body with yield scope infer type of block body with yield scope - invokes nested calls invokes nested calls -Code gen: new - finds new in superclass if no initialize is defined (1) finds new in superclass if no initialize is defined (1) - overloads new and initialize, 2 (#2489) overloads new and initialize, 2 (#2489) - inherits initialize for generic type inherits initialize for generic type - can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new can create Tuple with Tuple.new - finds new in superclass for Enum finds new in superclass for Enum - defines new for module defines new for module - evaluates initialize default value at the instance scope (2) (#731) evaluates initialize default value at the instance scope (2) (#731) - finds super in deep hierarchy finds super in deep hierarchy - codegens instance method with allocate codegens instance method with allocate - evaluates initialize default value at the instance scope (3) (#731) evaluates initialize default value at the instance scope (3) (#731) - evaluates initialize default value at the instance scope (1) (#731) evaluates initialize default value at the instance scope (1) (#731) - overloads new and initialize, 3 (#2489) overloads new and initialize, 3 (#2489) - codegens instance method with new and instance var codegens instance method with new and instance var - evaluates initialize default value at the instance scope (4) (#731) evaluates initialize default value at the instance scope (4) (#731) - codegens instance method with new codegens instance method with new - finds new in superclass if no initialize is defined (2) finds new in superclass if no initialize is defined (2) - inherits initialize inherits initialize - can create Reference can create Reference - overloads new and initialize, 1 (#2489) overloads new and initialize, 1 (#2489) -Codegen: responds_to? - codegens responds_to? with nilable gives false because other type 1 codegens responds_to? with nilable gives false because other type 1 - works with generic virtual module (1) works with generic virtual module (1) - codegens responds_to? true for simple type codegens responds_to? true for simple type - works with module works with module - works with generic virtual superclass (1) works with generic virtual superclass (1) - codegens responds_to? with union gives true codegens responds_to? with union gives true - works with two virtual types works with two virtual types - works with virtual class type (2) (#1926) works with virtual class type (2) (#1926) - codegens responds_to? with nilable gives true codegens responds_to? with nilable gives true - works with generic virtual superclass (2) works with generic virtual superclass (2) - works with virtual class type (1) (#1926) works with virtual class type (1) (#1926) - doesn't error if result is discarded (#14113) doesn't error if result is discarded (#14113) - does for generic instance type metaclass (#4353) does for generic instance type metaclass (#4353) - codegens responds_to? with generic class (1) codegens responds_to? with generic class (1) - codegens responds_to? with nilable gives false because other type 2 codegens responds_to? with nilable gives false because other type 2 - works with virtual type works with virtual type - works with generic virtual module (2) (#8334) works with generic virtual module (2) (#8334) - codegens responds_to? with generic class (2) codegens responds_to? with generic class (2) - codegens responds_to? false for simple type codegens responds_to? false for simple type - codegens responds_to? with union gives false codegens responds_to? with union gives false -Semantic: if - restricts && else in sub && (right) restricts && else in sub && (right) - restricts && of !var.is_a(...) restricts && of !var.is_a(...) - includes pointer types in falsey branch includes pointer types in falsey branch - doesn't restrict || else in sub && (right) doesn't restrict || else in sub && (right) - doesn't filter and recombine when variables don't change in if doesn't filter and recombine when variables don't change in if - correctly filters type of variable if there's a raise with an interpolation that can't be typed correctly filters type of variable if there's a raise with an interpolation that can't be typed - restricts and doesn't unify union types restricts and doesn't unify union types - restricts the type of the right hand side of an || when using is_a? (#1728) restricts the type of the right hand side of an || when using is_a? (#1728) - restricts || else in sub || (left) restricts || else in sub || (left) - errors if requires inside if errors if requires inside if - doesn't fail on Expressions condition (1) doesn't fail on Expressions condition (1) - restricts with || but doesn't unify types to base class restricts with || but doesn't unify types to base class - types an if without else types an if without else - restricts && else in sub && (left) restricts && else in sub && (left) - types variable after unreachable else of && (#3360) types variable after unreachable else of && (#3360) - doesn't restrict with || on different vars doesn't restrict with || on different vars - restricts || else (2) (#3266) restricts || else (2) (#3266) - doesn't fail on new variables inside typeof condition doesn't fail on new variables inside typeof condition - doesn't restrict || else in sub && (left) doesn't restrict || else in sub && (left) - restricts with && always falsey restricts with && always falsey - types an if with else of same type types an if with else of same type - restricts type with !var.is_a?(...) and || restricts type with !var.is_a?(...) and || - types an if with else of different type types an if with else of different type - restricts type with !var.is_a?(...) and && restricts type with !var.is_a?(...) and && - can invoke method on var that is declared on the right hand side of an and can invoke method on var that is declared on the right hand side of an and - restricts with || (#2464) restricts with || (#2464) - passes bug (related to #1729) passes bug (related to #1729) - restricts || else (1) (#3266) restricts || else (1) (#3266) - types `if` with `&&` and assignment types `if` with `&&` and assignment - doesn't consider nil type in else branch with if with && (#7434) doesn't consider nil type in else branch with if with && (#7434) - doesn't restrict with || on var and non-restricting condition doesn't restrict with || on var and non-restricting condition - restricts || else (3) (#3266) restricts || else (3) (#3266) - doesn't fail on nested conditionals inside typeof condition doesn't fail on nested conditionals inside typeof condition - restricts || else in sub || (right) restricts || else in sub || (right) - restricts || of more than 2 clauses (#8864) restricts || of more than 2 clauses (#8864) - doesn't fail on Expressions condition (2) doesn't fail on Expressions condition (2) - restricts type with !var and || restricts type with !var and || -Code gen: alias - doesn't crash on cast to as recursive alias (#639) doesn't crash on cast to as recursive alias (#639) - invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) invokes methods on empty array of recursive alias (1) - casts to recursive alias casts to recursive alias casts to recursive alias casts to recursive alias casts to recursive alias casts to recursive alias casts to recursive alias casts to recursive alias casts to recursive alias casts to recursive alias - lazily solves aliases (#1346) lazily solves aliases (#1346) - overloads alias against generic (2) (#3261) overloads alias against generic (2) (#3261) - invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) invokes methods on empty array of recursive alias (3) - overloads alias against generic (1) (#3261) overloads alias against generic (1) (#3261) - codegens cast to alias that includes bool codegens cast to alias that includes bool - invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) invokes methods on empty array of recursive alias (2) - doesn't break with alias for link attributes doesn't break with alias for link attributes - casts to recursive alias casts to recursive alias -Lexer string array - lexes string array with new line gives correct column for next token lexes string array with new line gives correct column for next token - lexes simple string array lexes simple string array - using | as delimiter - lexes simple string array lexes simple string array - using < as delimiter - lexes simple string array lexes simple string array - using { as delimiter - lexes simple string array lexes simple string array - lexes string array with new line lexes string array with new line - using [ as delimiter - lexes simple string array lexes simple string array -Semantic: static array - types static array with type as size types static array with type as size - can match number type argument of static array (#1203) can match number type argument of static array (#1203) - types static array new types static array new - types static array new with size being a computed constant types static array new with size being a computed constant - doesn't crash on restriction (#584) doesn't crash on restriction (#584) - allows instantiating static array instance var in initialize of generic type allows instantiating static array instance var in initialize of generic type - types static array new with size being a computed constant, and use N (bug) types static array new with size being a computed constant, and use N (bug) - doesn't match other number type argument of static array (#1203) doesn't match other number type argument of static array (#1203) - types static array new with size being a nested constant inside type declaration (#5426) types static array new with size being a nested constant inside type declaration (#5426) - can match N type argument of static array (#1203) can match N type argument of static array (#1203) - doesn't crash on instance_sizeof (#8858) doesn't crash on instance_sizeof (#8858) - errors if trying to instantiate static array with N not an integer errors if trying to instantiate static array with N not an integer - doesn't crash on offsetof (#8858) doesn't crash on offsetof (#8858) - doesn't crash on sizeof (#8858) doesn't crash on sizeof (#8858) - errors on negative static array size errors on negative static array size - types static array with var declaration types static array with var declaration - types static array new with size being a constant types static array new with size being a constant +Semantic: var + lets type on else side of if with a Bool | Nil union lets type on else side of if with a Bool | Nil union + declares local variable and then assigns it declares local variable and then assigns it + declares local variable and immediately reads it declares local variable and immediately reads it + errors if variable already exists errors if variable already exists + types an assign types an assign + errors if declaring generic type without type vars (with local var) errors if declaring generic type without type vars (with local var) + reports variable always nil reports variable always nil + declares local variable and assigns wrong type declares local variable and assigns wrong type + declares local variable with value declares local variable with value + errors if declaring var that is already declared errors if declaring var that is already declared + types a variable types a variable + declares local variable but doesn't assign it in all branches declares local variable but doesn't assign it in all branches + reports there's no self reports there's no self + types an assign with type declaration types an assign with type declaration + reports undefined local variable or method reports undefined local variable or method + errors if reads from underscore errors if reads from underscore + declares local variable and assigns it with if declares local variable and assigns it with if + parse local variable as method call even if local variable is declared in call arguments parse local variable as method call even if local variable is declared in call arguments +Semantic: module + includes generic module with self (check return subclass type, error) includes generic module with self (check return subclass type, error) + gives error when including self gives error when including self + errors when extending module that defines instance vars (#4065) errors when extending module that defines instance vars (#4065) + gives error when including instantiation of self, generic module gives error when including instantiation of self, generic module + type def does not reopen type from parent namespace (#11181) type def does not reopen type from parent namespace (#11181) + can't reopen as struct can't reopen as struct + uses type declaration inside module, recursive, and gives error uses type declaration inside module, recursive, and gives error + instantiates generic variadic module, accesses T from instance method, more args instantiates generic variadic module, accesses T from instance method, more args + errors if reopening generic module with different splat index errors if reopening generic module with different splat index + includes module in a module includes module in a module + can restrict module with module (#3029) can restrict module with module (#3029) + gives error with cyclic include between non-generic and generic module (2) gives error with cyclic include between non-generic and generic module (2) + finds nested type inside method in block inside module finds nested type inside method in block inside module + includes generic module with self, and inherits it includes generic module with self, and inherits it + finds types close to included module finds types close to included module + errors when extending generic module that defines instance vars errors when extending generic module that defines instance vars + includes generic module with self (check argument superclass type, success) includes generic module with self (check argument superclass type, success) + types proc of module with generic class types proc of module with generic class + includes generic module explicitly and errors includes generic module explicitly and errors + calls super on included generic module and finds type var calls super on included generic module and finds type var + instantiates generic variadic module, accesses T from instance method through generic include, more args instantiates generic variadic module, accesses T from instance method through generic include, more args + instantiates generic variadic module, accesses T from instance method instantiates generic variadic module, accesses T from instance method + types pointer of module types pointer of module + can't pass module class to virtual metaclass (#6113) can't pass module class to virtual metaclass (#6113) + errors if reopening non-generic module as generic errors if reopening non-generic module as generic + errors when extending self and self defines instance vars (3) (#9568) errors when extending self and self defines instance vars (3) (#9568) + includes generic module explicitly includes generic module explicitly + declares module automatically if not previously declared when declaring a module declares module automatically if not previously declared when declaring a module + works ok in a case where a typed-def type has an underlying type that has an included generic module (bug) works ok in a case where a typed-def type has an underlying type that has an included generic module (bug) + finds inner class from inherited one (#476) finds inner class from inherited one (#476) + reports can't use instance variables inside module reports can't use instance variables inside module + includes but not a module includes but not a module + errors if reopening generic module with different type vars errors if reopening generic module with different type vars + gives error with cyclic include gives error with cyclic include + types pointer of module with generic type types pointer of module with generic type + errors when extending module that defines instance vars (2) (#4065) errors when extending module that defines instance vars (2) (#4065) + calls super on included generic module and finds type var (2) calls super on included generic module and finds type var (2) + extends generic module from generic module and calls class method (#7167) extends generic module from generic module and calls class method (#7167) + errors if reopening generic module with different splat index (3) errors if reopening generic module with different splat index (3) + can use generic module as instance variable type (2) can use generic module as instance variable type (2) + extends module from generic class and calls class method (#7167) extends module from generic class and calls class method (#7167) + includes generic module with self (check argument superclass type, success) includes generic module with self (check argument superclass type, success) + finds constant in generic module included in another module finds constant in generic module included in another module + initializes variable in module initializes variable in module + gives error when trying to instantiate with allocate gives error when trying to instantiate with allocate + errors when extending self and self defines instance vars (#9568) errors when extending self and self defines instance vars (#9568) + includes generic module with self (check return type, error) includes generic module with self (check return type, error) + doesn't look up initialize past module that defines initialize (#7007) doesn't look up initialize past module that defines initialize (#7007) + extends self extends self + errors when extending self and self defines instance vars (2) (#9568) errors when extending self and self defines instance vars (2) (#9568) + errors if reopening generic module with different type vars (2) errors if reopening generic module with different type vars (2) + allows overloading with included generic module allows overloading with included generic module + types pointer of module with generic type types pointer of module with generic type + gives helpful error message when generic type var is missing in block spec gives helpful error message when generic type var is missing in block spec + uses :Module name for modules in errors uses :Module name for modules in errors + initializes variable in module, recursive initializes variable in module, recursive + uses type declaration inside module uses type declaration inside module + includes generic module and errors in call includes generic module and errors in call + inherits instance var type annotation from generic to concrete with T inherits instance var type annotation from generic to concrete with T + errors when recursively extending module that defines instance vars (2) errors when recursively extending module that defines instance vars (2) + gives error when trying to instantiate with new gives error when trying to instantiate with new + types union of module and class that includes it types union of module and class that includes it + types proc of module after type changes types proc of module after type changes + types pointer of module with method with two including types types pointer of module with method with two including types + doesn't lookup type in ancestor when matches in current type (#2982) doesn't lookup type in ancestor when matches in current type (#2982) + extends a module extends a module + inherits instance var type annotation from generic to generic to concrete inherits instance var type annotation from generic to generic to concrete + errors if including generic module and not specifying type vars errors if including generic module and not specifying type vars + inherits instance var type annotation from generic to concrete inherits instance var type annotation from generic to concrete + correctly types type var in included module, with a restriction with a free var (bug) correctly types type var in included module, with a restriction with a free var (bug) + gives error when including self, generic module gives error when including self, generic module + declares module automatically if not previously declared when declaring a class declares module automatically if not previously declared when declaring a class + gives error with cyclic include, generic module gives error with cyclic include, generic module + instantiates generic variadic module, accesses T from class method through generic extend instantiates generic variadic module, accesses T from class method through generic extend + can't reopen as class can't reopen as class + calls super on included generic module calls super on included generic module + includes module but wrong number of arguments includes module but wrong number of arguments + includes module but not generic includes module but not generic + gives error with cyclic include between non-generic and generic module gives error with cyclic include between non-generic and generic module + types pointer of module with method types pointer of module with method + errors when extending generic module that defines instance vars (2) errors when extending generic module that defines instance vars (2) + includes generic module with another generic type includes generic module with another generic type + can instantiate generic module can instantiate generic module + instantiates generic variadic module, accesses T from instance method through generic include instantiates generic variadic module, accesses T from instance method through generic include + includes module with Union(T*) includes module with Union(T*) + can use generic module as instance variable type can use generic module as instance variable type + includes generic module with self includes generic module with self + instantiates generic variadic module, accesses T from class method instantiates generic variadic module, accesses T from class method + includes module in a class includes module in a class + extends generic module from generic class and calls class method (#7167) extends generic module from generic class and calls class method (#7167) + includes generic module with self (check argument type, error) includes generic module with self (check argument type, error) + includes generic module with self (check return subclass type, success) includes generic module with self (check return subclass type, success) + finds class method in block finds class method in block + includes generic module with type includes generic module with type + gives helpful error message when generic type var is missing gives helpful error message when generic type var is missing + includes generic module with self (check argument type, success) includes generic module with self (check argument type, success) + errors when recursively extending module that defines instance vars errors when recursively extending module that defines instance vars + finds in module when included finds in module when included + uses type declaration inside module and gives error uses type declaration inside module and gives error + works with range and map works with range and map + includes module but can't access metaclass methods includes module but can't access metaclass methods + works with int including enumerable works with int including enumerable + errors if reopening generic module with different splat index (2) errors if reopening generic module with different splat index (2) + errors if declares module inside if errors if declares module inside if + includes generic module with self (check return type, success) includes generic module with self (check return type, success) +Code gen: experimental + compiles with single string argument compiles with single string argument + errors if invalid argument type errors if invalid argument type + compiles with no argument compiles with no argument + errors if missing link arguments errors if missing link arguments + errors if too many arguments errors if too many arguments +Semantic: tuples + accepts tuple covariance in array accepts tuple covariance in array + can iterate T can iterate T + allows tuple covariance allows tuple covariance + types tuple of one element and then two elements types tuple of one element and then two elements + #[](RangeLiteral) + types, inbound begin types, inbound begin + gives error when begin index is out of range gives error when begin index is out of range + types, exclusive range types, exclusive range + types, inbound begin, nilable types, inbound begin, nilable + types, out of bound begin, nilable types, out of bound begin, nilable + types, begin-less, end-less types, begin-less, end-less + types, begin-less types, begin-less + types, metaclass index types, metaclass index + types, inbound begin, end-less types, inbound begin, end-less + errors on recursive splat expansion (2) (#361) errors on recursive splat expansion (2) (#361) + errors on tuple too big (#3816) errors on tuple too big (#3816) + types tuple of one element types tuple of one element + can name a tuple type can name a tuple type + errors if non-tuple is splatted inside tuple errors if non-tuple is splatted inside tuple + merges two tuple types of same size merges two tuple types of same size + #[](NumberLiteral) + types, out of bound, nilable types, out of bound, nilable + types, inbound index types, inbound index + types, metaclass index types, metaclass index + types, inbound index, nilable types, inbound index, nilable + gives error when indexing out of range on empty tuple gives error when indexing out of range on empty tuple + gives error when indexing out of range gives error when indexing out of range + matches tuple with splat (#2932) matches tuple with splat (#2932) + gives error when using named args on Tuple gives error when using named args on Tuple + doesn't crash on tuple in not executed block (#6718) doesn't crash on tuple in not executed block (#6718) + doesn't unify tuple metaclasses (#5384) doesn't unify tuple metaclasses (#5384) + errors if non-tuple is splatted inside tuple (2) errors if non-tuple is splatted inside tuple (2) + errors on named tuple too big errors on named tuple too big + errors on recursive splat expansion (1) (#361) errors on recursive splat expansion (1) (#361) + types T as a tuple of metaclasses types T as a tuple of metaclasses + matches tuple with splat (2) (#2932) matches tuple with splat (2) (#2932) + errors on recursive splat expansion (#218) errors on recursive splat expansion (#218) + accept tuple in type restriction accept tuple in type restriction + errors if using two splat indices on restriction errors if using two splat indices on restriction + types tuple with splats inside types tuple with splats inside + doesn't error if Tuple has no args doesn't error if Tuple has no args + #[](Path) + works for named tuple indexer works for named tuple indexer + works for tuple indexer works for tuple indexer + types tuple of three elements types tuple of three elements + doesn't trigger recursive splat expansion error (#7164) doesn't trigger recursive splat expansion error (#7164) + can call [] on T can call [] on T +Call errors + replaces free variables in named argument replaces free variables in named argument + errors on argument if argument matches in all overloads but with different types in other arguments errors on argument if argument matches in all overloads but with different types in other arguments + says type mismatch for symbol against enum, named argument case says type mismatch for symbol against enum, named argument case + says missing named arguments says missing named arguments + says type mismatch for symbol against enum (list all possibilities when 10 or less) says type mismatch for symbol against enum (list all possibilities when 10 or less) + says no parameter named says no parameter named + errors on argument if more types are given than expected errors on argument if more types are given than expected + errors on argument if more types are given than expected, shows all expected types errors on argument if more types are given than expected, shows all expected types + replaces free variables in positional argument replaces free variables in positional argument + method signatures in error traces + expands double splat argument, empty named tuple expands double splat argument, empty named tuple + expands positional and single splat argument, empty tuple expands positional and single splat argument, empty tuple + expands single splat argument, empty tuple expands single splat argument, empty tuple + expands positional and single splat argument expands positional and single splat argument + uses `T.method` instead of `T.class#method` uses `T.method` instead of `T.class#method` + expands single splat argument, more elements expands single splat argument, more elements + expands positional and double splat argument, empty named tuple expands positional and double splat argument, empty named tuple + expands double splat argument expands double splat argument + expands single splat argument expands single splat argument + expands positional and double splat argument, more elements expands positional and double splat argument, more elements + uses `T.method` instead of `T:module#method` uses `T.method` instead of `T:module#method` + expands positional and double splat argument expands positional and double splat argument + expands positional and single splat argument, more elements expands positional and single splat argument, more elements + includes positional and named argument includes positional and named argument + includes named argument includes named argument + includes named arguments includes named arguments + expands double splat argument, more elements expands double splat argument, more elements + replaces generic type var in named argument replaces generic type var in named argument + says type mismatch for named argument says type mismatch for named argument + says not expected to be invoked with a block says not expected to be invoked with a block + says type mismatch for positional argument with two options says type mismatch for positional argument with two options + says wrong number of arguments even if other overloads don't match by block says wrong number of arguments even if other overloads don't match by block + says no parameters named says no parameters named + says missing named argument says missing named argument + says type mismatch for positional argument even if there are overloads that don't match says type mismatch for positional argument even if there are overloads that don't match + replaces generic type var in positional argument replaces generic type var in positional argument + says wrong number of arguments (to few arguments) says wrong number of arguments (to few arguments) + says type mismatch for positional argument with three options says type mismatch for positional argument with three options + says type mismatch for positional argument says type mismatch for positional argument + says expected to be invoked with a block says expected to be invoked with a block + says type mismatch for symbol against enum (did you mean) says type mismatch for symbol against enum (did you mean) + says argument already specified says argument already specified +Code gen: union type + dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable + codegens if with same nested union codegens if with same nested union + codegens union type when no obj and restrictions codegens union type when no obj and restrictions + assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 + codegens union type when obj is not union but arg is codegens union type when obj is not union but arg is + assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union + codegens union type when obj union but arg is not codegens union type when obj union but arg is not + respects union payload alignment when upcasting Bool (#14898) respects union payload alignment when upcasting Bool (#14898) + codegens union type when no obj codegens union type when no obj + codegens union type when obj is union and arg is union codegens union type when obj is union and arg is union + assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union + codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s + sorts restrictions when there are unions sorts restrictions when there are unions + provides T as a tuple literal provides T as a tuple literal + codegens union type for instance var codegens union type for instance var + assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 + codegens union type when obj is union and no args codegens union type when obj is union and no args + codegens union type as return value codegens union type as return value +Code gen: struct + uses nilable struct uses nilable struct + returns self with block returns self with block + codegens virtual struct metaclass (#2551) (2) codegens virtual struct metaclass (#2551) (2) + codegens virtual struct codegens virtual struct + codegens virtual struct with pointer codegens virtual struct with pointer + can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct can cast virtual struct to specific struct + does phi of struct does phi of struct + codegens virtual structs union (2) codegens virtual structs union (2) + codegens virtual structs union (1) codegens virtual structs union (1) + creates structs creates structs + codegens struct assigned to underscore (#1842) codegens struct assigned to underscore (#1842) + codegens virtual struct metaclass (#2551) (3) codegens virtual struct metaclass (#2551) (3) + codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) codegens virtual struct metaclass (#2551) (4) + casts virtual struct to base type, only one subclass (#2885) casts virtual struct to base type, only one subclass (#2885) + returns self returns self + creates struct in def creates struct in def + assigning a struct makes a copy (2) assigning a struct makes a copy (2) + passes a struct as a parameter makes a copy passes a struct as a parameter makes a copy + can call new on abstract struct with single child (#7309) can call new on abstract struct with single child (#7309) + creates structs with instance var creates structs with instance var + passes a generic struct as a parameter makes a copy passes a generic struct as a parameter makes a copy + codegens virtual struct metaclass (#2551) (1) codegens virtual struct metaclass (#2551) (1) + declares const struct declares const struct declares const struct declares const struct declares const struct declares const struct declares const struct declares const struct declares const struct declares const struct + uses struct in if uses struct in if uses struct in if uses struct in if uses struct in if uses struct in if uses struct in if uses struct in if uses struct in if uses struct in if + returns struct as a copy returns struct as a copy + allows assigning to struct argument (bug) allows assigning to struct argument (bug) + mutates a virtual struct mutates a virtual struct + assigning a struct makes a copy (1) assigning a struct makes a copy (1) Normalize: multi assign - normalizes m to n, with splat on left-hand side, splat is non-empty normalizes m to n, with splat on left-hand side, splat is non-empty - normalizes 1 to n, with splat on left-hand side, splat after other targets normalizes 1 to n, with splat on left-hand side, splat after other targets normalizes n to n with call normalizes n to n with call - without strict_multi_assign - normalizes 1 to n normalizes 1 to n - normalizes 1 to n with call normalizes 1 to n with call - normalizes 1 to n with [] normalizes 1 to n with [] - normalizes 1 to n, with splat on left-hand side normalizes 1 to n, with splat on left-hand side - normalizes m to n, with *_ on left-hand side (1) normalizes m to n, with *_ on left-hand side (1) - normalizes 1 to n, with *_ on left-hand side (2) normalizes 1 to n, with *_ on left-hand side (2) + normalizes 1 to n, with splat on left-hand side, splat after other targets normalizes 1 to n, with splat on left-hand side, splat after other targets normalizes n to *_ on left-hand side normalizes n to *_ on left-hand side - normalizes 1 to n, with splat on left-hand side, splat before other targets normalizes 1 to n, with splat on left-hand side, splat before other targets - normalizes n to n normalizes n to n + normalizes n to n with [] normalizes n to n with [] normalizes m to n, with *_ on left-hand side (2) normalizes m to n, with *_ on left-hand side (2) - normalizes n to splat on left-hand side normalizes n to splat on left-hand side normalizes 1 to *_ on left-hand side normalizes 1 to *_ on left-hand side + normalizes 1 to n, with *_ on left-hand side (2) normalizes 1 to n, with *_ on left-hand side (2) normalizes m to n, with *_ on left-hand side (3) normalizes m to n, with *_ on left-hand side (3) + normalizes 1 to n, with splat on left-hand side, splat before other targets normalizes 1 to n, with splat on left-hand side, splat before other targets normalizes 1 to n, with *_ on left-hand side (1) normalizes 1 to n, with *_ on left-hand side (1) - normalizes m to n, with splat on left-hand side, splat is empty normalizes m to n, with splat on left-hand side, splat is empty - normalizes n to n with [] normalizes n to n with [] + normalizes 1 to n, with *_ on left-hand side (3) normalizes 1 to n, with *_ on left-hand side (3) + normalizes m to n, with splat on left-hand side, splat is non-empty normalizes m to n, with splat on left-hand side, splat is non-empty + normalizes n to n normalizes n to n + normalizes 1 to splat on left-hand side normalizes 1 to splat on left-hand side + normalizes 1 to n, with splat on left-hand side normalizes 1 to n, with splat on left-hand side + normalizes m to n, with *_ on left-hand side (1) normalizes m to n, with *_ on left-hand side (1) + normalizes n to splat on left-hand side normalizes n to splat on left-hand side strict_multi_assign - normalizes 1 to n with [] normalizes 1 to n with [] normalizes 1 to n with call normalizes 1 to n with call normalizes 1 to n normalizes 1 to n - normalizes 1 to n, with *_ on left-hand side (3) normalizes 1 to n, with *_ on left-hand side (3) - normalizes 1 to splat on left-hand side normalizes 1 to splat on left-hand side -Codegen: thread local - compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer - works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread - works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables -Normalize: string interpolation - normalizes heredoc normalizes heredoc - replaces string constant that results from macro expansion replaces string constant that results from macro expansion - normalizes string interpolation normalizes string interpolation - replaces through multiple levels replaces through multiple levels - normalizes string interpolation with multiple lines normalizes string interpolation with multiple lines - replaces string constant replaces string constant -Semantic: cast - doesn't cast to virtual primitive (bug) doesn't cast to virtual primitive (bug) - doesn't cast to unbound generic type (as) (#5927) doesn't cast to unbound generic type (as) (#5927) - disallows casting to Class disallows casting to Class - can cast to metaclass (2) (#11121) can cast to metaclass (2) (#11121) - doesn't error if casting to a generic type doesn't error if casting to a generic type - disallows casting to Reference disallows casting to Reference - casts from union to incompatible union gives error casts from union to incompatible union gives error - allows casting object to void pointer allows casting object to void pointer - allows casting reference union to void pointer allows casting reference union to void pointer - should error if can't cast even if not instantiated should error if can't cast even if not instantiated - doesn't cast to unbound generic type (as?) (#5927) doesn't cast to unbound generic type (as?) (#5927) - considers else to be unreachable (#9658) considers else to be unreachable (#9658) - doesn't allow upcast of generic type var (#996) doesn't allow upcast of generic type var (#996) - allows casting NoReturn to any type (#2132) allows casting NoReturn to any type (#2132) - casts to incompatible type gives error casts to incompatible type gives error - casts to compatible type and use it casts to compatible type and use it - doesn't eagerly try to check cast type (#12268) doesn't eagerly try to check cast type (#12268) - casts to module casts to module - casts pointer of one type to another type casts pointer of one type to another type - casts from union to compatible union casts from union to compatible union - casts pointer to another type casts pointer to another type - casts from pointer to generic class gives error casts from pointer to generic class gives error - disallows casting int to pointer disallows casting int to pointer - doesn't crash with typeof no-type (#7441) doesn't crash with typeof no-type (#7441) - errors on cast inside a call that can't be instantiated errors on cast inside a call that can't be instantiated - can cast to metaclass (bug) can cast to metaclass (bug) - disallows casting pointer to fun disallows casting pointer to fun - casts to generic virtual type casts to generic virtual type - errors if casting nil to Object inside typeof (#2403) errors if casting nil to Object inside typeof (#2403) - casts to base class making it virtual (1) casts to base class making it virtual (1) - disallows casting to Object (#815) disallows casting to Object (#815) - casts to same type is ok casts to same type is ok - casts uninstantiated generic class to itself (#10882) casts uninstantiated generic class to itself (#10882) - can cast from Void* to virtual type (#3014) can cast from Void* to virtual type (#3014) - casts to bigger union casts to bigger union - casts to target type even if can't infer casted value type (obsolete) casts to target type even if can't infer casted value type (obsolete) - disallows casting fun to pointer disallows casting fun to pointer - casts to base class making it virtual (2) casts to base class making it virtual (2) + normalizes 1 to n with [] normalizes 1 to n with [] + normalizes m to n, with splat on left-hand side, splat is empty normalizes m to n, with splat on left-hand side, splat is empty + without strict_multi_assign + normalizes 1 to n normalizes 1 to n + normalizes 1 to n with [] normalizes 1 to n with [] + normalizes 1 to n with call normalizes 1 to n with call +Semantic: return + can use non-type free var in return type (2) (#6543) can use non-type free var in return type (2) (#6543) + can use free var in return type (#2492) can use free var in return type (#2492) + can use non-type free var in return type (#6543) can use non-type free var in return type (#6543) + forms a tuple from multiple return values forms a tuple from multiple return values + doesn't confuse return type from base class doesn't confuse return type from base class + infers return type infers return type + infers return type with many returns (2) infers return type with many returns (2) + allows returning NoReturn instead of the wanted type allows returning NoReturn instead of the wanted type + errors if non-type free var cannot be inferred errors if non-type free var cannot be inferred + flattens splats inside multiple return values flattens splats inside multiple return values + errors on return in top level errors on return in top level + can use type var as return type (#1226) can use type var as return type (#1226) + types bug (#1823) types bug (#1823) + infers return type with many returns (1) infers return type with many returns (1) + can use type var as return type with an included generic module can use type var as return type with an included generic module + types return if true types return if true + can use type var as return type with an inherited generic class can use type var as return type with an inherited generic class + allows nilable return type to match subclasses (#1735) allows nilable return type to match subclasses (#1735) +Code gen: not + codegens not false codegens not false + codegens not number codegens not number + codegens not pointer (true) codegens not pointer (true) + codegens not with inlinable value (#6451) codegens not with inlinable value (#6451) + doesn't crash doesn't crash + codegens not true codegens not true + codegens not pointer (false) codegens not pointer (false) + codegens not nil codegens not nil + codegens not nilable type (true) codegens not nilable type (true) + codegens not nilable type (false) codegens not nilable type (false) +Crystal::Doc::ProjectInfo + #fill_with_defaults + empty folder empty folder + no shard.yml, but git tagged version no shard.yml, but git tagged version + with shard.yml + git but no commit git but no commit + git missing git missing + git non-tagged commit dirty git non-tagged commit dirty + git tagged version git tagged version + git with remote git with remote + not in a git folder not in a git folder + git untracked file doesn't prevent detection git untracked file doesn't prevent detection + git non-tagged commit git non-tagged commit + git tagged version dirty git tagged version dirty + .git_remote + no git workdir no git workdir + no origin remote no origin remote + simple origin simple origin + no remote no remote + origin plus other origin plus other + .find_source_url_pattern .find_source_url_pattern + .read_shard_properties + only name only name + ignores comments ignores comments + strip whitespace strip whitespace + empty properties empty properties + no shard.yml no shard.yml + name and version name and version + strip quotes strip quotes + without name and version properties without name and version properties + duplicate properties uses first one duplicate properties uses first one + indented properties indented properties + #source_url + fails if refname is missing fails if refname is missing + fails if pattern is missing fails if pattern is missing + builds url builds url + fails if pattern is missing fails if pattern is missing + returns nil for empty pattern returns nil for empty pattern + builds url builds url + .find_git_version .find_git_version +Semantic: struct + can't reopen as module can't reopen as module + allows struct to participate in virtual allows struct to participate in virtual + can cast to base abstract struct can cast to base abstract struct + can't extend struct from non-abstract struct can't extend struct from non-abstract struct + can't extend struct from class can't extend struct from class + types struct declaration types struct declaration + doesn't make virtual for Float doesn't make virtual for Float + can't extend class from struct can't extend class from struct + passes subtype check with generic module type on virtual type passes subtype check with generic module type on virtual type + doesn't make virtual for Value doesn't make virtual for Value + doesn't make virtual for Struct doesn't make virtual for Struct + doesn't make virtual for Int doesn't make virtual for Int + unifies type to virtual type unifies type to virtual type + types generic struct declaration types generic struct declaration + errors if defining finalize for struct (#3840) errors if defining finalize for struct (#3840) + can't reopen as class can't reopen as class + passes subtype check with generic module type on virtual type (2) (#10302) passes subtype check with generic module type on virtual type (2) (#10302) + can't be nilable can't be nilable + passes subtype check with generic module type on virtual type (3) passes subtype check with generic module type on virtual type (3) + doesn't error if method is not found in abstract type doesn't error if method is not found in abstract type +Code gen: next + codegens next with while inside block codegens next with while inside block + codegens next codegens next + codegens next without expressions codegens next without expressions + codegens next with break (1) codegens next with break (1) + codegens next with break (2) codegens next with break (2) + codegens next with break (3) codegens next with break (3) + codegens next conditionally codegens next conditionally + codegens next conditionally with int type (2) codegens next conditionally with int type (2) +Semantic: enum + disallows implicit conversion of int to enum disallows implicit conversion of int to enum + attaches annotation to enum method (#6690) attaches annotation to enum method (#6690) + errors if inheriting Enum (#3592) errors if inheriting Enum (#3592) + finds method in enum type finds method in enum type + doesn't error when defining a non-flags enum with None or All doesn't error when defining a non-flags enum with None or All + errors if reopen but not enum errors if reopen but not enum + gives error on enum overflow after a member with value gives error on enum overflow after a member with value + has None value when defined as @[Flags] has None value when defined as @[Flags] + disallows All value for @[Flags] enum disallows All value for @[Flags] enum + can use macro for inside enum can use macro for inside enum + gives error on signed flags enum overflow after a member with value gives error on signed flags enum overflow after a member with value + types enum value types enum value + doesn't break assigned values in enum flags when a member has value 0 (#5767) doesn't break assigned values in enum flags when a member has value 0 (#5767) + defines method on enum defines method on enum + errors if declaring type inside enum (#3127) errors if declaring type inside enum (#3127) + creates enum from value creates enum from value + allows class vars in enum allows class vars in enum + errors if enum value is too big for type (#678) errors if enum value is too big for type (#678) + finds class method in enum type finds class method in enum type + errors if invoking private enum method errors if invoking private enum method + marks as flags with base type (#2185) marks as flags with base type (#2185) + types enum types enum + doesn't overflow on flags member (#7877) doesn't overflow on flags member (#7877) + can redefine Enum.new can redefine Enum.new + errors if reopen and tries to define constant errors if reopen and tries to define constant + reopens enum without base type (2) reopens enum without base type (2) + reopens enum with same base type (2) reopens enum with same base type (2) + errors if using a name twice errors if using a name twice + doesn't overflow when going from negative to zero (#7874) doesn't overflow when going from negative to zero (#7874) + disallows redefining None to non-0 for @[Flags] enum disallows redefining None to non-0 for @[Flags] enum + errors if defining initialize in Enum (#7238) errors if defining initialize in Enum (#7238) + errors on enum without members (#3447) errors on enum without members (#3447) + errors if reopening enum with different base type (2) errors if reopening enum with different base type (2) + has All value when defined as @[Flags] has All value when defined as @[Flags] + gives error on enum overflow gives error on enum overflow + doesn't error when defining a method for an enum with flags doesn't error when defining a method for an enum with flags + errors if reopening enum with different base type (1) errors if reopening enum with different base type (1) + errors if using instance var inside enum (#991) errors if using instance var inside enum (#991) + allows redefining None to 0 for @[Flags] enum allows redefining None to 0 for @[Flags] enum + doesn't error when defining a flags enum in a lib with None or All doesn't error when defining a flags enum in a lib with None or All + reopens enum with same base type (1) reopens enum with same base type (1) + can use macro expression inside enum can use macro expression inside enum + defines class method on enum defines class method on enum + gives error on unsigned flags enum overflow after a member with value gives error on unsigned flags enum overflow after a member with value + doesn't visit enum members generated by macros twice (#10104) doesn't visit enum members generated by macros twice (#10104) + gives error on flags enum overflow gives error on flags enum overflow + errors if declaring type inside enum, nested (#3127) errors if declaring type inside enum, nested (#3127) + reopens an enum reopens an enum + reopens enum without base type (1) reopens enum without base type (1) +Crystal::Repl::Interpreter + special vars + does special var that's a reference for multidispatch does special var that's a reference for multidispatch + does special var that's a reference does special var that's a reference + does special var that's a struct does special var that's a struct + does special var that's a reference when there are optional arguments does special var that's a reference when there are optional arguments + sets special var inside call inside block (#12250) sets special var inside call inside block (#12250) + does special var that's a reference inside block does special var that's a reference inside block Semantic: while - doesn't modify var's type before while doesn't modify var's type before while - types while true as NoReturn types while true as NoReturn + doesn't fail on Expressions condition (1) doesn't fail on Expressions condition (1) uses type at end of endless while if variable is reassigned, but not before first break (2) uses type at end of endless while if variable is reassigned, but not before first break (2) - doesn't type var as nilable after break inside rescue doesn't type var as nilable after break inside rescue - types while with multiple breaks with value types while with multiple breaks with value - uses type at end of endless while if variable is reassigned, but not before first break uses type at end of endless while if variable is reassigned, but not before first break - doesn't fail on nested conditionals inside typeof condition doesn't fail on nested conditionals inside typeof condition - types endless while with break with value types endless while with break with value - types endless while with break without value types endless while with break without value - finds all while cond assign targets in expressions (5) finds all while cond assign targets in expressions (5) - types variable as nilable if raise before assign types variable as nilable if raise before assign - types while with assignment and call types while with assignment and call - types while (true) as NoReturn types while (true) as NoReturn - doesn't use type at end of endless while if variable is reassigned (3) doesn't use type at end of endless while if variable is reassigned (3) - types while ((true)) as NoReturn types while ((true)) as NoReturn - reports break cannot be used outside a while reports break cannot be used outside a while - doesn't use type at end of endless while if variable is reassigned doesn't use type at end of endless while if variable is reassigned - rebinds condition variable after while body (#6158) rebinds condition variable after while body (#6158) reports next cannot be used outside a while reports next cannot be used outside a while uses var type inside while if endless loop (2) uses var type inside while if endless loop (2) - types while with break with value types while with break with value - doesn't fail on Expressions condition (1) doesn't fail on Expressions condition (1) + finds all while cond assign targets in expressions (3) finds all while cond assign targets in expressions (3) + types variable as nilable if raise before assign types variable as nilable if raise before assign + restricts type after while (#4242) restricts type after while (#4242) + types endless while with multiple breaks with value types endless while with multiple breaks with value + types endless while with break without value types endless while with break without value types while with assignment and && types while with assignment and && - doesn't fail on Expressions condition (2) doesn't fail on Expressions condition (2) - finds all while cond assign targets in expressions (2) finds all while cond assign targets in expressions (2) - finds all while cond assign targets in expressions (#10350) finds all while cond assign targets in expressions (#10350) + doesn't fail on nested conditionals inside typeof condition doesn't fail on nested conditionals inside typeof condition + types while true as NoReturn types while true as NoReturn marks variable as nil if breaking before assigning to it in an endless loop marks variable as nil if breaking before assigning to it in an endless loop - doesn't restrict type after while if there's a break (#4242) doesn't restrict type after while if there's a break (#4242) - types while types while - types endless while with multiple breaks with value types endless while with multiple breaks with value - types while with assignment types while with assignment - marks variable as nil if breaking before assigning to it in an endless loop (2) marks variable as nil if breaking before assigning to it in an endless loop (2) - doesn't fail on new variables inside typeof condition doesn't fail on new variables inside typeof condition - finds all while cond assign targets in expressions (6) finds all while cond assign targets in expressions (6) - finds while cond assign target in Not (#10345) finds while cond assign target in Not (#10345) - types while with && (#1425) types while with && (#1425) restricts type after while with not (#4242) restricts type after while with not (#4242) - finds all while cond assign targets in expressions (3) finds all while cond assign targets in expressions (3) uses var type inside while if endless loop uses var type inside while if endless loop + types while with multiple breaks with value types while with multiple breaks with value + doesn't modify var's type before while doesn't modify var's type before while + doesn't fail on new variables inside typeof condition doesn't fail on new variables inside typeof condition + doesn't use type at end of endless while if variable is reassigned (3) doesn't use type at end of endless while if variable is reassigned (3) + rebinds condition variable after while body (#6158) rebinds condition variable after while body (#6158) + uses type at end of endless while if variable is reassigned, but not before first break uses type at end of endless while if variable is reassigned, but not before first break + finds all while cond assign targets in expressions (4) finds all while cond assign targets in expressions (4) restricts type after `while` with `not` and `and` (#4242) restricts type after `while` with `not` and `and` (#4242) - restricts type after while (#4242) restricts type after while (#4242) + types while with assignment types while with assignment + types while with && (#1425) types while with && (#1425) + types while types while types while with break without value types while with break without value + marks variable as nil if breaking before assigning to it in an endless loop (2) marks variable as nil if breaking before assigning to it in an endless loop (2) + finds while cond assign target in Not (#10345) finds while cond assign target in Not (#10345) + doesn't use type at end of endless while if variable is reassigned doesn't use type at end of endless while if variable is reassigned + types while with break with value types while with break with value + doesn't fail on Expressions condition (2) doesn't fail on Expressions condition (2) + finds all while cond assign targets in expressions (#10350) finds all while cond assign targets in expressions (#10350) + finds all while cond assign targets in expressions (5) finds all while cond assign targets in expressions (5) + types while with assignment and call types while with assignment and call doesn't use type at end of endless while if variable is reassigned (2) doesn't use type at end of endless while if variable is reassigned (2) - finds all while cond assign targets in expressions (4) finds all while cond assign targets in expressions (4) -Crystal - normalize_path - assert assert - assert assert - assert assert - assert assert -Normalize: hash literal - normalizes non-empty with of normalizes non-empty with of - normalizes empty with of normalizes empty with of - hoists complex element expressions hoists complex element expressions - hoists complex element expressions, hash-like hoists complex element expressions, hash-like - hoists complex element expressions, hash-like generic hoists complex element expressions, hash-like generic - normalizes non-empty without of normalizes non-empty without of -Semantic: class var - can access constant from generic metaclass (#3719) can access constant from generic metaclass (#3719) - infers type from number literal infers type from number literal - errors when using Class (#2605) errors when using Class (#2605) - doesn't error if accessing class variable before defined (#2941) doesn't error if accessing class variable before defined (#2941) - errors if using self as type var but there's no self errors if using self as type var but there's no self - infers in multiple assign for tuple type (1) infers in multiple assign for tuple type (1) - errors if redefining class var type in subclass errors if redefining class var type in subclass - errors when typing a class variable inside a method errors when typing a class variable inside a method - errors if class variable not nilable without initializer errors if class variable not nilable without initializer - declares class variable (2) declares class variable (2) - errors if using class variable at the top level errors if using class variable at the top level - redefines class variable type redefines class variable type - types class var as nil if assigned for the first time inside method (#2059) types class var as nil if assigned for the first time inside method (#2059) - types class var inside instance method types class var inside instance method - errors if redefining class var type in included module errors if redefining class var type in included module - declares class var in generic module declares class var in generic module - doesn't error on recursive dependency if var is nilable (#2943) doesn't error on recursive dependency if var is nilable (#2943) - declares class variable declares class variable - can assign to class variable if this type can be up-casted to ancestors class variable type (#4869) can assign to class variable if this type can be up-casted to ancestors class variable type (#4869) - can find class var through included module can find class var through included module - declares class var in generic class declares class var in generic class - can find class var in subclass can find class var in subclass - allows self.class as type var in class body (#537) allows self.class as type var in class body (#537) - declares uninitialized (#2935) declares uninitialized (#2935) - types class var inside proc literal inside class types class var inside proc literal inside class - errors if using local variable in initializer errors if using local variable in initializer - infers type from T.new infers type from T.new - errors on undefined constant (2) errors on undefined constant (2) - types class var types class var - types class var as nil if not assigned at the top level types class var as nil if not assigned at the top level - allows class var in primitive types (#612) allows class var in primitive types (#612) - types as nilable if doesn't have initializer types as nilable if doesn't have initializer - errors if redefining class var type in subclass, with guess errors if redefining class var type in subclass, with guess - errors on undefined constant (1) errors on undefined constant (1) - says undefined class variable says undefined class variable - gives correct error when trying to use Int as a class variable type gives correct error when trying to use Int as a class variable type -Semantic: yield with scope - yields virtual type (#2171) (2) yields virtual type (#2171) (2) - uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method - doesn't explode if specifying &block but never using it (#181) doesn't explode if specifying &block but never using it (#181) - generate right code when yielding struct as scope generate right code when yielding struct as scope - uses method of with object uses method of with object - yields with dispatch (#2171) (1) yields with dispatch (#2171) (1) - uses instance variable of enclosing scope uses instance variable of enclosing scope - it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method - it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope - uses method of enclosing scope uses method of enclosing scope - uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method -Code gen: closure - codegens closure with instance var codegens closure with instance var - allows mixing yield and block.call allows mixing yield and block.call - codegens simple closure in function codegens simple closure in function - codegens closured nested in block codegens closured nested in block - codegens nested closure with nested closured variable codegens nested closure with nested closured variable - unifies types of closured var unifies types of closured var - allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal - allows passing an external function along allows passing an external function along - codegens closure with self and arguments codegens closure with self and arguments - codegens closured self in block (#3388) codegens closured self in block (#3388) - codegens super nested closure with nested closured variable codegens super nested closure with nested closured variable - transforms block to proc literal transforms block to proc literal - codegens simple closure in block codegens simple closure in block - doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) - codegens proc literal with struct codegens proc literal with struct - codegens closure with self and var codegens closure with self and var - codegens nested closure that mentions var in both contexts codegens nested closure that mentions var in both contexts - doesn't incorrectly consider local as closured (#4948) doesn't incorrectly consider local as closured (#4948) - codegens closure with implicit self and var codegens closure with implicit self and var - codegens closure with block codegens closure with block - ensures it can raise from the closure check ensures it can raise from the closure check - codegens nested closure with block (1) codegens nested closure with block (1) - doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method - codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars - codegens closured nested in block with a call with a closure with same names codegens closured nested in block with a call with a closure with same names - doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self - codegens closure with struct codegens closure with struct - codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars - codegens nested closure with block (2) codegens nested closure with block (2) - codegens closure with instance var and var codegens closure with instance var and var - codegens super nested closure codegens super nested closure - transforms block to proc literal with free var transforms block to proc literal with free var - allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize - allows passing proc literal to def that captures block with & allows passing proc literal to def that captures block with & - codegens closure with nested context without new closured vars but with block arg codegens closure with nested context without new closured vars but with block arg - codegens closure inside initialize inside block with self codegens closure inside initialize inside block with self - codegens closure with block that declares same var codegens closure with block that declares same var - codegens simple closure at global scope codegens simple closure at global scope - closures struct self closures struct self - codegens closure with def that has an if codegens closure with def that has an if - codegens simple closure in function with argument codegens simple closure in function with argument - allows passing an external function along (2) allows passing an external function along (2) - codegens nested closure codegens nested closure - codegens closure with instance var and block codegens closure with instance var and block - codegen closure in instance method without self closured codegen closure in instance method without self closured - codegens multiple nested blocks codegens multiple nested blocks - captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) + finds all while cond assign targets in expressions (6) finds all while cond assign targets in expressions (6) + types while (true) as NoReturn types while (true) as NoReturn + doesn't restrict type after while if there's a break (#4242) doesn't restrict type after while if there's a break (#4242) + types while ((true)) as NoReturn types while ((true)) as NoReturn + reports break cannot be used outside a while reports break cannot be used outside a while + finds all while cond assign targets in expressions (2) finds all while cond assign targets in expressions (2) + types endless while with break with value types endless while with break with value + doesn't type var as nilable after break inside rescue doesn't type var as nilable after break inside rescue +Lexer macro + lexes macro with if after assign lexes macro with if after assign + lexes macro with nested fun lexes macro with nested fun + lexes macro with nested lib lexes macro with nested lib + lexes with unless inside escaped macro (#5664) lexes with unless inside escaped macro (#5664) + lexes macro with nested union lexes macro with nested union + lexes macro with comments lexes macro with comments + lexes macro with expression lexes macro with expression + lexes macro with nested macro lexes macro with nested macro + doesn't lex macro var if escaped doesn't lex macro var if escaped + lexes with for inside escaped macro (#1029) lexes with for inside escaped macro (#1029) + lexes macro without nested if lexes macro without nested if + lexes macro with nested case lexes macro with nested case + lexes macro with nested while lexes macro with nested while + lexes macro with nested abstract def lexes macro with nested abstract def + lexes macro with embedded char and sharp lexes macro with embedded char and sharp + lexes macro with nested embedded string with %( lexes macro with nested embedded string with %( + lexes macro with nested struct lexes macro with nested struct + lexes macro with if as suffix lexes macro with if as suffix + lexes escaped quote inside string (#895) lexes escaped quote inside string (#895) + lexes macro with nested until lexes macro with nested until + lexes macro with if as suffix after return lexes macro with if as suffix after return + lexes with if/end inside escaped macro (#1029) lexes with if/end inside escaped macro (#1029) + keeps correct line number after lexes the part of keyword and newline (#4656) keeps correct line number after lexes the part of keyword and newline (#4656) + lexes macro with embedded string with %< ignores begin lexes macro with embedded string with %< ignores begin + lexes macro with embedded string and backslash lexes macro with embedded string and backslash + lexes macro with slash not followed by curly lexes macro with slash not followed by curly + lexes macro with nested class lexes macro with nested class + lexes macro with nested begin lexes macro with nested begin + lexes macro with embedded string with %( ignores begin lexes macro with embedded string with %( ignores begin + lexes macro with nested abstract class lexes macro with nested abstract class + lexes macro with nested if lexes macro with nested if + lexes macro with control lexes macro with control + lexes macro with nested unless lexes macro with nested unless + lexes macro with embedded string with %( lexes macro with embedded string with %( + lexes macro var lexes macro var + lexes macro with embedded string lexes macro with embedded string + lexes macro with nested select lexes macro with nested select + lexes macro with nested annotation lexes macro with nested annotation + lexes macro with nested def lexes macro with nested def + reaches end reaches end + lexes macro with semicolon before end lexes macro with semicolon before end + lexes macro with nested do lexes macro with nested do + lexes macro with nested enum lexes macro with nested enum + keeps correct column and line numbers keeps correct column and line numbers + lexes macro with embedded string with %< lexes macro with embedded string with %< + lexes macro with embedded string with %[ lexes macro with embedded string with %[ + lexes macro with embedded string and expression lexes macro with embedded string and expression + lexes macro with string interpolation and double curly brace lexes macro with string interpolation and double curly brace + lexes bug #654 lexes bug #654 + lexes begin end lexes begin end + lexes macro with comments and expressions lexes macro with comments and expressions + lexes macro with curly escape lexes macro with curly escape + lexes macro with nested module lexes macro with nested module + lexes macro with nested abstract struct lexes macro with nested abstract struct + lexes macro with curly escape in comment lexes macro with curly escape in comment + lexes simple macro lexes simple macro + lexes macro with embedded string with %[ ignores begin lexes macro with embedded string with %[ ignores begin + skips whitespace skips whitespace +Normalize: regex literal + StringInterpolation + simple simple + options + empty empty + x x + im im + imx imx + i i + StringLiteral + simple simple + expands to const expands to const +Semantic: alias + allows using generic type of recursive alias as restriction (#488) allows using generic type of recursive alias as restriction (#488) + doesn't crash by infinite recursion against type alias and generics (#5329) doesn't crash by infinite recursion against type alias and generics (#5329) + errors if declares alias inside if errors if declares alias inside if + reopens struct through alias within itself reopens struct through alias within itself + works with alias type as restriction works with alias type as restriction + errors if defining infinite recursive alias errors if defining infinite recursive alias + allows using alias type as generic type allows using alias type as generic type + uses constant in alias (#3259) uses constant in alias (#3259) + can pass recursive alias to proc can pass recursive alias to proc + allows recursive array with alias allows recursive array with alias + looks up alias for macro resolution (#3548) looks up alias for macro resolution (#3548) + reopens module through alias reopens module through alias + allows defining recursive aliases allows defining recursive aliases + resolves type through alias (#563) resolves type through alias (#563) + can use .class in alias (#2835) can use .class in alias (#2835) + inherits class through alias inherits class through alias + includes module through alias includes module through alias + reopens struct through alias reopens struct through alias + errors if trying to resolve type of recursive alias errors if trying to resolve type of recursive alias + doesn't find type parameter in alias (#3502) doesn't find type parameter in alias (#3502) + allows defining recursive fun aliases allows defining recursive fun aliases + uses constant in alias with math (#3259) uses constant in alias with math (#3259) + errors if trying to use typeof in alias errors if trying to use typeof in alias + finds type through alias (#4645) finds type through alias (#4645) + reopens class through alias reopens class through alias + reopens module through alias within itself reopens module through alias within itself + overloads union type through alias overloads union type through alias + errors if alias is already defined as another type errors if alias is already defined as another type + inherits struct through alias inherits struct through alias + resolves alias type resolves alias type + declares alias inside type declares alias inside type + reopens class through alias within itself reopens class through alias within itself + errors if alias already defined errors if alias already defined + errors if defining infinite recursive alias in union errors if defining infinite recursive alias in union +Crystal::Doc::Type + #instance_methods + sorts operators first sorts operators first + finds construct when searching class method (#8095) finds construct when searching class method (#8095) + #class_methods + sorts operators first sorts operators first + doesn't show types for alias type doesn't show types for alias type + ASTNode has no superclass ASTNode has no superclass + #macros + sorts operators first sorts operators first + #node_to_html + shows tuples shows tuples + shows generic path with unnecessary colons shows generic path with unnecessary colons + shows named tuples shows named tuples + shows generic path with necessary colons shows generic path with necessary colons + shows relative generic shows relative generic + shows relative path shows relative path + ASTNode has no ancestors ASTNode has no ancestors +Semantic: not + filters types inside if filters types inside if + types not types not + filters types with !is_a? filters types with !is_a? + filters types inside if/else filters types inside if/else + doesn't restrict and in while (#4243) doesn't restrict and in while (#4243) + doesn't restrict and doesn't restrict and + types not as NoReturn if exp is NoReturn types not as NoReturn if exp is NoReturn +Normalize: string interpolation + replaces string constant replaces string constant + normalizes string interpolation with multiple lines normalizes string interpolation with multiple lines + normalizes heredoc normalizes heredoc + replaces through multiple levels replaces through multiple levels + replaces string constant that results from macro expansion replaces string constant that results from macro expansion + normalizes string interpolation normalizes string interpolation +Code gen: lib + doesn't crash when casting -1 to UInt32 (#3594) doesn't crash when casting -1 to UInt32 (#3594) + uses static array in lib extern (#5688) uses static array in lib extern (#5688) + allows passing type to LibC if it has a converter with to_unsafe allows passing type to LibC if it has a converter with to_unsafe + get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) + can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return + get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) + allows invoking out with underscore allows invoking out with underscore + doesn't crash with nil and varargs (#4414) doesn't crash with nil and varargs (#4414) + allows setting/getting external variable as function pointer allows setting/getting external variable as function pointer + refers to lib type (#960) refers to lib type (#960) + can use enum as fun argument can use enum as fun argument + can use enum as fun return can use enum as fun return + passes nil to varargs (#1570) passes nil to varargs (#1570) + allows passing type to LibC if it has a converter with to_unsafe (bug) allows passing type to LibC if it has a converter with to_unsafe (bug) + codegens lib var set and get codegens lib var set and get + casts C fun to Crystal proc when accessing instance var (#2515) casts C fun to Crystal proc when accessing instance var (#2515) + passes int as another float type in literal passes int as another float type in literal + call to void function call to void function +Crystal::Codegen::Target + parses incomplete triples parses incomplete triples + parses freebsd version parses freebsd version + normalizes triples normalizes triples +Code gen: case + does case when with metaclass does case when with metaclass + codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions + codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition + codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns + codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else + codegens case when constant bug (#1028) codegens case when constant bug (#1028) + codegens case with class codegens case with class + codegens value-less case codegens value-less case + codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else + codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call +Semantic: primitives + types a bool types a bool + Reference.pre_initialize + errors on uninstantiated generic type errors on uninstantiated generic type + types with virtual reference type types with virtual reference type + types with reference type types with reference type + errors on abstract type errors on abstract type + extends from Number and doesn't find + method extends from Number and doesn't find + method + types a symbol types a symbol + types a string types a string + errors if @[Primitive] has no args errors if @[Primitive] has no args + types an int32 types an int32 + types a char types a char + types a int128 types a int128 + can invoke binary on primitive typedef (2) (#614) can invoke binary on primitive typedef (2) (#614) + extends from Number and doesn't find >= method extends from Number and doesn't find >= method + Slice.literal + with element type + types primitive int literal types primitive int literal + types empty literal types empty literal + errors if element type is not primitive int or float errors if element type is not primitive int or float + errors if element is not number literal errors if element is not number literal + errors if element is out of range errors if element is out of range + types primitive float literal types primitive float literal + types @[Primitive] method types @[Primitive] method + extends from Number and doesn't find to_i method extends from Number and doesn't find to_i method + types va_arg primitive types va_arg primitive + errors if using instance variable inside primitive type errors if using instance variable inside primitive type + types nop types nop + types a float64 types a float64 + types nil types nil + errors when comparing void (#225) errors when comparing void (#225) + types a float32 types a float32 + types a uint128 types a uint128 + types 1 + 2 types 1 + 2 + can invoke binary on primitive typedef (#614) can invoke binary on primitive typedef (#614) + errors if @[Primitive] has non-symbol arg errors if @[Primitive] has non-symbol arg + allows @[Primitive] on method that has body allows @[Primitive] on method that has body + looks up return type in correct scope (#13652) looks up return type in correct scope (#13652) + correctly types first hash from type vars (bug) correctly types first hash from type vars (bug) + can invoke cast on primitive typedef (#614) can invoke cast on primitive typedef (#614) + types pointer of int types pointer of int + types char ord types char ord + types an expression types an expression + types a int64 types a int64 + computes correct hash value type if it's a function literal (#320) computes correct hash value type if it's a function literal (#320) +Semantic: offsetof + errors on typeof inside offsetof expression errors on typeof inside offsetof expression + errors on offsetof element of uninstantiated generic type errors on offsetof element of uninstantiated generic type + types offsetof types offsetof + gives error if using offsetof on Tuples with indexes greater than tuple size gives error if using offsetof on Tuples with indexes greater than tuple size + gives error if using offsetof on something that can't have instance variables gives error if using offsetof on something that can't have instance variables + gives error if using offsetof on Tuples with instance variables gives error if using offsetof on Tuples with instance variables + gives error if using offsetof on non-Tuples with an index gives error if using offsetof on non-Tuples with an index + can be used with generic types can be used with generic types + gives error if using offsetof on Tuples with negative indexes gives error if using offsetof on Tuples with negative indexes + can be used with classes can be used with classes + gives error if using offsetof on something that's neither a class, a struct nor a Tuple gives error if using offsetof on something that's neither a class, a struct nor a Tuple + errors on undefined instance variable errors on undefined instance variable +Crystal::TextHierarchyPrinter + shows correct total size of generic class if known shows correct total size of generic class if known + shows correct size for Proc inside extern struct shows correct size for Proc inside extern struct + shows correct size for Bool member shows correct size for Bool member + works works + shows correct size for members with bound types shows correct size for members with bound types +Code gen: void + codegens unreachable code codegens unreachable code + codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable codegens void assignment in case with local variable + codegens void assignment codegens void assignment + codegens no return assignment codegens no return assignment + allows passing void as argument to method allows passing void as argument to method + codegens void assignment in case codegens void assignment in case codegens void assignment in case codegens void assignment in case codegens void assignment in case codegens void assignment in case codegens void assignment in case codegens void assignment in case codegens void assignment in case codegens void assignment in case + returns void from nil functions, doesn't crash when passing value returns void from nil functions, doesn't crash when passing value +Codegen: const + codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const codegens variable assignment in const + initializes simple const initializes simple const + runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) runs const side effects (#8862) + declare constants in right order declare constants in right order declare constants in right order declare constants in right order declare constants in right order declare constants in right order declare constants in right order declare constants in right order declare constants in right order declare constants in right order + support nested constant support nested constant + supports storing function returning nil supports storing function returning nil + allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) allows implicit self in constant, called from another class (bug) + support constant inside a def support constant inside a def + uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module uses const before declaring it in another module + gets pointerof constant gets pointerof constant gets pointerof constant gets pointerof constant gets pointerof constant gets pointerof constant gets pointerof constant gets pointerof constant gets pointerof constant gets pointerof constant + works with variable declared inside if works with variable declared inside if works with variable declared inside if works with variable declared inside if works with variable declared inside if works with variable declared inside if works with variable declared inside if works with variable declared inside if works with variable declared inside if works with variable declared inside if + codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name codegens two consts with same variable name + supports closured vars inside initializers (#10474) supports closured vars inside initializers (#10474) + uses correct types lookup uses correct types lookup uses correct types lookup uses correct types lookup uses correct types lookup uses correct types lookup uses correct types lookup uses correct types lookup uses correct types lookup uses correct types lookup + allows constants with same name allows constants with same name + initializes ARGC_UNSAFE initializes ARGC_UNSAFE + inlines const with math inlines const with math + uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) uses const before declaring it (hoisting) + finds global constant finds global constant + codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct codegens constant that refers to another constant that is a struct + define a constant define a constant + inlines bool const inlines bool const + finds nearest constant first finds nearest constant first + synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants synchronizes initialization of constants + doesn't crash if constant is used, but class is never instantiated (#1106) doesn't crash if constant is used, but class is never instantiated (#1106) + inlines simple const inlines simple const + constants with expression constants with expression + gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant gets pointerof complex constant + define a constant in lib define a constant in lib + codegens constant that is declared later because of virtual dispatch codegens constant that is declared later because of virtual dispatch + initializes simple const via another const initializes simple const via another const + declaring var declaring var declaring var declaring var declaring var declaring var declaring var declaring var declaring var declaring var + inlines enum value inlines enum value + invokes block in const invokes block in const invokes block in const invokes block in const invokes block in const invokes block in const invokes block in const invokes block in const invokes block in const invokes block in const + gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class gets pointerof constant inside class + inlines char const inlines char const + initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception initialize const that might raise an exception + inlines const referencing another const inlines const referencing another const +Code gen: offsetof + returns offset of `StaticArray#@buffer` returns offset of `StaticArray#@buffer` + returns offset allowing manual access of tuple items returns offset allowing manual access of tuple items + returns offset allowing manual access of first class field returns offset allowing manual access of first class field + returns offset allowing manual access of class field that isn't first returns offset allowing manual access of class field that isn't first + returns offset allowing manual access of first struct field returns offset allowing manual access of first struct field + returns offset of extern union returns offset of extern union + returns offset allowing manual access of struct field that isn't first returns offset allowing manual access of struct field that isn't first +Semantic: double splat + matches double splat with regular splat matches double splat with regular splat + uses double splat restriction, matches empty uses double splat restriction, matches empty + uses restriction on double splat, doesn't match with empty named tuple (2) uses restriction on double splat, doesn't match with empty named tuple (2) + uses restriction on double splat, doesn't match with empty named tuple uses restriction on double splat, doesn't match with empty named tuple + errors if duplicate keys on call side with two double splats errors if duplicate keys on call side with two double splats + uses double splat restriction uses double splat restriction + matches double splat on method with named args matches double splat on method with named args + matches named args producing an empty double splat (#2678) matches named args producing an empty double splat (#2678) + double splats named argument into arguments (2) double splats named argument into arguments (2) + errors missing argument with double splat errors missing argument with double splat + uses double splat restriction with concrete type uses double splat restriction with concrete type + overloads based on double splat restriction overloads based on double splat restriction + errors if duplicate keys on call side with double splat and named args errors if duplicate keys on call side with double splat and named args + matches double splat on method with named args and regular args matches double splat on method with named args and regular args + uses double splat in new uses double splat in new + uses restriction on double splat, means all types must be that type uses restriction on double splat, means all types must be that type + matches double splat on method (empty) matches double splat on method (empty) + double splats named argument into arguments (1) double splats named argument into arguments (1) +Lexer string array + using < as delimiter + lexes simple string array lexes simple string array + lexes string array with new line gives correct column for next token lexes string array with new line gives correct column for next token + using | as delimiter + lexes simple string array lexes simple string array + lexes string array with new line lexes string array with new line + using [ as delimiter + lexes simple string array lexes simple string array + using { as delimiter + lexes simple string array lexes simple string array + lexes simple string array lexes simple string array Crystal::Repl::Interpreter closures - does closure inside class variable initializer does closure inside class variable initializer - closures closured block arg closures closured block arg - does closure and accesses it inside block does closure and accesses it inside block + does closure inside proc does closure inside proc + closures def arguments closures def arguments + gets ivar of self closured struct (#12341) gets ivar of self closured struct (#12341) + passes closured struct instance var as self passes closured struct instance var as self + does closure inside block does closure inside block + does closure inside proc, capture proc argument does closure inside proc, capture proc argument + does closure inside block, capture block arg does closure inside block, capture block arg + reads self closured struct (#12341) reads self closured struct (#12341) does closure with pointerof local var does closure with pointerof local var - closures self and modifies instance var closures self and modifies instance var + does nested closure inside proc does nested closure inside proc does closure inside const does closure inside const does closure inside def does closure inside def - closures block args after 8 bytes (the closure var) closures block args after 8 bytes (the closure var) - closures struct and calls method on it closures struct and calls method on it - closures self in proc literal closures self in proc literal - sets ivar of self closured struct (#12341) sets ivar of self closured struct (#12341) - does closure inside block does closure inside block - does nested closure inside captured blocks does nested closure inside captured blocks does nested closure inside methods and blocks does nested closure inside methods and blocks - closures def arguments closures def arguments + does nested closure inside captured blocks does nested closure inside captured blocks closures self in proc literal (implicit self) closures self in proc literal (implicit self) - reads self closured struct (#12341) reads self closured struct (#12341) - doesn't mix local vars with closured vars doesn't mix local vars with closured vars + does closure with two args that captures and modifies two local variables does closure with two args that captures and modifies two local variables + sets ivar of self closured struct (#12341) sets ivar of self closured struct (#12341) + closures closured block arg closures closured block arg does next inside captured block (#12226) does next inside captured block (#12226) + does closure inside class variable initializer does closure inside class variable initializer + closures block args after 8 bytes (the closure var) closures block args after 8 bytes (the closure var) does closure without args that captures and modifies two local variables does closure without args that captures and modifies two local variables - passes closured struct instance var as self passes closured struct instance var as self - does closure inside block, capture block arg does closure inside block, capture block arg + closures self and modifies instance var closures self and modifies instance var + doesn't mix local vars with closured vars doesn't mix local vars with closured vars + does closure and accesses it inside block does closure and accesses it inside block + closures struct and calls method on it closures struct and calls method on it does closure without args that captures and modifies one local variable does closure without args that captures and modifies one local variable - does closure inside proc does closure inside proc - gets ivar of self closured struct (#12341) gets ivar of self closured struct (#12341) - does closure inside proc, capture proc argument does closure inside proc, capture proc argument - does closure with two args that captures and modifies two local variables does closure with two args that captures and modifies two local variables - does nested closure inside proc does nested closure inside proc -Semantic: sizeof - types instance_alignof NoReturn (missing type) (#5717) types instance_alignof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on a module gives error if using instance_sizeof on a module - types alignof types alignof - types instance_sizeof types instance_sizeof - gives error if using instance_sizeof on something that's not a class gives error if using instance_sizeof on something that's not a class - gives error if using instance_sizeof on a generic type without type vars gives error if using instance_sizeof on a generic type without type vars - gives error if using instance_sizeof on an abstract struct with multiple subtypes (#11855) gives error if using instance_sizeof on an abstract struct with multiple subtypes (#11855) - types instance_sizeof NoReturn (missing type) (#5717) types instance_sizeof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on a union type (#8349) gives error if using instance_sizeof on a union type (#8349) - errors on sizeof uninstantiated generic type (#6415) errors on sizeof uninstantiated generic type (#6415) - gives error if using instance_sizeof on a metaclass gives error if using instance_sizeof on a metaclass - types instance_alignof types instance_alignof - gives error if using instance_sizeof on an abstract struct (#11855) gives error if using instance_sizeof on an abstract struct (#11855) - gives error if using instance_sizeof on a struct gives error if using instance_sizeof on a struct - types sizeof types sizeof - types alignof NoReturn (missing type) (#5717) types alignof NoReturn (missing type) (#5717) - types sizeof NoReturn (missing type) (#5717) types sizeof NoReturn (missing type) (#5717) -read_file - with absolute path - reads file (doesn't exist) reads file (doesn't exist) - reads file (exists) reads file (exists) - with relative path - reads file (exists) reads file (exists) - reads file (doesn't exist) reads file (doesn't exist) -Call errors - method signatures in error traces - expands positional and single splat argument, empty tuple expands positional and single splat argument, empty tuple - expands single splat argument, empty tuple expands single splat argument, empty tuple - expands positional and double splat argument, empty named tuple expands positional and double splat argument, empty named tuple - expands positional and single splat argument expands positional and single splat argument - includes positional and named argument includes positional and named argument - uses `T.method` instead of `T:module#method` uses `T.method` instead of `T:module#method` - expands double splat argument, more elements expands double splat argument, more elements - expands single splat argument expands single splat argument - expands positional and double splat argument expands positional and double splat argument - expands double splat argument expands double splat argument - includes named argument includes named argument - expands double splat argument, empty named tuple expands double splat argument, empty named tuple - expands positional and double splat argument, more elements expands positional and double splat argument, more elements - includes named arguments includes named arguments - expands single splat argument, more elements expands single splat argument, more elements - uses `T.method` instead of `T.class#method` uses `T.method` instead of `T.class#method` - expands positional and single splat argument, more elements expands positional and single splat argument, more elements - replaces free variables in named argument replaces free variables in named argument - says type mismatch for named argument says type mismatch for named argument - says wrong number of arguments even if other overloads don't match by block says wrong number of arguments even if other overloads don't match by block - says type mismatch for positional argument even if there are overloads that don't match says type mismatch for positional argument even if there are overloads that don't match - says no parameters named says no parameters named - errors on argument if more types are given than expected errors on argument if more types are given than expected - says type mismatch for symbol against enum (did you mean) says type mismatch for symbol against enum (did you mean) - errors on argument if argument matches in all overloads but with different types in other arguments errors on argument if argument matches in all overloads but with different types in other arguments - replaces generic type var in named argument replaces generic type var in named argument - says type mismatch for positional argument says type mismatch for positional argument - says argument already specified says argument already specified - says type mismatch for positional argument with two options says type mismatch for positional argument with two options - says type mismatch for positional argument with three options says type mismatch for positional argument with three options - says type mismatch for symbol against enum, named argument case says type mismatch for symbol against enum, named argument case - says wrong number of arguments (to few arguments) says wrong number of arguments (to few arguments) - says no parameter named says no parameter named - replaces free variables in positional argument replaces free variables in positional argument - says missing named argument says missing named argument - errors on argument if more types are given than expected, shows all expected types errors on argument if more types are given than expected, shows all expected types - says missing named arguments says missing named arguments - says expected to be invoked with a block says expected to be invoked with a block - replaces generic type var in positional argument replaces generic type var in positional argument - says not expected to be invoked with a block says not expected to be invoked with a block - says type mismatch for symbol against enum (list all possibilities when 10 or less) says type mismatch for symbol against enum (list all possibilities when 10 or less) + closures self in proc literal closures self in proc literal +Semantic: hooks + does included macro does included macro + errors if wrong finished params length errors if wrong finished params length + types initializer in inherited types initializer in inherited + does extended macro does extended macro + includes error message in included hook (#889) includes error message in included hook (#889) + errors if wrong included params size errors if wrong included params size + does inherited macro does inherited macro + errors if wrong inherited params size errors if wrong inherited params size + errors if wrong extended params size errors if wrong extended params size + errors if wrong extended params length errors if wrong extended params length + does added method macro does added method macro + does inherited macro for generic class does inherited macro for generic class + does not invoke 'method_added' hook recursively does not invoke 'method_added' hook recursively + does inherited macro through generic instance type (#9693) does inherited macro through generic instance type (#9693) + does included macro for generic module does included macro for generic module + types macro finished hook bug regarding initialize (#3964) types macro finished hook bug regarding initialize (#3964) +Semantic: c enum + errors if enum value is different from default (Int32) (#194) errors if enum value is different from default (Int32) (#194) + allows using an enum as a type in a struct allows using an enum as a type in a struct + types enum value with base type types enum value with base type + allows using an enum as a type in a fun allows using an enum as a type in a fun + types enum value types enum value + errors if enum base type is not an integer errors if enum base type is not an integer +Crystal::Playground::Session + assert assert +Semantic: responds_to? + restricts other types inside if else restricts other types inside if else + restricts virtual generic superclass to subtypes restricts virtual generic superclass to subtypes + restricts virtual generic module to including types (#8334) restricts virtual generic module to including types (#8334) + is bool is bool + restricts in assignment restricts in assignment + restricts type inside if scope 1 restricts type inside if scope 1 +Code gen: regex literal spec + works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) +ASTNode#to_s + does to_s of "if (1 + 2\n3)\n 4\nend" does to_s of "if (1 + 2\n3)\n 4\nend" + does to_s of "%(\"\#{foo}\")" does to_s of "%(\"\#{foo}\")" + does to_s of "macro foo(x, *y)\nend" does to_s of "macro foo(x, *y)\nend" + does to_s of "->::foo(Int32, String)" does to_s of "->::foo(Int32, String)" + does to_s of "macro foo(@[Foo] **args)\nend" does to_s of "macro foo(@[Foo] **args)\nend" + does to_s of "def foo(& : ->)\nend" does to_s of "def foo(& : ->)\nend" + does to_s of "macro foo(**args)\nend" does to_s of "macro foo(**args)\nend" + does to_s of "def foo(**args : T)\nend" does to_s of "def foo(**args : T)\nend" + does to_s of "1.&**" does to_s of "1.&**" + does to_s of "lib Foo\n union Foo\n a : Int\n b : Int32\n end\nend" does to_s of "lib Foo\n union Foo\n a : Int\n b : Int32\n end\nend" + does to_s of "..3" does to_s of "..3" + does to_s of "foo(&.==(2))" does to_s of "foo(&.==(2))" + does to_s of ":\"{\"" does to_s of ":\"{\"" + does to_s of "->(x : Int32, y : Bool) : Char do\n 'a'\nend" does to_s of "->(x : Int32, y : Bool) : Char do\n 'a'\nend" + does to_s of "foo do\n begin\n bar\n end\nend" does to_s of "foo do\n begin\n bar\n end\nend" + does to_s of "macro foo(*, __var var)\nend" does to_s of "macro foo(*, __var var)\nend" + does to_s of "1_f32" does to_s of "1_f32" + does to_s of "foo.%" does to_s of "foo.%" + does to_s of "type(Foo = Void)" does to_s of "type(Foo = Void)" + does to_s of "{(1 + 2) => (3 + 4)}" does to_s of "{(1 + 2) => (3 + 4)}" + does to_s of "macro foo\n{% verbatim do %}1{% end %}\nend" does to_s of "macro foo\n{% verbatim do %}1{% end %}\nend" + does to_s of "macro foo\n{{ @type }}\nend" does to_s of "macro foo\n{{ @type }}\nend" + does to_s of "1.//(2, &block)" does to_s of "1.//(2, &block)" + does to_s of "(~1).foo" does to_s of "(~1).foo" + does to_s of "lib LibC\n fun getch = \"get.char\"\nend" does to_s of "lib LibC\n fun getch = \"get.char\"\nend" + does to_s of "foo { |(x, y)| x }" does to_s of "foo { |(x, y)| x }" + does to_s of "def foo(& : (->))\nend" does to_s of "def foo(& : (->))\nend" + does to_s of "foo x: 1, y: 2, &.bar" does to_s of "foo x: 1, y: 2, &.bar" + does to_s of "macro foo(@[Foo] &block)\nend" does to_s of "macro foo(@[Foo] &block)\nend" + does to_s of "macro foo\n %bar = 1; end" does to_s of "macro foo\n %bar = 1; end" + does to_s of "{% if foo %}\n foo_then\n{% else %}\n foo_else\n{% end %}" does to_s of "{% if foo %}\n foo_then\n{% else %}\n foo_else\n{% end %}" + does to_s of "def foo(x, @[Foo] **args)\nend" does to_s of "def foo(x, @[Foo] **args)\nend" + does to_s of `#{::String.interpolation(x)}` does to_s of `#{::String.interpolation(x)}` + does to_s of "(1 || 1.1).as(Int32)" does to_s of "(1 || 1.1).as(Int32)" + does to_s of "/\\s/" does to_s of "/\\s/" + does to_s of "lib Foo::Bar\nend" does to_s of "lib Foo::Bar\nend" + does to_s of "def foo(x)\n yield\nend" does to_s of "def foo(x)\n yield\nend" + does to_s of "lib LibFoo\n fun foo(x : (T -> U) -> V, W) : ((T -> U) -> V)\nend" does to_s of "lib LibFoo\n fun foo(x : (T -> U) -> V, W) : ((T -> U) -> V)\nend" + does to_s of "class Foo\n private def bar\n end\nend" does to_s of "class Foo\n private def bar\n end\nend" + does to_s of "1.~(2) do\nend" does to_s of "1.~(2) do\nend" + does to_s of "asm(\"nop\" ::::)" does to_s of "asm(\"nop\" ::::)" + does to_s of "foo.nil?" does to_s of "foo.nil?" + does to_s of "if true\n (1)\n 2\nend" does to_s of "if true\n (1)\n 2\nend" + does to_s of "macro foo(&)\nend" does to_s of "macro foo(&)\nend" + does to_s of "%r()" does to_s of "%r()" + does to_s of "macro foo\n\\{%@type %}\nend" does to_s of "macro foo\n\\{%@type %}\nend" + does to_s of "foo { |i| i.bar { i } }" does to_s of "foo { |i| i.bar { i } }" + does to_s of "alias Foo::Bar = Void" does to_s of "alias Foo::Bar = Void" + does to_s of "macro foo(x, @[Foo] *y)\nend" does to_s of "macro foo(x, @[Foo] *y)\nend" + does to_s of "%r{\\/\\0}" does to_s of "%r{\\/\\0}" + does to_s of "1.+(a: 2)" does to_s of "1.+(a: 2)" + does to_s of "1 & 2 & (3 | 4)" does to_s of "1 & 2 & (3 | 4)" + does to_s of "def foo(@[Foo] x : T = 1)\nend" does to_s of "def foo(@[Foo] x : T = 1)\nend" + does to_s of "begin\n (1)\nend" does to_s of "begin\n (1)\nend" + does to_s of "def foo(@[Foo] *args)\nend" does to_s of "def foo(@[Foo] *args)\nend" + does to_s of "1.~(2)" does to_s of "1.~(2)" + does to_s of "1[&.foo]" does to_s of "1[&.foo]" + does to_s of "if true\n (1)\nend" does to_s of "if true\n (1)\nend" + does to_s of "/\\//" does to_s of "/\\//" + does to_s of "foo(1, (2 + 3), bar: (4 + 5))" does to_s of "foo(1, (2 + 3), bar: (4 + 5))" + does to_s of "\"\#{(1 + 2)}\"" does to_s of "\"\#{(1 + 2)}\"" + does to_s of "if 1\n begin\n 2\n end\nelse\n begin\n 3\n end\nend" does to_s of "if 1\n begin\n 2\n end\nelse\n begin\n 3\n end\nend" + does to_s of "@foo.bar" does to_s of "@foo.bar" + does to_s of "1.&*" does to_s of "1.&*" + does to_s of "macro foo(*, var)\nend" does to_s of "macro foo(*, var)\nend" + does to_s of "def foo(x, **args, &block : _ -> _)\nend" does to_s of "def foo(x, **args, &block : _ -> _)\nend" + does to_s of "foo &.bar(1, 2, 3)" does to_s of "foo &.bar(1, 2, 3)" + does to_s of "lib LibC\n fun getchar(Int, Float)\nend" does to_s of "lib LibC\n fun getchar(Int, Float)\nend" + does to_s of "あ.い, う.え.お = 1, 2" does to_s of "あ.い, う.え.お = 1, 2" + does to_s of "def foo(\"bar baz\" qux)\nend" does to_s of "def foo(\"bar baz\" qux)\nend" + does to_s of "def foo(**args)\nend" does to_s of "def foo(**args)\nend" + does to_s of "foo { |(x, (y, z))| x }" does to_s of "foo { |(x, (y, z))| x }" + does to_s of "1.[]=" does to_s of "1.[]=" + does to_s of "/\#{1 / 2}/" does to_s of "/\#{1 / 2}/" + does to_s of "([] of T).foo" does to_s of "([] of T).foo" + does to_s of "macro foo(x)\n yield\nend" does to_s of "macro foo(x)\n yield\nend" + does to_s of "def foo(x : Foo((T -> U)))\nend" does to_s of "def foo(x : Foo((T -> U)))\nend" + does to_s of "lib LibFoo\n fun foo(x : (T -> U) | V)\nend" does to_s of "lib LibFoo\n fun foo(x : (T -> U) | V)\nend" + does to_s of "1.+(&block)" does to_s of "1.+(&block)" + does to_s of "%r{\#{1}\\/\\0}" does to_s of "%r{\#{1}\\/\\0}" + does to_s of "[(1 + 2)] of Int32" does to_s of "[(1 + 2)] of Int32" + does to_s of "{ {foo: 2} }" does to_s of "{ {foo: 2} }" + does to_s of x = (1 +2 +) does to_s of x = (1 +2 +) + does to_s of "foo(x : (T -> U) | V)" does to_s of "foo(x : (T -> U) | V)" + does to_s of "1.+ do\nend" does to_s of "1.+ do\nend" + does to_s of "macro foo(@[Foo] x, @[Foo] *y)\nend" does to_s of "macro foo(@[Foo] x, @[Foo] *y)\nend" + does to_s of "def foo(@[Foo] x y)\nend" does to_s of "def foo(@[Foo] x y)\nend" + does to_s of "1.responds_to?(:\"&&\")" does to_s of "1.responds_to?(:\"&&\")" + does to_s of "lib Foo\n A = Pointer(Void).new(0)\n struct B\n x : Void*\n y : Int[1]\n end\n fun c(Void*) : Char[2]*\nend" does to_s of "lib Foo\n A = Pointer(Void).new(0)\n struct B\n x : Void*\n y : Int[1]\n end\n fun c(Void*) : Char[2]*\nend" + does to_s of "%x(whoami)" does to_s of "%x(whoami)" + does to_s of "1[&.foo]?" does to_s of "1[&.foo]?" + does to_s of "def foo(x, **args, &block)\nend" does to_s of "def foo(x, **args, &block)\nend" + does to_s of "(1..)" does to_s of "(1..)" + does to_s of "macro foo\n %bar = 1\nend" does to_s of "macro foo\n %bar = 1\nend" + does to_s of "macro foo(x, @[Foo] **args)\nend" does to_s of "macro foo(x, @[Foo] **args)\nend" + does to_s of "def foo(x : (T -> U) | V)\nend" does to_s of "def foo(x : (T -> U) | V)\nend" + does to_s of "macro foo\n 123\nend" does to_s of "macro foo\n 123\nend" + does to_s of "return begin\n 1\n 2\nend" does to_s of "return begin\n 1\n 2\nend" + does to_s of "asm(\"bl trap\" :::: \"unwind\")" does to_s of "asm(\"bl trap\" :::: \"unwind\")" + does to_s of "fun foo\nend" does to_s of "fun foo\nend" + does to_s of "1.//(2, a: 3)" does to_s of "1.//(2, a: 3)" + does to_s of "def foo(x y)\nend" does to_s of "def foo(x y)\nend" + does to_s of "{foo: (1 + 2)}" does to_s of "{foo: (1 + 2)}" + does to_s of "1 && (a = 2)" does to_s of "1 && (a = 2)" + does to_s of "{% verbatim do %}\n 1{{ 2 }}\n 3{{ 4 }}\n{% end %}" does to_s of "{% verbatim do %}\n 1{{ 2 }}\n 3{{ 4 }}\n{% end %}" + does to_s of "foo(a.as(Int32))" does to_s of "foo(a.as(Int32))" + does to_s of "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" does to_s of "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" + does to_s of "/a/x" does to_s of "/a/x" + does to_s of "(1 + 2)..3" does to_s of "(1 + 2)..3" + does to_s of "foo[x : (T -> U) -> V, W]" does to_s of "foo[x : (T -> U) -> V, W]" + does to_s of "a.as?(Int32)" does to_s of "a.as?(Int32)" + does to_s of "def foo(*args : _)\nend" does to_s of "def foo(*args : _)\nend" + does to_s of "foo._bar(1)" does to_s of "foo._bar(1)" + does to_s of "(1 + 2).as(Int32)" does to_s of "(1 + 2).as(Int32)" + does to_s of "/hello world/imx" does to_s of "/hello world/imx" + does to_s of "(1 + 2).as?(Int32)" does to_s of "(1 + 2).as?(Int32)" + does to_s of "def foo(x : X, y : Y) forall X, Y\nend" does to_s of "def foo(x : X, y : Y) forall X, Y\nend" + does to_s of "1.[](2) do\nend" does to_s of "1.[](2) do\nend" + does to_s of "foo &.bar" does to_s of "foo &.bar" + does to_s of "begin\n ()\nend" does to_s of "begin\n ()\nend" + does to_s of "1 <= (2 <= 3)" does to_s of "1 <= (2 <= 3)" + does to_s of "lib LibFoo\n fun foo(x : (T -> U).class)\nend" does to_s of "lib LibFoo\n fun foo(x : (T -> U).class)\nend" + does to_s of "!(1 < 2)" does to_s of "!(1 < 2)" + does to_s of "1_f64" does to_s of "1_f64" + does to_s of "def foo(x : X, @[Foo] y : Y) forall X, Y\nend" does to_s of "def foo(x : X, @[Foo] y : Y) forall X, Y\nend" + does to_s of "foo do |k, v|\n k.bar(1, 2, 3)\nend" does to_s of "foo do |k, v|\n k.bar(1, 2, 3)\nend" + does to_s of "def foo(x, **args)\nend" does to_s of "def foo(x, **args)\nend" + does to_s of "%r()imx" does to_s of "%r()imx" + does to_s of "foo()" does to_s of "foo()" + does to_s of "asm(\"nop\" :::: \"volatile\")" does to_s of "asm(\"nop\" :::: \"volatile\")" + does to_s of "\"\\e\\0\\\"\"" does to_s of "\"\\e\\0\\\"\"" + does to_s of "(a = 2) && 1" does to_s of "(a = 2) && 1" + does to_s of "/hello world/" does to_s of "/hello world/" + does to_s of "macro foo(@[Foo] id)\nend" does to_s of "macro foo(@[Foo] id)\nend" + does to_s of "{ {1, 2, 3} }" does to_s of "{ {1, 2, 3} }" + does to_s of "%r( )" does to_s of "%r( )" + does to_s of "lib LibFoo\n fun foo(x : Foo((T -> U)))\nend" does to_s of "lib LibFoo\n fun foo(x : Foo((T -> U)))\nend" + does to_s of "1e10_f64" does to_s of "1e10_f64" + does to_s of "{{ foo }}" does to_s of "{{ foo }}" + does to_s of "fun foo(a : Void, b : Void, ...) : Void\nend" does to_s of "fun foo(a : Void, b : Void, ...) : Void\nend" + does to_s of "foo(x : (T -> U) -> V, W)" does to_s of "foo(x : (T -> U) -> V, W)" + does to_s of "`\#{1}\\n\\0`" does to_s of "`\#{1}\\n\\0`" + does to_s of "-> : Int32 do\nend" does to_s of "-> : Int32 do\nend" + does to_s of "foo(3, &.*(2))" does to_s of "foo(3, &.*(2))" + does to_s of "{% if foo %}\n foo_then\n{% end %}" does to_s of "{% if foo %}\n foo_then\n{% end %}" + does to_s of "foo(x : (T -> U).class)" does to_s of "foo(x : (T -> U).class)" + does to_s of "foo : (A | B).class" does to_s of "foo : (A | B).class" + does to_s of "1 <= 2 <= 3" does to_s of "1 <= 2 <= 3" + does to_s of "(1 <= 2) <= 3" does to_s of "(1 <= 2) <= 3" + does to_s of "def foo(x, **args, &block : (_ -> _))\nend" does to_s of "def foo(x, **args, &block : (_ -> _))\nend" + does to_s of "foo[x : (T -> U) -> V, W] = 1" does to_s of "foo[x : (T -> U) -> V, W] = 1" + does to_s of "{ {1, 2, 3} => 4 }" does to_s of "{ {1, 2, 3} => 4 }" + does to_s of "def foo\n yield\nend" does to_s of "def foo\n yield\nend" + does to_s of "begin\n (1)\nrescue\nend" does to_s of "begin\n (1)\nrescue\nend" + does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" + does to_s of "({} of K => V).foo" does to_s of "({} of K => V).foo" + does to_s of "def foo(@[Foo] **args)\nend" does to_s of "def foo(@[Foo] **args)\nend" + does to_s of "class Foo\n # doc\n def foo\n end\nend" does to_s of "class Foo\n # doc\n def foo\n end\nend" + does to_s of "case 1; when .!; 2; when .< 0; 3; end" does to_s of "case 1; when .!; 2; when .< 0; 3; end" + does to_s of "Foo()" does to_s of "Foo()" + does to_s of "return true ? 1 : 2" does to_s of "return true ? 1 : 2" + does to_s of "lib Foo\n struct Foo\n a : Void\n b : Void\n end\nend" does to_s of "lib Foo\n struct Foo\n a : Void\n b : Void\n end\nend" + does to_s of "macro foo\n{% @type %}\nend" does to_s of "macro foo\n{% @type %}\nend" + does to_s of "begin\n (1)\n 2\nend" does to_s of "begin\n (1)\n 2\nend" + does to_s of "def foo(x : (T -> U).class)\nend" does to_s of "def foo(x : (T -> U).class)\nend" + does to_s of "def foo(**x)\n yield\nend" does to_s of "def foo(**x)\n yield\nend" + does to_s of "lib Foo\nend" does to_s of "lib Foo\nend" + does to_s of ":foo" does to_s of ":foo" + does to_s of "{ {1 => 2} }" does to_s of "{ {1 => 2} }" + does to_s of "{% for foo in bar %}\n {{ foo }}\n{% end %}" does to_s of "{% for foo in bar %}\n {{ foo }}\n{% end %}" + does to_s of "%r(/)" does to_s of "%r(/)" + does to_s of "foo.*" does to_s of "foo.*" + does to_s of "{% for foo in bar %}\n {{ if true\n foo\n bar\nend }}\n{% end %}" does to_s of "{% for foo in bar %}\n {{ if true\n foo\n bar\nend }}\n{% end %}" + does to_s of "def foo(x : (T -> U) -> V, *args : (T -> U) -> V, y : (T -> U) -> V, **opts : (T -> U) -> V, & : (T -> U) -> V) : ((T -> U) -> V)\nend" does to_s of "def foo(x : (T -> U) -> V, *args : (T -> U) -> V, y : (T -> U) -> V, **opts : (T -> U) -> V, & : (T -> U) -> V) : ((T -> U) -> V)\nend" + does to_s of "Foo(\"bar baz\": Int32)" does to_s of "Foo(\"bar baz\": Int32)" + does to_s of "!a" does to_s of "!a" + does to_s of "1[&.foo] = 2" does to_s of "1[&.foo] = 2" + does to_s of "# doc\ndef foo\nend" does to_s of "# doc\ndef foo\nend" + does to_s of "macro foo\n\\{{ @type }}\nend" does to_s of "macro foo\n\\{{ @type }}\nend" + does to_s of "foo(\"bar baz\": 2)" does to_s of "foo(\"bar baz\": 2)" + does to_s of "macro foo(@[Foo] &)\nend" does to_s of "macro foo(@[Foo] &)\nend" + does to_s of "begin\n (@x = x).is_a?(Foo)\nend" does to_s of "begin\n (@x = x).is_a?(Foo)\nend" + does to_s of "foo._bar" does to_s of "foo._bar" + does to_s of "case 1; when .foo?; 2; end" does to_s of "case 1; when .foo?; 2; end" + does to_s of "offsetof(Foo, @bar)" does to_s of "offsetof(Foo, @bar)" + does to_s of "enum Foo\n A = 0\n B\nend" does to_s of "enum Foo\n A = 0\n B\nend" + does to_s of "yield(1)" does to_s of "yield(1)" + does to_s of "他.说(\"你好\")" does to_s of "他.说(\"你好\")" + does to_s of "macro foo(*var)\nend" does to_s of "macro foo(*var)\nend" + does to_s of "enum A : B\nend" does to_s of "enum A : B\nend" + does to_s of "1.responds_to?(:to_s)" does to_s of "1.responds_to?(:to_s)" + does to_s of "{\"foo bar\": 1}" does to_s of "{\"foo bar\": 1}" + does to_s of "macro foo(&block)\nend" does to_s of "macro foo(&block)\nend" + does to_s of "def foo(x : T = 1)\nend" does to_s of "def foo(x : T = 1)\nend" + does to_s of "macro foo\n %bar{1, x} = 1\nend" does to_s of "macro foo\n %bar{1, x} = 1\nend" + does to_s of "@[Foo(1, 2, a: 1, b: 2)]" does to_s of "@[Foo(1, 2, a: 1, b: 2)]" + does to_s of "1[2, x: 3, &.foo] = 4" does to_s of "1[2, x: 3, &.foo] = 4" + does to_s of "foo(bar)" does to_s of "foo(bar)" + does to_s of "他.说 = \"你好\"" does to_s of "他.说 = \"你好\"" + does to_s of "/\\?/" does to_s of "/\\?/" + does to_s of "asm(\"nop\" : \"a\"(1), \"b\"(2) : \"c\"(3), \"d\"(4) : \"e\", \"f\" : \"volatile\", \"alignstack\", \"intel\")" does to_s of "asm(\"nop\" : \"a\"(1), \"b\"(2) : \"c\"(3), \"d\"(4) : \"e\", \"f\" : \"volatile\", \"alignstack\", \"intel\")" + does to_s of "{(1 + 2)}" does to_s of "{(1 + 2)}" + does to_s of "`\\n\\0`" does to_s of "`\\n\\0`" + does to_s of "1.as(Int32)" does to_s of "1.as(Int32)" + does to_s of "1.0" does to_s of "1.0" + does to_s of "alias Foo = Void" does to_s of "alias Foo = Void" + does to_s of "foo : A | (B -> C)" does to_s of "foo : A | (B -> C)" + does to_s of "def foo(*args)\nend" does to_s of "def foo(*args)\nend" + does to_s of "select\nwhen foo\n select\n when bar\n 1\n else\n 2\n end\nelse\n select\n when baz\n 3\n else\n 4\n end\nend" does to_s of "select\nwhen foo\n select\n when bar\n 1\n else\n 2\n end\nelse\n select\n when baz\n 3\n else\n 4\n end\nend" + does to_s of "/ /" does to_s of "/ /" + does to_s of "1[2, x: 3, &.foo]?" does to_s of "1[2, x: 3, &.foo]?" + does to_s of "case 1\nwhen .[](2)\n 3\nwhen .[]=(4)\n 5\nend" does to_s of "case 1\nwhen .[](2)\n 3\nwhen .[]=(4)\n 5\nend" + does to_s of "foo[x, y, a: 1, b: 2] = z" does to_s of "foo[x, y, a: 1, b: 2] = z" + does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" + does to_s of "/\\(group\\)/" does to_s of "/\\(group\\)/" + does to_s of "&+1" does to_s of "&+1" + does to_s of "->::Foo::Bar.foo" does to_s of "->::Foo::Bar.foo" + does to_s of "(1 & 2) & (3 | 4)" does to_s of "(1 & 2) & (3 | 4)" + does to_s of "def foo(**options, &block)\nend" does to_s of "def foo(**options, &block)\nend" + does to_s of "\"\#{1}\\0\"" does to_s of "\"\#{1}\\0\"" + does to_s of "macro foo(x, **args)\nend" does to_s of "macro foo(x, **args)\nend" + does to_s of "def foo(@[Foo] x, @[Bar] **args, @[Baz] &block)\nend" does to_s of "def foo(@[Foo] x, @[Bar] **args, @[Baz] &block)\nend" + does to_s of "lib Foo\n FOO = 0\nend" does to_s of "lib Foo\n FOO = 0\nend" + does to_s of "begin\n (1)\n 2\nrescue\nend" does to_s of "begin\n (1)\n 2\nrescue\nend" + does to_s of "1[2, x: 3, &.foo]" does to_s of "1[2, x: 3, &.foo]" + does to_s of "foo(x : Foo((T -> U)))" does to_s of "foo(x : Foo((T -> U)))" + does to_s of "macro foo\n {% for foo in bar %}\n {{ foo }}\n {% end %}\nend" does to_s of "macro foo\n {% for foo in bar %}\n {{ foo }}\n {% end %}\nend" + does to_s of "{% foo %}" does to_s of "{% foo %}" + does to_s of "&-1" does to_s of "&-1" + does to_s of "_foo.bar" does to_s of "_foo.bar" + does to_s of "foo[x, y, a: 1, b: 2]" does to_s of "foo[x, y, a: 1, b: 2]" + does to_s of "case 1; in .foo?; 2; end" does to_s of "case 1; in .foo?; 2; end" +Semantic: super + errors on super where only target would be a top level method (#5201) errors on super where only target would be a top level method (#5201) + errors if calling super on module method and not found errors if calling super on module method and not found + types super with named arguments, def has bare splat parameter (2) (#8895) types super with named arguments, def has bare splat parameter (2) (#8895) + errors if invoking super and match isn't found in direct superclass in initialize (even though it's find in one superclass) errors if invoking super and match isn't found in direct superclass in initialize (even though it's find in one superclass) + says correct error message when no overload matches in super call (#272) says correct error message when no overload matches in super call (#272) + types super with named arguments, def has bare splat parameter (#8895) types super with named arguments, def has bare splat parameter (#8895) + doesn't error if invoking super and match isn't found in direct superclass (even though it's find in one superclass) doesn't error if invoking super and match isn't found in direct superclass (even though it's find in one superclass) + types super without arguments types super without arguments + calls super in generic module method calls super in generic module method + types super with forwarded arguments, def has bare splat parameter (#8895) types super with forwarded arguments, def has bare splat parameter (#8895) + finds super initialize if not explicitly defined in superclass, 2 (#273) finds super initialize if not explicitly defined in superclass, 2 (#273) + types super when inside fun types super when inside fun + finds super initialize if not explicitly defined in superclass, 1 (#273) finds super initialize if not explicitly defined in superclass, 1 (#273) + calls super in module method (1) (#556) calls super in module method (1) (#556) + types super with forwarded arguments, parent has parameters types super with forwarded arguments, parent has parameters + gives correct error when calling super and target is abstract method (#2675) gives correct error when calling super and target is abstract method (#2675) + errors no superclass method in top-level errors no superclass method in top-level + types super when container method is defined in parent class two levels up types super when container method is defined in parent class two levels up + calls super in module method (3) (#556) calls super in module method (3) (#556) + types super with forwarded arguments, different internal names (#8895) types super with forwarded arguments, different internal names (#8895) + types super with forwarded arguments, def has double splat parameter (#8895) types super with forwarded arguments, def has double splat parameter (#8895) + errors no superclass method errors no superclass method + invokes super inside macro (#6636) invokes super inside macro (#6636) + types super when inside fun and forwards args types super when inside fun and forwards args + calls super in module method (2) (#556) calls super in module method (2) (#556) + errors on super outside method (#4481) errors on super outside method (#4481) + errors no superclass method in top-level def errors no superclass method in top-level def + types super when container method is defined in parent class types super when container method is defined in parent class + types super without arguments and instance variable types super without arguments and instance variable +Normalize: def + expands with magic constant with named arg with yield expands with magic constant with named arg with yield + expands a def on request with default arguments that yields (2) expands a def on request with default arguments that yields (2) + expands a new def with double splat and two named args and regular args expands a new def with double splat and two named args and regular args + expands a def on request with default arguments that yields expands a def on request with default arguments that yields + expands with two named argument expands with two named argument + expands with two named argument and one not expands with two named argument and one not + expands a def with double splat and no args expands a def with double splat and no args + expands a def with double splat and two named args expands a def with double splat and two named args + expands with magic constant with named arg expands with magic constant with named arg + expands a def on request with default arguments and type restrictions (2) expands a def on request with default arguments and type restrictions (2) + expands a def on request with default arguments (external names) expands a def on request with default arguments (external names) + expands with magic constant specifying one when all are magic expands with magic constant specifying one when all are magic + expands def with reserved external name (#6559) expands def with reserved external name (#6559) + expands with named argument expands with named argument + expands with one named arg that is the only one (1) expands with one named arg that is the only one (1) + expands with splat and default argument expands with splat and default argument + expands with splat and zero expands with splat and zero + uses bare * uses bare * + expands with magic constant expands with magic constant + expands with splat with one arg before expands with splat with one arg before + expands with magic constant specifying one when not all are magic expands with magic constant specifying one when not all are magic + expands default value after splat index expands default value after splat index + expands a def with external names (1) expands a def with external names (1) + expands a def on request with default arguments that yields (external names) expands a def on request with default arguments that yields (external names) + expands with named argument and yield expands with named argument and yield + expands with more named arg which come in the correct order expands with more named arg which come in the correct order + expands a def on request with default arguments and type restrictions expands a def on request with default arguments and type restrictions + expands arg with default value after splat expands arg with default value after splat + expands with splat expands with splat + expands a def with splat and double splat expands a def with splat and double splat + expands with one named arg that is the only one (2) expands with one named arg that is the only one (2) + expands a def on request with default arguments (2) expands a def on request with default arguments (2) + expands a def with double splat and two named args and regular args expands a def with double splat and two named args and regular args + gives correct body location with + splat arg, with body splat arg, with body + block instance var arg, without body block instance var arg, without body + block instance var arg, with body block instance var arg, with body + default arg, with body default arg, with body + default arg with restriction, without body default arg with restriction, without body + default arg with restriction, with body default arg with restriction, with body + splat arg, without body splat arg, without body + default arg, without body default arg, without body + expands a def with external names (2) expands a def with external names (2) + expands a def on request with default arguments expands a def on request with default arguments +Code gen: or + codegens or with bool true and false codegens or with bool true and false + codegens or with bool union as left node 1 codegens or with bool union as left node 1 + codegens or with bool union as left node 3 codegens or with bool union as left node 3 + codegens or with nilable as left node 1 codegens or with nilable as left node 1 + codegens or with primitive type other than bool codegens or with primitive type other than bool + codegens or with non-false union as left node codegens or with non-false union as left node + codegens or with primitive type other than bool with union codegens or with primitive type other than bool with union + codegens or with nilable as left node 2 codegens or with nilable as left node 2 + codegens or with primitive type other than bool codegens or with primitive type other than bool + codegens or with bool union as left node 3 codegens or with bool union as left node 3 + codegens or with bool union as left node 1 codegens or with bool union as left node 1 + codegens or with bool false and true codegens or with bool false and true + codegens or with bool union as left node 4 codegens or with bool union as left node 4 + codegens or with bool true and true codegens or with bool true and true + codegens or with bool and int 1 codegens or with bool and int 1 + codegens or with bool union as left node 2 codegens or with bool union as left node 2 + codegens or with nil union as left node 1 codegens or with nil union as left node 1 + codegens or with bool and int 2 codegens or with bool and int 2 + codegens or with bool union as left node 2 codegens or with bool union as left node 2 + codegens or with nil union as left node 2 codegens or with nil union as left node 2 + codegens or with bool false and false codegens or with bool false and false +Crystal::FFI::CallInterface + .variadic + zero varargs zero varargs + basic basic + validates args size validates args size + .new + simple call simple call + all primitive arg types all primitive arg types + make struct make struct + array array + sum struct sum struct + with args with args +Lexer + says syntax error on "-0_u64" says syntax error on "-0_u64" + lexes ":<=" lexes ":<=" + says syntax error on "'\\1'" says syntax error on "'\\1'" + says syntax error on "0b10000000_i8" says syntax error on "0b10000000_i8" + lexes "0_f32" lexes "0_f32" + lexes '\b' lexes '\b' + says syntax error on "-0u64" says syntax error on "-0u64" + says syntax error on "'\\uD800'" says syntax error on "'\\uD800'" + lexes "0b001111111111111111111111111111111111111111111111111111111111111111" lexes "0b001111111111111111111111111111111111111111111111111111111111111111" + lexes "1_u64" lexes "1_u64" + lexes "1i64" lexes "1i64" + lexes "," lexes "," + lexes "0" lexes "0" + lexes "1i64hello" lexes "1i64hello" + lexes "alias" lexes "alias" + lexes "*=" lexes "*=" + lexes ":%" lexes ":%" + lexes "&+@foo" lexes "&+@foo" + says syntax error on "4u33" says syntax error on "4u33" + lexes "-9223372036854775808" lexes "-9223372036854775808" + says syntax error on ":+1" says syntax error on ":+1" + lexes ":>=" lexes ":>=" + lexes "fooBar" lexes "fooBar" + says syntax error on "-2147483649_i32" says syntax error on "-2147483649_i32" + lexes "0x3fffffffffffffff" lexes "0x3fffffffffffffff" + lexes "include" lexes "include" + lexes ":+" lexes ":+" + lexes "1f64" lexes "1f64" + lexes ":>>" lexes ":>>" + lexes ">=" lexes ">=" + lexes "$1" lexes "$1" + lexes "protected" lexes "protected" + lexes "do" lexes "do" + lexes "1.0f32hello" lexes "1.0f32hello" + lexes "&-" lexes "&-" + lexes "responds_to?" lexes "responds_to?" + lexes "0x100000000" lexes "0x100000000" + says syntax error on "256_u8" says syntax error on "256_u8" + says syntax error on "18446744073709551616_i32" says syntax error on "18446744073709551616_i32" + lexes "begin?" lexes "begin?" + says syntax error on "2e+@foo" says syntax error on "2e+@foo" + lexes "$10?" lexes "$10?" + lexes "1_u32" lexes "1_u32" + lexes ":~" lexes ":~" + lexes "asm" lexes "asm" + lexes "1f32" lexes "1f32" + lexes "100_000" lexes "100_000" + lexes not instance var lexes not instance var + lexes "0b1_i64" lexes "0b1_i64" + lexes "true?" lexes "true?" + says syntax error on "'\\" says syntax error on "'\\" + lexes "1u8" lexes "1u8" + says syntax error on "0o200000_00000000_00000000_u64" says syntax error on "0o200000_00000000_00000000_u64" + says syntax error on "0b11_f32" says syntax error on "0b11_f32" + lexes "while" lexes "while" + lexes ":/" lexes ":/" + lexes "else!" lexes "else!" + lexes ":*" lexes ":*" + lexes "^=" lexes "^=" + lexes "170141183460469231731687303715884105727_i128" lexes "170141183460469231731687303715884105727_i128" + lexes "foo?" lexes "foo?" + lexes "\n" lexes "\n" + lexes comment at the end lexes comment at the end + lexes ":foo?" lexes ":foo?" + says syntax error on "-170141183460469231731687303715884105729" says syntax error on "-170141183460469231731687303715884105729" + lexes "select" lexes "select" + lexes "def?" lexes "def?" + lexes "0o17777777777" lexes "0o17777777777" + says syntax error on "-0x80000000000000000000000000000001" says syntax error on "-0x80000000000000000000000000000001" + says syntax error on "-1_u128" says syntax error on "-1_u128" + lexes symbol followed by == lexes symbol followed by == + lexes "nil!" lexes "nil!" + lexes "1.2e+23_f64" lexes "1.2e+23_f64" + lexes "1_u128" lexes "1_u128" + lexes "&&" lexes "&&" + lexes "+" lexes "+" + lexes "0x7fffffff_i32" lexes "0x7fffffff_i32" + lexes regex after \r\n lexes regex after \r\n + lexes "with_1" lexes "with_1" + lexes "case" lexes "case" + lexes "begin" lexes "begin" + lexes "class?" lexes "class?" + lexes "0xFFFF_u64" lexes "0xFFFF_u64" + lexes "0i8" lexes "0i8" + lexes "yield" lexes "yield" + says syntax error on "4i3" says syntax error on "4i3" + says syntax error on "4F32" says syntax error on "4F32" + says syntax error on "-1_u64" says syntax error on "-1_u64" + doesn't raise if slash r with slash n doesn't raise if slash r with slash n + lexes "false" lexes "false" + says syntax error on "4u12" says syntax error on "4u12" + lexes "1i128" lexes "1i128" + lexes "out" lexes "out" + lexes "super" lexes "super" + lexes "if!" lexes "if!" + lexes "1_i8" lexes "1_i8" + says syntax error on "/\\" says syntax error on "/\\" + lexes "&&=" lexes "&&=" + lexes "end" lexes "end" + says syntax error on "4u3" says syntax error on "4u3" + lexes "=>" lexes "=>" + lexes "uninitialized" lexes "uninitialized" + lexes '\n' lexes '\n' + says syntax error on "'\\uFEDZ'" says syntax error on "'\\uFEDZ'" + says syntax error on "\"\\xz\"" says syntax error on "\"\\xz\"" + lexes "0x3🔮" lexes "0x3🔮" + says syntax error on "0x10000_0000_0000_0000" says syntax error on "0x10000_0000_0000_0000" + lexes ":&**" lexes ":&**" + lexes space after keyword lexes space after keyword + lexes "1.2e+23" lexes "1.2e+23" + lexes ":|" lexes ":|" + lexes "0x8000000000000000" lexes "0x8000000000000000" + lexes symbol with quote lexes symbol with quote + lexes "+=" lexes "+=" + lexes "1.0f32" lexes "1.0f32" + lexes "return!" lexes "return!" + lexes "Foo" lexes "Foo" + lexes "return" lexes "return" + lexes "2147483648.foo" lexes "2147483648.foo" + lexes "0xabcdef" lexes "0xabcdef" + says syntax error on "-999999999999999999999999999999999999999" says syntax error on "-999999999999999999999999999999999999999" + lexes "until" lexes "until" + lexes "1_000" lexes "1_000" + says syntax error on "2e+e" says syntax error on "2e+e" + lexes "+1.0f32" lexes "+1.0f32" + lexes "-" lexes "-" + lexes ":<=>" lexes ":<=>" + lexes "ensure" lexes "ensure" + says syntax error on ".42" says syntax error on ".42" + lexes "if" lexes "if" + lexes ":[]" lexes ":[]" + says syntax error on "2e+-2" says syntax error on "2e+-2" + lexes "0xffffffffffffffff" lexes "0xffffffffffffffff" + lexes "~" lexes "~" + lexes '\0' lexes '\0' + lexes "-0" lexes "-0" + lexes "1.foo" lexes "1.foo" + lexes "0o700000000000000000000" lexes "0o700000000000000000000" + says syntax error on "18446744073709551616_u64" says syntax error on "18446744073709551616_u64" + lexes ":>" lexes ":>" + says syntax error on "4f65" says syntax error on "4f65" + lexes utf-8 multibyte char lexes utf-8 multibyte char + lexes "1u16" lexes "1u16" + lexes "-@foo" lexes "-@foo" + lexes "require" lexes "require" + lexes dot and ident lexes dot and ident + lexes "0b1000000000000000000000000000000000000000000000000000000000000000" lexes "0b1000000000000000000000000000000000000000000000000000000000000000" + lexes "0b111111111111111111111111111111111111111111111111111111111111111" lexes "0b111111111111111111111111111111111111111111111111111111111111111" + lexes "9223372036854775808" lexes "9223372036854775808" + says syntax error on "4u65" says syntax error on "4u65" + lexes "1e23f64" lexes "1e23f64" + says syntax error on "-0x80000000000000000000000000000000" says syntax error on "-0x80000000000000000000000000000000" + lexes "macro" lexes "macro" + lexes char with unicode codepoint and curly with zeros lexes char with unicode codepoint and curly with zeros + says syntax error on "4i65" says syntax error on "4i65" + lexes "1u32" lexes "1u32" + lexes ":<<" lexes ":<<" + lexes "1_i16" lexes "1_i16" + lexes "&**" lexes "&**" + lexes char with unicode codepoint and curly with six hex digits lexes char with unicode codepoint and curly with six hex digits + lexes "\8" lexes "\8" + lexes "1u128" lexes "1u128" + lexes float then zero (bug) lexes float then zero (bug) + lexes ":!=" lexes ":!=" + says syntax error on "9223372036854775808_i64" says syntax error on "9223372036854775808_i64" + lexes "-9223372036854775809_i128" lexes "-9223372036854775809_i128" + says syntax error on "0F32" says syntax error on "0F32" + lexes "class" lexes "class" + lexes "|" lexes "|" + lexes '\f' lexes '\f' + lexes heredoc start lexes heredoc start + lexes "**" lexes "**" + lexes "||" lexes "||" + lexes "$FOO" lexes "$FOO" + lexes "in" lexes "in" + lexes "170141183460469231731687303715884105728_u128" lexes "170141183460469231731687303715884105728_u128" + lexes "module" lexes "module" + lexes "." lexes "." + lexes "\110" lexes "\110" + lexes "%=" lexes "%=" + lexes "def!" lexes "def!" + lexes "-0x80000000000000000000000000000000_i128" lexes "-0x80000000000000000000000000000000_i128" + lexes "0o1000000000000000000000" lexes "0o1000000000000000000000" + lexes ":^" lexes ":^" + says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000" says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000" + lexes "elsif?" lexes "elsif?" + lexes "for" lexes "for" + invalid byte sequence invalid byte sequence + says syntax error on "01_i64" says syntax error on "01_i64" + lexes '\'' lexes '\'' + says syntax error on "2e+" says syntax error on "2e+" + lexes "1_i64" lexes "1_i64" + lexes "2e01" lexes "2e01" + lexes "elsif" lexes "elsif" + says syntax error on "\r1" says syntax error on "\r1" + says syntax error on "4f22" says syntax error on "4f22" + says syntax error on "2e8i8" says syntax error on "2e8i8" + lexes "+0.5" lexes "+0.5" + lexes utf-8 char lexes utf-8 char + lexes "340282366920938463463374607431768211455_u128" lexes "340282366920938463463374607431768211455_u128" + lexes ":かたな" lexes ":かたな" + lexes ":\"foo\"" lexes ":\"foo\"" + lexes "@[" lexes "@[" + says syntax error on "118446744073709551616_u64" says syntax error on "118446744073709551616_u64" + says syntax error on "-.42" says syntax error on "-.42" + says syntax error on "0_12" says syntax error on "0_12" + says syntax error on "0o1234567123456712345671234567u64" says syntax error on "0o1234567123456712345671234567u64" + says syntax error on "2e+f32" says syntax error on "2e+f32" + says syntax error on "-0e_12" says syntax error on "-0e_12" + lexes "-0x80000001" lexes "-0x80000001" + lexes "9223372036854775807" lexes "9223372036854775807" + lexes "14146167139683460000" lexes "14146167139683460000" + says syntax error on "'" says syntax error on "'" + lexes "1u64" lexes "1u64" + lexes "as?" lexes "as?" + lexes "verbatim" lexes "verbatim" + lexes " " lexes " " + lexes "-0x8000000000000000_i64" lexes "-0x8000000000000000_i64" + lexes "-0o123" lexes "-0o123" + lexes "0x00ffffffffffffffff" lexes "0x00ffffffffffffffff" + lexes "1e+23_f32" lexes "1e+23_f32" + lexes "[]?" lexes "[]?" + lexes "nil" lexes "nil" + lexes "type" lexes "type" + lexes "$10" lexes "$10" + lexes "0b1111111111111111111111111111111_i32" lexes "0b1111111111111111111111111111111_i32" + lexes ".." lexes ".." + lexes "ident" lexes "ident" + lexes "1i16" lexes "1i16" + lexes "0o123" lexes "0o123" + lexes "<=" lexes "<=" + lexes "1_u8" lexes "1_u8" + says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + lexes "&-=" lexes "&-=" + lexes "+@foo" lexes "+@foo" + lexes "&*=" lexes "&*=" + says syntax error on "0x1afafafafafafafafafafafu64" says syntax error on "0x1afafafafafafafafafafafu64" + says syntax error on "\"\\400\"" says syntax error on "\"\\400\"" + lexes "offsetof" lexes "offsetof" + lexes ":==" lexes ":==" + lexes "0x7fffffffffffffff" lexes "0x7fffffffffffffff" + lexes "0o37777777777" lexes "0o37777777777" + lexes "enum" lexes "enum" + lexes "$_foo" lexes "$_foo" + lexes "}" lexes "}" + lexes "{%" lexes "{%" + lexes "annotation" lexes "annotation" + lexes ":**" lexes ":**" + lexes "-0.0f32" lexes "-0.0f32" + lexes "0b1111111111111111111111111111111" lexes "0b1111111111111111111111111111111" + says syntax error on "0b_10" says syntax error on "0b_10" + lexes "1234" lexes "1234" + says syntax error on "$0?" says syntax error on "$0?" + lexes "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128" lexes "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128" + lexes "lib" lexes "lib" + says syntax error on "4f33" says syntax error on "4f33" + lexes "|" lexes "|" + says syntax error on "00" says syntax error on "00" + lexes "%" lexes "%" + says syntax error on "0o40000000000i32" says syntax error on "0o40000000000i32" + says syntax error on "\"hi\\" says syntax error on "\"hi\\" + lexes "0f32" lexes "0f32" + says syntax error on "18446744073709551616" says syntax error on "18446744073709551616" + lexes "def" lexes "def" + lexes "{" lexes "{" + lexes "+1" lexes "+1" + lexes "&" lexes "&" + lexes char with unicode codepoint lexes char with unicode codepoint + lexes "bar!" lexes "bar!" + lexes "118446744073709551616_u128" lexes "118446744073709551616_u128" + lexes "<" lexes "<" + lexes "unless" lexes "unless" + lexes "0i32" lexes "0i32" + lexes "[]=" lexes "[]=" + lexes "else?" lexes "else?" + says syntax error on "-9999999999999999999" says syntax error on "-9999999999999999999" + says syntax error on "0x10000_0000_0000_0000_u64" says syntax error on "0x10000_0000_0000_0000_u64" + lexes "!~" lexes "!~" + lexes "&-@foo" lexes "&-@foo" + lexes ":[]=" lexes ":[]=" + lexes "extend" lexes "extend" + says syntax error on "0o7777777777777777777777777777777777777777777777777" says syntax error on "0o7777777777777777777777777777777777777777777777777" + says syntax error on "118446744073709551616" says syntax error on "118446744073709551616" + lexes "&*" lexes "&*" + lexes "false?" lexes "false?" + says syntax error on "0123" says syntax error on "0123" + lexes ":foo=" lexes ":foo=" + lexes "else" lexes "else" + lexes ":!" lexes ":!" + lexes "::" lexes "::" + says syntax error on "2147483648_i32" says syntax error on "2147483648_i32" + lexes ":!~" lexes ":!~" + says syntax error on "4.0_u32" says syntax error on "4.0_u32" + lexes "//" lexes "//" + lexes "$23?" lexes "$23?" + lexes "private" lexes "private" + lexes "-2147483649" lexes "-2147483649" + lexes "true" lexes "true" + lexes "1i128hello" lexes "1i128hello" + lexes '\v' lexes '\v' + lexes symbol followed by === lexes symbol followed by === + lexes "\t" lexes "\t" + lexes '\r' lexes '\r' + lexes "0o001777777777777777777777" lexes "0o001777777777777777777777" + lexes '\\' lexes '\\' + lexes "[" lexes "[" + lexes "-1_i64" lexes "-1_i64" + lexes symbol with backslash (#2187) lexes symbol with backslash (#2187) + says syntax error on "'\\u{DFFF}'" says syntax error on "'\\u{DFFF}'" + lexes "\xFF" lexes "\xFF" + lexes "\n\n\n" lexes "\n\n\n" + lexes "1_i64" lexes "1_i64" + lexes "break!" lexes "break!" + says syntax error on "0o1000000000000000000000i64" says syntax error on "0o1000000000000000000000i64" + says syntax error on "-0o7777777777777777777777777777777777777777777777777" says syntax error on "-0o7777777777777777777777777777777777777777777777777" + lexes "<<" lexes "<<" + lexes "1" lexes "1" + says syntax error on "4294967296_u32" says syntax error on "4294967296_u32" + says syntax error on "4i33" says syntax error on "4i33" + lexes "true!" lexes "true!" + says syntax error on "\"\\x1z\"" says syntax error on "\"\\x1z\"" + lexes ":&-" lexes ":&-" + lexes "&+=" lexes "&+=" + says syntax error on "-1_u8" says syntax error on "-1_u8" + says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000u64" says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000u64" + lexes space after char lexes space after char + lexes "0🔮" lexes "0🔮" + lexes "|=" lexes "|=" + says syntax error on "-1_u32" says syntax error on "-1_u32" + lexes "do?" lexes "do?" + lexes "\x12" lexes "\x12" + says syntax error on "4i22" says syntax error on "4i22" + lexes "-0.5" lexes "-0.5" + lexes "%}" lexes "%}" + lexes "1i32" lexes "1i32" + says syntax error on "128_i8" says syntax error on "128_i8" + lexes regex after \n lexes regex after \n + lexes "$~" lexes "$~" + lexes "❨╯°□°❩╯︵┻━┻" lexes "❨╯°□°❩╯︵┻━┻" + lexes "+1.0" lexes "+1.0" + says syntax error on "4F64" says syntax error on "4F64" + lexes "as" lexes "as" + lexes "1_i128" lexes "1_i128" + says syntax error on ":\"foo" says syntax error on ":\"foo" + lexes "+0xFFFF" lexes "+0xFFFF" + lexes "!=" lexes "!=" + lexes "1_234.567_890" lexes "1_234.567_890" + lexes "<<=" lexes "<<=" + lexes "1.2e+23_f32" lexes "1.2e+23_f32" + says syntax error on "-9223372036854775809" says syntax error on "-9223372036854775809" + says syntax error on "0o1234567123456712345671234567" says syntax error on "0o1234567123456712345671234567" + says syntax error on "-11111111111111111111" says syntax error on "-11111111111111111111" + lexes "pointerof" lexes "pointerof" + lexes "0b0_1" lexes "0b0_1" + lexes "**=" lexes "**=" + lexes "next!" lexes "next!" + says syntax error on "-1_u16" says syntax error on "-1_u16" + lexes "-1234" lexes "-1234" + lexes "1.0f64" lexes "1.0f64" + lexes ">>=" lexes ">>=" + lexes "begin!" lexes "begin!" + lexes "while!" lexes "while!" + lexes '\a' lexes '\a' + lexes "0b11111111111111111111111111111111" lexes "0b11111111111111111111111111111111" + lexes "-0xFFFF" lexes "-0xFFFF" + lexes "unless!" lexes "unless!" + lexes "1i64" lexes "1i64" + lexes "!@foo" lexes "!@foo" + lexes "+0" lexes "+0" + lexes "]" lexes "]" + lexes "-0b1010" lexes "-0b1010" + lexes "0.5" lexes "0.5" + lexes "0x80000001" lexes "0x80000001" + lexes "do!" lexes "do!" + lexes "1e23" lexes "1e23" + lexes "return?" lexes "return?" + says syntax error on "0o200000_00000000_00000000" says syntax error on "0o200000_00000000_00000000" + lexes "||=" lexes "||=" + lexes "if?" lexes "if?" + lexes "$1?" lexes "$1?" + lexes comment and token lexes comment and token + lexes "elsif!" lexes "elsif!" + lexes ":foo" lexes ":foo" + lexes ":&+" lexes ":&+" + lexes "0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111" lexes "0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111" + lexes != after identifier (#4815) lexes != after identifier (#4815) + lexes "rescue" lexes "rescue" + says syntax error on "0b🔮" says syntax error on "0b🔮" + lexes "&+" lexes "&+" + lexes __FILE__ lexes __FILE__ + lexes "self" lexes "self" + lexes "break" lexes "break" + lexes "end?" lexes "end?" + says syntax error on "0x100000000i32" says syntax error on "0x100000000i32" + lexes "abstract" lexes "abstract" + says syntax error on "-99999999999999999999" says syntax error on "-99999999999999999999" + lexes "0o17777777777_i32" lexes "0o17777777777_i32" + lexes "<=>" lexes "<=>" + lexes "_" lexes "_" + lexes "===" lexes "===" + lexes "something" lexes "something" + lexes ":===" lexes ":===" + lexes ":&*" lexes ":&*" + lexes "0o177777_77777777_77777777" lexes "0o177777_77777777_77777777" + lexes "1.0" lexes "1.0" + lexes "://" lexes "://" + lexes ":" lexes ":" + lexes ":=~" lexes ":=~" + lexes char with unicode codepoint and curly lexes char with unicode codepoint and curly + lexes "next?" lexes "next?" + lexes "*" lexes "*" + says syntax error on "$01" says syntax error on "$01" + lexes "union" lexes "union" + lexes "1e-23" lexes "1e-23" + lexes "18446744073709551616_u128" lexes "18446744073709551616_u128" + lexes "while?" lexes "while?" + lexes "0xffffffff" lexes "0xffffffff" + lexes "..." lexes "..." + lexes '\t' lexes '\t' + says syntax error on "1__1" says syntax error on "1__1" + lexes "1_234.567_890_f32" lexes "1_234.567_890_f32" + lexes ":&" lexes ":&" + lexes "/=" lexes "/=" + lexes "0_i32" lexes "0_i32" + says syntax error on "10e_10" says syntax error on "10e_10" + says syntax error on "-32769_i16" says syntax error on "-32769_i16" + lexes "0x10000_0000_0000_0000_i128" lexes "0x10000_0000_0000_0000_i128" + lexes "1i8" lexes "1i8" + says syntax error on "'\\u{110000}'" says syntax error on "'\\u{110000}'" + lexes "0o40000000000" lexes "0o40000000000" + lexes "$foo" lexes "$foo" + lexes "0x1_i64" lexes "0x1_i64" + lexes "&=" lexes "&=" + says syntax error on "'\\u{}'" says syntax error on "'\\u{}'" + lexes "12341234🔮" lexes "12341234🔮" + lexes "yield!" lexes "yield!" + lexes "$foo123" lexes "$foo123" + lexes "$?" lexes "$?" + lexes ";" lexes ";" + lexes "false!" lexes "false!" + says syntax error on "-3_" says syntax error on "-3_" + lexes "/" lexes "/" + lexes "end!" lexes "end!" + lexes "1e+23" lexes "1e+23" + lexes "+0o123" lexes "+0o123" + lexes ":-" lexes ":-" + lexes "-1.0f32" lexes "-1.0f32" + doesn't raise if many slash r with slash n doesn't raise if many slash r with slash n + says syntax error on "0b1000000000000000000000000000000000000000000000000000000000000000i64" says syntax error on "0b1000000000000000000000000000000000000000000000000000000000000000i64" + lexes "10000000000000000000_u64" lexes "10000000000000000000_u64" + lexes "1hello" lexes "1hello" + says syntax error on "0xfffffffffffffffff_u64" says syntax error on "0xfffffffffffffffff_u64" + lexes "@@foo" lexes "@@foo" + lexes "-1" lexes "-1" + lexes "is_a?" lexes "is_a?" + lexes "yield?" lexes "yield?" + lexes "nil?" lexes "nil?" + says syntax error on "0xFF_i8" says syntax error on "0xFF_i8" + lexes "with" lexes "with" + lexes ")" lexes ")" + lexes "1E40" lexes "1E40" + says syntax error on "32768_i16" says syntax error on "32768_i16" + lexes "-0xFFFFFFFF" lexes "-0xFFFFFFFF" + lexes "=~" lexes "=~" + lexes "18446744073709551615" lexes "18446744073709551615" + lexes __LINE__ lexes __LINE__ + lexes ":<" lexes ":<" + lexes "when" lexes "when" + lexes "\4" lexes "\4" + lexes "0b1010" lexes "0b1010" + lexes "with_underscores" lexes "with_underscores" + says syntax error on "4i12" says syntax error on "4i12" + lexes "0e40" lexes "0e40" + lexes "of" lexes "of" + lexes "?" lexes "?" + lexes "next" lexes "next" + lexes "[]" lexes "[]" + lexes "typeof" lexes "typeof" + lexes "sizeof" lexes "sizeof" + says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000" says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000" + says syntax error on "0x1afafafafafafafafafafafi32" says syntax error on "0x1afafafafafafafafafafafi32" + lexes "!" lexes "!" + says syntax error on "-129_i8" says syntax error on "-129_i8" + lexes "" lexes "" + lexes "0xffff_ffff_ffff_ffff" lexes "0xffff_ffff_ffff_ffff" + says syntax error on "-9223372036854775809_i64" says syntax error on "-9223372036854775809_i64" + says syntax error on "/foo" says syntax error on "/foo" + lexes ":[]?" lexes ":[]?" + lexes __DIR__ lexes __DIR__ + lexes "+0b1010" lexes "+0b1010" + lexes "2147483648" lexes "2147483648" + says syntax error on "0x1afafafafafafafafafafaf" says syntax error on "0x1afafafafafafafafafafaf" + says syntax error on "'\\u{D800}'" says syntax error on "'\\u{D800}'" + lexes "@foo" lexes "@foo" + lexes '\0' lexes '\0' + lexes ">>" lexes ">>" + says syntax error on "'\\uDFFF'" says syntax error on "'\\uDFFF'" + lexes ":foo!" lexes ":foo!" + lexes "-=" lexes "-=" + lexes "1_i32" lexes "1_i32" + lexes "1.0hello" lexes "1.0hello" + says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_u64" says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_u64" + lexes "0xFFFFFFFF" lexes "0xFFFFFFFF" + lexes "fun" lexes "fun" + lexes "=" lexes "=" + lexes ">" lexes ">" + lexes "^" lexes "^" + lexes "2_e2" lexes "2_e2" + lexes "(" lexes "(" + lexes "instance_sizeof" lexes "instance_sizeof" + lexes "\10" lexes "\10" + says syntax error on "2e" says syntax error on "2e" + lexes "{{" lexes "{{" + lexes "9223372036854775808_i128" lexes "9223372036854775808_i128" + lexes "0x7fffffff" lexes "0x7fffffff" + lexes "0xFFFF" lexes "0xFFFF" + says syntax error on "2ef32" says syntax error on "2ef32" + says syntax error on "2e+_2" says syntax error on "2e+_2" + lexes "0o123_i64" lexes "0o123_i64" + lexes "-1.0" lexes "-1.0" + lexes "0o1000000000000000000000" lexes "0o1000000000000000000000" + says syntax error on "0o12345671234567_12345671234567_i8" says syntax error on "0o12345671234567_12345671234567_i8" + lexes "->" lexes "->" + lexes symbol followed by != lexes symbol followed by != + lexes "0b100000000000000000000000000000000" lexes "0b100000000000000000000000000000000" + lexes "+1_i64" lexes "+1_i64" + lexes 'a' lexes 'a' + lexes "==" lexes "==" + lexes "break?" lexes "break?" + lexes "1_u16" lexes "1_u16" + lexes "-1_i128" lexes "-1_i128" + says syntax error on "4u22" says syntax error on "4u22" + lexes "//=" lexes "//=" + says syntax error on "0o73_f64" says syntax error on "0o73_f64" + says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + says syntax error on "340282366920938463463374607431768211456" says syntax error on "340282366920938463463374607431768211456" + lexes "+1_i128" lexes "+1_i128" + lexes "+1234" lexes "+1234" + says syntax error on "0o200_i8" says syntax error on "0o200_i8" + says syntax error on "0x8000000000000000i64" says syntax error on "0x8000000000000000i64" + lexes "\1" lexes "\1" + says syntax error on "1_.1" says syntax error on "1_.1" + lexes "0o777777777777777777777" lexes "0o777777777777777777777" + says syntax error on "65536_u16" says syntax error on "65536_u16" + says syntax error on "9999999999999999999_i32" says syntax error on "9999999999999999999_i32" + lexes "struct" lexes "struct" + lexes "1.0f32" lexes "1.0f32" + says syntax error on "0b100000000000000000000000000000000i32" says syntax error on "0b100000000000000000000000000000000i32" + lexes "unless?" lexes "unless?" + lexes "class!" lexes "class!" + lexes "then" lexes "then" +Semantic: ssa + types a var inside an if without definition in else types a var inside an if without definition in else + types a var after begin ensure as having last type types a var after begin ensure as having last type + types a var that is re-assigned in a while types a var that is re-assigned in a while + types re-assign inside if (bug) types re-assign inside if (bug) + types if with return in else with assign types if with return in else with assign + types a var that is declared in a while condition with break before re-assignment types a var that is declared in a while condition with break before re-assignment + types if with restricted type in then types if with restricted type in then + types a var that is re-assigned in a while and used in condition types a var that is re-assigned in a while and used in condition + types block with break types block with break + types a var inside an if without definition in then types a var inside an if without definition in then + types a var with an if but without change types a var with an if but without change + types a var that is declared in a while with out types a var that is declared in a while with out + types a var that is re-assigned in a while in next and used in condition types a var that is re-assigned in a while in next and used in condition + types a var that is declared in a while condition types a var that is declared in a while condition + types a var inside an if without previous definition types a var inside an if without previous definition + types while with break with new var types while with break with new var + types a var inside an if without change in then types a var inside an if without change in then + types if with next in then types if with next in then + types if with return in then types if with return in then + types a var that is re-assigned in a block types a var that is re-assigned in a block + types if with break in then types if with break in then + types a var with an if with nested if types a var with an if with nested if + types while with next types while with next + types a var that is declared in a while condition with break after re-assignment types a var that is declared in a while condition with break after re-assignment + preserves type filters after block (bug) preserves type filters after block (bug) + types block with next types block with next + types while with break types while with break + types if/else with var (bug) types if/else with var (bug) + types block with break doesn't infect initial vars types block with break doesn't infect initial vars + types a var inside an if with previous definition types a var inside an if with previous definition + types if with return in then with assign types if with return in then with assign + types while with break doesn't infect initial vars types while with break doesn't infect initial vars + doesn't error if same variable is declared in multiple typeofs doesn't error if same variable is declared in multiple typeofs + types re-assign inside while (bug) types re-assign inside while (bug) + types a redefined variable types a redefined variable + types if with restricted type in else types if with restricted type in else + doesn't error if same variable is used in multiple arguments of same typeof doesn't error if same variable is used in multiple arguments of same typeof + types a var after begin ensure as having last type (2) types a var after begin ensure as having last type (2) + types if with return in else types if with return in else + types a var that is re-assigned in a while condition types a var that is re-assigned in a while condition + types a var that is declared in a while types a var that is declared in a while + types if with unreachable in then types if with unreachable in then + errors if accessing variable declared inside typeof errors if accessing variable declared inside typeof + doesn't change type to nilable inside if doesn't change type to nilable inside if + types a var inside an if without change in else types a var inside an if without change in else + types if with return in both branches types if with return in both branches +Normalize: return next break + doesn't remove after return when there's an unless doesn't remove after return when there's an unless + removes nodes after next removes nodes after next + doesn't remove nodes after if that returns in one branch doesn't remove nodes after if that returns in one branch + removes nodes after if that returns in both branches removes nodes after if that returns in both branches + removes nodes after return removes nodes after return + removes nodes after break removes nodes after break +Code gen: ssa + codegens ssa bug (2) codegens ssa bug (2) + codegens a redefined var inside method codegens a redefined var inside method + codegens declaration of var inside then when true codegens declaration of var inside then when true + codegens declaration of var inside then when false codegens declaration of var inside then when false + codegens ssa bug with if/else on var codegens ssa bug with if/else on var + codegens a redefined var codegens a redefined var + codegens a var that is re-assigned in a block (1) codegens a var that is re-assigned in a block (1) + codegens a var that is re-assigned in a block codegens a var that is re-assigned in a block + codegens ssa bug (1) codegens ssa bug (1) + codegens a var that is declared in a block (2) codegens a var that is declared in a block (2) + codegens a var that is declared in a block (1) codegens a var that is declared in a block (1) + codegens a redefined var inside method with argument codegens a redefined var inside method with argument + codegens a var that is re-assigned in a block (2) codegens a var that is re-assigned in a block (2) Crystal::Repl::Interpreter - special vars - sets special var inside call inside block (#12250) sets special var inside call inside block (#12250) - does special var that's a reference inside block does special var that's a reference inside block - does special var that's a reference when there are optional arguments does special var that's a reference when there are optional arguments - does special var that's a reference for multidispatch does special var that's a reference for multidispatch - does special var that's a struct does special var that's a struct - does special var that's a reference does special var that's a reference -Semantic: named tuples - accept named tuple in type restriction accept named tuple in type restriction - types named tuple access (2) types named tuple access (2) - merges two named tuple with same keys but different types merges two named tuple with same keys but different types - types named tuple of two elements types named tuple of two elements - types named tuple of two elements, follows names order types named tuple of two elements, follows names order - doesn't crash on named tuple type recursion (#7162) doesn't crash on named tuple type recursion (#7162) - accepts named tuple covariance in array accepts named tuple covariance in array - merges two named tuples with the same keys and types merges two named tuples with the same keys and types - matches in type restriction matches in type restriction - types named tuple of one element types named tuple of one element - types nilable named tuple access (5) types nilable named tuple access (5) - types nilable named tuple access (2) types nilable named tuple access (2) - doesn't error if NamedTuple has no args doesn't error if NamedTuple has no args - matches in type restriction, different order (1) matches in type restriction, different order (1) - can write generic type for NamedTuple can write generic type for NamedTuple - doesn't match type restriction with instance doesn't match type restriction with instance - types T as a tuple of metaclasses types T as a tuple of metaclasses - can assign to union of compatible named tuple can assign to union of compatible named tuple - types nilable named tuple access (4) types nilable named tuple access (4) - types named tuple access (4) types named tuple access (4) - doesn't crash on named tuple in not executed block (#6718) doesn't crash on named tuple in not executed block (#6718) - gives error when using positional args with NamedTuple gives error when using positional args with NamedTuple - types nilable named tuple access (6) types nilable named tuple access (6) - types named tuple access (1) types named tuple access (1) - types nilable named tuple access (1) types nilable named tuple access (1) - matches in type restriction and gets free var matches in type restriction and gets free var - gives error when using named args on a type other than NamedTuple gives error when using named args on a type other than NamedTuple - types named tuple access (3) types named tuple access (3) - gives error when indexing with an unknown name gives error when indexing with an unknown name - types nilable named tuple access (3) types nilable named tuple access (3) - doesn't unify named tuple metaclasses (#5384) doesn't unify named tuple metaclasses (#5384) - doesn't match in type restriction doesn't match in type restriction - gets type at compile time gets type at compile time - allows tuple covariance allows tuple covariance - matches in type restriction, different order (2) matches in type restriction, different order (2) -Semantic: uninitialized - declares as uninitialized and reads it declares as uninitialized and reads it - uses virtual type for uninitialized (#8216) uses virtual type for uninitialized (#8216) - disallows declaring var of type Reference disallows declaring var of type Reference - disallows declaring var of type Struct disallows declaring var of type Struct - disallows declaring var of type Object disallows declaring var of type Object - works with uninitialized NoReturn (#3314) works with uninitialized NoReturn (#3314) - has type (#3641) has type (#3641) - declares as uninitialized declares as uninitialized - errors if declaring generic type without type vars (with instance var) errors if declaring generic type without type vars (with instance var) - can use uninitialized with class type (#2940) can use uninitialized with class type (#2940) - errors if declaring variable multiple times with different types (#917) errors if declaring variable multiple times with different types (#917) - can uninitialize variable outside initialize, generic (#2828) can uninitialize variable outside initialize, generic (#2828) - disallows declaring var of type Number disallows declaring var of type Number - errors if declares var and then assigns other type errors if declares var and then assigns other type - disallows declaring var of type Int disallows declaring var of type Int - disallows declaring var of type Class disallows declaring var of type Class - declares an instance variable in initialize as uninitialized declares an instance variable in initialize as uninitialized - disallows declaring var of type Value disallows declaring var of type Value - errors if declaring generic type without type vars (with class var) errors if declaring generic type without type vars (with class var) - disallows declaring var of type Enum disallows declaring var of type Enum - can uninitialize variable outside initialize (#2828) can uninitialize variable outside initialize (#2828) - disallows declaring var of type Float disallows declaring var of type Float -Normalize: until - normalizes until normalizes until + conversion + interprets Int16::MIN#to_u64! interprets Int16::MIN#to_u64! + interprets UInt32::MAX#to_f64! interprets UInt32::MAX#to_f64! + interprets Int16::MIN#to_i32! interprets Int16::MIN#to_i32! + interprets Int32::MAX#to_i16! interprets Int32::MAX#to_i16! + interprets Float64#to_u! (positive) interprets Float64#to_u! (positive) + interprets Int8::MAX#to_u16! interprets Int8::MAX#to_u16! + interprets Int32::MAX#to_i! interprets Int32::MAX#to_i! + interprets Int8::MIN#to_u32! interprets Int8::MIN#to_u32! + interprets UInt32::MAX#to_u8! interprets UInt32::MAX#to_u8! + discards conversion discards conversion + interprets Int32::MIN#to_f32! interprets Int32::MIN#to_f32! + interprets Int16::MIN#to_u8! interprets Int16::MIN#to_u8! + interprets Int8::MAX#to_i16! interprets Int8::MAX#to_i16! + interprets Int32::MIN#to_i32! interprets Int32::MIN#to_i32! + interprets Int16::MIN#to_u! interprets Int16::MIN#to_u! + interprets Int64::MAX#to_u8! interprets Int64::MAX#to_u8! + interprets UInt16::MAX#to_f64! interprets UInt16::MAX#to_f64! + interprets Int16::MAX#to_u64! interprets Int16::MAX#to_u64! + interprets UInt64::MAX#to_f32! interprets UInt64::MAX#to_f32! + interprets Int16::MAX#to_i32! interprets Int16::MAX#to_i32! + interprets UInt8::MAX#to_i8! interprets UInt8::MAX#to_i8! + interprets Int64::MIN#to_u32! interprets Int64::MIN#to_u32! + interprets Float64#to_i64! (positive) interprets Float64#to_i64! (positive) + interprets Int8::MAX#to_u8! interprets Int8::MAX#to_u8! + interprets Int8::MIN#to_u8! interprets Int8::MIN#to_u8! + interprets UInt16::MAX#to_i32! interprets UInt16::MAX#to_i32! + interprets UInt16::MAX#to_u! interprets UInt16::MAX#to_u! + interprets Int32::MAX#to_i64! interprets Int32::MAX#to_i64! + Int32#unsafe_chr Int32#unsafe_chr + interprets Int64::MAX#to_u! interprets Int64::MAX#to_u! + interprets UInt16::MAX#to_u16! interprets UInt16::MAX#to_u16! + interprets Int16::MIN#to_i16! interprets Int16::MIN#to_i16! + interprets UInt64::MAX#to_u16! interprets UInt64::MAX#to_u16! + interprets Int64::MAX#to_i16! interprets Int64::MAX#to_i16! + interprets Float64#to_i8! (negative) interprets Float64#to_i8! (negative) + interprets Int8::MIN#to_f64! interprets Int8::MIN#to_f64! + interprets Float32#to_i16! (positive) interprets Float32#to_i16! (positive) + interprets Int8::MAX#to_i! interprets Int8::MAX#to_i! + interprets Int64::MIN#to_u8! interprets Int64::MIN#to_u8! + interprets Int16::MAX#to_i16! interprets Int16::MAX#to_i16! + interprets Float32#to_i32! (negative) interprets Float32#to_i32! (negative) + interprets Float32#to_u32! (positive) interprets Float32#to_u32! (positive) + interprets Int16::MIN#to_u32! interprets Int16::MIN#to_u32! + interprets Float32#to_i32! (positive) interprets Float32#to_i32! (positive) + interprets Float64#to_u16! (positive) interprets Float64#to_u16! (positive) + interprets Int64::MAX#to_f32! interprets Int64::MAX#to_f32! + interprets UInt16::MAX#to_u8! interprets UInt16::MAX#to_u8! + interprets Int8::MIN#to_i! interprets Int8::MIN#to_i! + interprets Int32::MAX#to_f32! interprets Int32::MAX#to_f32! + interprets UInt16::MAX#to_f32! interprets UInt16::MAX#to_f32! + interprets Int32::MAX#to_i32! interprets Int32::MAX#to_i32! + interprets UInt8::MAX#to_u! interprets UInt8::MAX#to_u! + interprets Int32::MAX#to_u16! interprets Int32::MAX#to_u16! + interprets Int32::MAX#to_u8! interprets Int32::MAX#to_u8! + interprets UInt16::MAX#to_i! interprets UInt16::MAX#to_i! + interprets Float64#to_u64! (positive) interprets Float64#to_u64! (positive) + interprets UInt64::MAX#to_i8! interprets UInt64::MAX#to_i8! + interprets Int32::MIN#to_u16! interprets Int32::MIN#to_u16! + interprets Int16::MAX#to_i! interprets Int16::MAX#to_i! + interprets Int64::MAX#to_u64! interprets Int64::MAX#to_u64! + interprets UInt8::MAX#to_f32! interprets UInt8::MAX#to_f32! + interprets Char#ord interprets Char#ord + interprets UInt32::MAX#to_i8! interprets UInt32::MAX#to_i8! + interprets Int32::MAX#to_i8! interprets Int32::MAX#to_i8! + interprets Int64::MIN#to_i32! interprets Int64::MIN#to_i32! + interprets UInt8::MAX#to_i! interprets UInt8::MAX#to_i! + interprets Float32#to_f32! (positive) interprets Float32#to_f32! (positive) + interprets Int16::MIN#to_f64! interprets Int16::MIN#to_f64! + interprets Float64#to_f64! (negative) interprets Float64#to_f64! (negative) + interprets Float64#to_i64! (negative) interprets Float64#to_i64! (negative) + interprets Int64::MIN#to_u! interprets Int64::MIN#to_u! + interprets Int64::MIN#to_u64! interprets Int64::MIN#to_u64! + interprets Float32#to_i64! (positive) interprets Float32#to_i64! (positive) + interprets Float32#to_u16! (positive) interprets Float32#to_u16! (positive) + interprets Int16::MAX#to_u8! interprets Int16::MAX#to_u8! + interprets Int8::MAX#to_i64! interprets Int8::MAX#to_i64! + interprets UInt8::MAX#to_i16! interprets UInt8::MAX#to_i16! + interprets Int64::MIN#to_f64! interprets Int64::MIN#to_f64! + interprets Int32::MIN#to_i64! interprets Int32::MIN#to_i64! + interprets UInt16::MAX#to_i16! interprets UInt16::MAX#to_i16! + interprets Int64::MIN#to_i8! interprets Int64::MIN#to_i8! + interprets Float64#to_i16! (negative) interprets Float64#to_i16! (negative) + interprets Int32::MAX#to_f64! interprets Int32::MAX#to_f64! + interprets UInt8::MAX#to_f64! interprets UInt8::MAX#to_f64! + interprets Int8::MIN#to_i32! interprets Int8::MIN#to_i32! + interprets UInt8::MAX#to_u64! interprets UInt8::MAX#to_u64! + interprets UInt16::MAX#to_u32! interprets UInt16::MAX#to_u32! + interprets Int64::MIN#to_f32! interprets Int64::MIN#to_f32! + interprets UInt32::MAX#to_i! interprets UInt32::MAX#to_i! + interprets Int64::MIN#to_u16! interprets Int64::MIN#to_u16! + interprets UInt32::MAX#to_u16! interprets UInt32::MAX#to_u16! + interprets Int32::MIN#to_u64! interprets Int32::MIN#to_u64! + interprets UInt64::MAX#to_i16! interprets UInt64::MAX#to_i16! + UInt8#unsafe_chr UInt8#unsafe_chr + interprets Int32::MAX#to_u64! interprets Int32::MAX#to_u64! + interprets Int16::MIN#to_i! interprets Int16::MIN#to_i! + interprets Int16::MIN#to_f32! interprets Int16::MIN#to_f32! + interprets Int32::MIN#to_i16! interprets Int32::MIN#to_i16! + interprets UInt8::MAX#to_i32! interprets UInt8::MAX#to_i32! + interprets UInt64::MAX#to_u! interprets UInt64::MAX#to_u! + interprets UInt8::MAX#to_u8! interprets UInt8::MAX#to_u8! + interprets Int8::MIN#to_i8! interprets Int8::MIN#to_i8! + interprets Float64#to_u8! (positive) interprets Float64#to_u8! (positive) + interprets Float32#to_i16! (negative) interprets Float32#to_i16! (negative) + interprets Float64#to_i32! (positive) interprets Float64#to_i32! (positive) + interprets Int32::MAX#to_u32! interprets Int32::MAX#to_u32! + interprets Int64::MAX#to_i64! interprets Int64::MAX#to_i64! + interprets Int64::MAX#to_i! interprets Int64::MAX#to_i! + interprets UInt32::MAX#to_u32! interprets UInt32::MAX#to_u32! + interprets Int64::MAX#to_i8! interprets Int64::MAX#to_i8! + interprets UInt32::MAX#to_i16! interprets UInt32::MAX#to_i16! + interprets UInt16::MAX#to_i8! interprets UInt16::MAX#to_i8! + interprets UInt32::MAX#to_i64! interprets UInt32::MAX#to_i64! + interprets UInt8::MAX#to_u32! interprets UInt8::MAX#to_u32! + interprets UInt8::MAX#to_i64! interprets UInt8::MAX#to_i64! + interprets Int8::MIN#to_u16! interprets Int8::MIN#to_u16! + interprets UInt32::MAX#to_u! interprets UInt32::MAX#to_u! + interprets Int8::MAX#to_u64! interprets Int8::MAX#to_u64! + interprets Int64::MIN#to_i64! interprets Int64::MIN#to_i64! + interprets Float64#to_i! (positive) interprets Float64#to_i! (positive) + interprets Int8::MAX#to_i8! interprets Int8::MAX#to_i8! + interprets Float64#to_f32! (positive) interprets Float64#to_f32! (positive) + interprets Float32#to_i8! (negative) interprets Float32#to_i8! (negative) + interprets Int64::MAX#to_u32! interprets Int64::MAX#to_u32! + interprets UInt64::MAX#to_u64! interprets UInt64::MAX#to_u64! + interprets Int8::MIN#to_u64! interprets Int8::MIN#to_u64! + interprets Float64#to_f64! (positive) interprets Float64#to_f64! (positive) + interprets Int32::MIN#to_u8! interprets Int32::MIN#to_u8! + interprets UInt64::MAX#to_u32! interprets UInt64::MAX#to_u32! + interprets Float32#to_f64! (positive) interprets Float32#to_f64! (positive) + interprets UInt64::MAX#to_u8! interprets UInt64::MAX#to_u8! + interprets Int32::MAX#to_u! interprets Int32::MAX#to_u! + interprets Float64#to_i16! (positive) interprets Float64#to_i16! (positive) + interprets Int8::MAX#to_f32! interprets Int8::MAX#to_f32! + interprets Float32#to_u64! (positive) interprets Float32#to_u64! (positive) + interprets Float32#to_i64! (negative) interprets Float32#to_i64! (negative) + interprets Int64::MIN#to_i16! interprets Int64::MIN#to_i16! + interprets Float32#to_i! (positive) interprets Float32#to_i! (positive) + interprets Int16::MAX#to_u! interprets Int16::MAX#to_u! + interprets Int8::MAX#to_u32! interprets Int8::MAX#to_u32! + interprets Int8::MAX#to_u! interprets Int8::MAX#to_u! + interprets Int64::MAX#to_f64! interprets Int64::MAX#to_f64! + interprets UInt64::MAX#to_i32! interprets UInt64::MAX#to_i32! + interprets Int8::MIN#to_i64! interprets Int8::MIN#to_i64! + interprets Float32#to_u! (positive) interprets Float32#to_u! (positive) + interprets Int16::MAX#to_f64! interprets Int16::MAX#to_f64! + interprets Int32::MIN#to_i8! interprets Int32::MIN#to_i8! + interprets Int8::MIN#to_f32! interprets Int8::MIN#to_f32! + interprets UInt32::MAX#to_i32! interprets UInt32::MAX#to_i32! + interprets Int32::MIN#to_u32! interprets Int32::MIN#to_u32! + interprets Float32#to_i! (negative) interprets Float32#to_i! (negative) + interprets Float64#to_i8! (positive) interprets Float64#to_i8! (positive) + interprets Int8::MIN#to_u! interprets Int8::MIN#to_u! + interprets UInt64::MAX#to_i! interprets UInt64::MAX#to_i! + interprets Int64::MIN#to_i! interprets Int64::MIN#to_i! + interprets Float32#to_f64! (negative) interprets Float32#to_f64! (negative) + interprets Int8::MAX#to_i32! interprets Int8::MAX#to_i32! + interprets UInt32::MAX#to_f32! interprets UInt32::MAX#to_f32! + interprets Int16::MAX#to_f32! interprets Int16::MAX#to_f32! + interprets Float32#to_i8! (positive) interprets Float32#to_i8! (positive) + interprets Int64::MAX#to_u16! interprets Int64::MAX#to_u16! + interprets Int8::MAX#to_f64! interprets Int8::MAX#to_f64! + interprets Float64#to_i! (negative) interprets Float64#to_i! (negative) + interprets Int16::MIN#to_i64! interprets Int16::MIN#to_i64! + interprets Int16::MIN#to_u16! interprets Int16::MIN#to_u16! + interprets UInt64::MAX#to_f64! interprets UInt64::MAX#to_f64! + interprets Float64#to_i32! (negative) interprets Float64#to_i32! (negative) + interprets Int16::MAX#to_u16! interprets Int16::MAX#to_u16! + interprets UInt16::MAX#to_u64! interprets UInt16::MAX#to_u64! + interprets Int32::MIN#to_i! interprets Int32::MIN#to_i! + interprets Int32::MIN#to_u! interprets Int32::MIN#to_u! + interprets Float64#to_u32! (positive) interprets Float64#to_u32! (positive) + interprets Float32#to_u8! (positive) interprets Float32#to_u8! (positive) + interprets UInt16::MAX#to_i64! interprets UInt16::MAX#to_i64! + interprets Int64::MAX#to_i32! interprets Int64::MAX#to_i32! + interprets UInt8::MAX#to_u16! interprets UInt8::MAX#to_u16! + interprets Int16::MAX#to_u32! interprets Int16::MAX#to_u32! + interprets UInt64::MAX#to_i64! interprets UInt64::MAX#to_i64! + interprets Int16::MAX#to_i8! interprets Int16::MAX#to_i8! + interprets Int16::MAX#to_i64! interprets Int16::MAX#to_i64! + interprets Float32#to_f32! (negative) interprets Float32#to_f32! (negative) + interprets Int16::MIN#to_i8! interprets Int16::MIN#to_i8! + interprets Int32::MIN#to_f64! interprets Int32::MIN#to_f64! + interprets UInt32::MAX#to_u64! interprets UInt32::MAX#to_u64! + interprets Float64#to_f32! (negative) interprets Float64#to_f32! (negative) + interprets Int8::MIN#to_i16! interprets Int8::MIN#to_i16! + discards conversion with local var discards conversion with local var + literals + interprets an Int32 interprets an Int32 + interprets a Float32 interprets a Float32 + interprets a bool (false) interprets a bool (false) + interprets a String literal interprets a String literal + interprets a char interprets a char + interprets an Int8 interprets an Int8 + interprets a bool (true) interprets a bool (true) + interprets an UInt16 interprets an UInt16 + interprets an UInt8 interprets an UInt8 + interprets an Int128 interprets an Int128 + interprets an Int64 interprets an Int64 + interprets an UInt32 interprets an UInt32 + interprets an Int16 interprets an Int16 + interprets an UInt128 interprets an UInt128 + interprets a Float64 interprets a Float64 + interprets an UInt64 interprets an UInt64 + uses a string pool uses a string pool + precomputes string literal length precomputes string literal length + interprets nil interprets nil + math + interprets Float64 - Float64 interprets Float64 - Float64 + interprets UInt64 | UInt32 interprets UInt64 | UInt32 + interprets Int32.unsafe_shl(Int32) with self interprets Int32.unsafe_shl(Int32) with self + interprets Int32 &+ Int32 interprets Int32 &+ Int32 + interprets Int32 &- Int32 interprets Int32 &- Int32 + interprets Float32 + Float64 interprets Float32 + Float64 + interprets Int32 + Float64 interprets Int32 + Float64 + interprets Float64 + Int32 interprets Float64 + Int32 + discards math discards math + interprets UInt64 * Int32 interprets UInt64 * Int32 + interprets UInt8 | Int32 interprets UInt8 | Int32 + interprets Int32 + Int32 interprets Int32 + Int32 + interprets Float64 * Float64 interprets Float64 * Float64 + interprets Int32 * Int32 interprets Int32 * Int32 + interprets UInt64 & Int32 interprets UInt64 & Int32 + interprets Float64 + Float64 interprets Float64 + Float64 + interprets UInt32 - Int32 interprets UInt32 - Int32 + interprets Int32 &* Int32 interprets Int32 &* Int32 + interprets Int64 + Int64 interprets Int64 + Int64 + interprets Int8 + Int8 interprets Int8 + Int8 + interprets Int128 + Int32 interprets Int128 + Int32 + interprets Int32 - Int32 interprets Int32 - Int32 + local variables + doesn't declare variable with no type inside method doesn't declare variable with no type inside method + interprets variable set interprets variable set + interprets variable set and get interprets variable set and get + interprets at the class level interprets at the class level + interprets local variable declaration (#12229) interprets local variable declaration (#12229) + interprets variable set and get with operations interprets variable set and get with operations + assigns to underscore assigns to underscore + doesn't discard underscore right hand side doesn't discard underscore right hand side + interprets variable set and get, second local var interprets variable set and get, second local var + doesn't declare variable with no type doesn't declare variable with no type + interprets variable set with type restriction (#13023) interprets variable set with type restriction (#13023) + interprets uninitialized interprets uninitialized + logical operations + interprets not for mixed union (true) interprets not for mixed union (true) + interprets not for nilable type (true) interprets not for nilable type (true) + discards nil not discards nil not + discards bool not discards bool not + interprets not for nil interprets not for nil + interprets not for nilable proc type (true) interprets not for nilable proc type (true) + interprets not for nilable type (false) interprets not for nilable type (false) + interprets not for module (#12918) interprets not for module (#12918) + does math convert on union does math convert on union + does math primitive on union does math primitive on union + interprets not for generic class instance type interprets not for generic class instance type + interprets not for bool false interprets not for bool false + interprets not for mixed union (nil) interprets not for mixed union (nil) + interprets not for nilable type (true) interprets not for nilable type (true) + interprets not for mixed union (other) interprets not for mixed union (other) + interprets not for generic module interprets not for generic module + interprets not for bool false interprets not for bool false + interprets not for generic module metaclass interprets not for generic module metaclass + interprets not for generic class instance metaclass interprets not for generic class instance metaclass + interprets not for nilable type (false) interprets not for nilable type (false) + interprets not for nil type interprets not for nil type + interprets not for mixed union (false) interprets not for mixed union (false) + interprets not for bool true interprets not for bool true + interprets not for nilable proc type (false) interprets not for nilable proc type (false) + comparisons + interprets Int32 == Int32 (true) interprets Int32 == Int32 (true) + interprets Int32 == Int32 (false) interprets Int32 == Int32 (false) + interprets UInt8 < Int32 (true, right is greater than zero) interprets UInt8 < Int32 (true, right is greater than zero) + interprets UInt64 != Int32 (true) interprets UInt64 != Int32 (true) + interprets Int32 != Int32 (true) interprets Int32 != Int32 (true) + discards comparison discards comparison + interprets UInt64 > UInt32 (false) interprets UInt64 > UInt32 (false) + interprets Bool != Bool (true) interprets Bool != Bool (true) + interprets UInt64 != Int32 (false) interprets UInt64 != Int32 (false) + interprets Int128 == Int128 (false) interprets Int128 == Int128 (false) + interprets Float64 < Float64 interprets Float64 < Float64 + interprets UInt8 < Int32 (false, right is less than zero) interprets UInt8 < Int32 (false, right is less than zero) + interprets Int128 == Int128 (true) interprets Int128 == Int128 (true) + interprets Char == Char (false) interprets Char == Char (false) + interprets Float32 fdiv Float64 interprets Float32 fdiv Float64 + interprets Float32 / Float32 interprets Float32 / Float32 + interprets UInt32 < Int32 (true) interprets UInt32 < Int32 (true) + interprets Float64 / Float64 interprets Float64 / Float64 + interprets Int32 != Int32 (false) interprets Int32 != Int32 (false) + interprets UInt64 < Int32 (true, right is greater than zero) interprets UInt64 < Int32 (true, right is greater than zero) + interprets UInt64 > UInt32 (true) interprets UInt64 > UInt32 (true) + interprets UInt64 == Int32 (false when Int32 < 0) interprets UInt64 == Int32 (false when Int32 < 0) + interprets Bool == Bool (true) interprets Bool == Bool (true) + interprets Int32 == Float64 (false) interprets Int32 == Float64 (false) + interprets Int32 == Float64 (true) interprets Int32 == Float64 (true) + interprets Int32 > Float64 (false) interprets Int32 > Float64 (false) + interprets UInt64 == Int32 (true when Int32 >= 0) interprets UInt64 == Int32 (true when Int32 >= 0) + interprets Float64 fdiv Float32 interprets Float64 fdiv Float32 + interprets UInt64 == Int32 (false when Int32 >= 0) interprets UInt64 == Int32 (false when Int32 >= 0) + interprets Int32 < Float64 interprets Int32 < Float64 + interprets Int32 > Float64 (true) interprets Int32 > Float64 (true) + interprets Int32 != UInt64 (false) interprets Int32 != UInt64 (false) + interprets UInt64.unsafe_mod(UInt64) interprets UInt64.unsafe_mod(UInt64) + interprets Bool != Bool (false) interprets Bool != Bool (false) + interprets UInt8 < Int32 (false, right is greater than zero) interprets UInt8 < Int32 (false, right is greater than zero) + interprets UInt64 < Int32 (false, right is less than zero) interprets UInt64 < Int32 (false, right is less than zero) + interprets Float64 < Int32 interprets Float64 < Int32 + interprets Int32 != UInt64 (true) interprets Int32 != UInt64 (true) + interprets Char == Char (true) interprets Char == Char (true) + interprets Int32 < Int32 interprets Int32 < Int32 + interprets UInt32 < Int32 (false) interprets UInt32 < Int32 (false) + interprets Bool == Bool (false) interprets Bool == Bool (false) + interprets UInt64 < Int32 (false, right is greater than zero) interprets UInt64 < Int32 (false, right is greater than zero) + interprets Float32 / Int32 interprets Float32 / Int32 + interprets Int32 == UInt64 (false) interprets Int32 == UInt64 (false) + interprets Int32 == UInt64 (true) interprets Int32 == UInt64 (true) + overflow + * + overlows on 10_u8 * 26 overlows on 10_u8 * 26 + overlows on 20_i64 * 922337203685477580_i64 overlows on 20_i64 * 922337203685477580_i64 + overlows on 20 * 214748364 overlows on 20 * 214748364 + overlows on 10_i8 * 14 overlows on 10_i8 * 14 + overlows on 10_i16 * 3300 overlows on 10_i16 * 3300 + overlows on 10_u16 * 6600 overlows on 10_u16 * 6600 + overlows on 20_u32 * 429496729 overlows on 20_u32 * 429496729 + overlows on 20_u64 * 1844674407370955161_i64 overlows on 20_u64 * 1844674407370955161_i64 + - + overlows on 1_u64 - 2 overlows on 1_u64 - 2 + overlows on 1_i8 - 256 overlows on 1_i8 - 256 + overlows on 1_u16 - 2 overlows on 1_u16 - 2 + overlows on 1_i64 - 9223372036854775810_u64 overlows on 1_i64 - 9223372036854775810_u64 + overlows on 1_u32 - 2 overlows on 1_u32 - 2 + overlows on 1_u8 - 2 overlows on 1_u8 - 2 + overlows on 1_i16 - 32770 overlows on 1_i16 - 32770 + overlows on 1 - 2147483650_i64 overlows on 1 - 2147483650_i64 + + + overlows on 1_u8 + 255 overlows on 1_u8 + 255 + overlows on 1_u64 + 18446744073709551615_u64 overlows on 1_u64 + 18446744073709551615_u64 + overlows on 1_i8 + 128 overlows on 1_i8 + 128 + overlows on 1_u32 + 4294967295_i64 overlows on 1_u32 + 4294967295_i64 + overlows on 1_u16 + 65535 overlows on 1_u16 + 65535 + overlows on 1_i64 + 9223372036854775807_i64 overlows on 1_i64 + 9223372036854775807_i64 + overlows on 1 + 2147483647 overlows on 1 + 2147483647 + overlows on 1_i16 + 32767 overlows on 1_i16 + 32767 + conversion + overlows on 32768_f32.to_i16 overlows on 32768_f32.to_i16 + overlows on -1.to_u16 overlows on -1.to_u16 + overlows on -1_i64.to_u32 overlows on -1_i64.to_u32 + overlows on -1_i64.to_u64 overlows on -1_i64.to_u64 + overlows on 256_f32.to_u8 overlows on 256_f32.to_u8 + overlows on 4294967296_f64.to_u32 overlows on 4294967296_f64.to_u32 + overlows on 32768_f64.to_i16 overlows on 32768_f64.to_i16 + overlows on -1_i16.to_u16 overlows on -1_i16.to_u16 + overlows on -1_i8.to_u16 overlows on -1_i8.to_u16 + overlows on 128_f32.to_i8 overlows on 128_f32.to_i8 + overlows on 65536_f32.to_u16 overlows on 65536_f32.to_u16 + overlows on -1.to_u32 overlows on -1.to_u32 + overlows on -1.to_u8 overlows on -1.to_u8 + overlows on 128_u64.to_i8 overlows on 128_u64.to_i8 + overlows on -1_i64.to_u8 overlows on -1_i64.to_u8 + overlows on 1.7976931348623157e+308.to_f32 overlows on 1.7976931348623157e+308.to_f32 + overlows on 256_f64.to_u8 overlows on 256_f64.to_u8 + overlows on -1_i16.to_u32 overlows on -1_i16.to_u32 + overlows on -1_i8.to_u8 overlows on -1_i8.to_u8 + overlows on -1_i16.to_u64 overlows on -1_i16.to_u64 + overlows on 128_u16.to_i8 overlows on 128_u16.to_i8 + overlows on 128_u32.to_i8 overlows on 128_u32.to_i8 + overlows on 2147483648_u32.to_i32 overlows on 2147483648_u32.to_i32 + overlows on 32768_u32.to_i16 overlows on 32768_u32.to_i16 + overlows on -1_i64.to_u16 overlows on -1_i64.to_u16 + overlows on 65536_f64.to_u16 overlows on 65536_f64.to_u16 + overlows on 2147483648_f64.to_i32 overlows on 2147483648_f64.to_i32 + overlows on 9223372036854775808_u64.to_i64 overlows on 9223372036854775808_u64.to_i64 + overlows on 32768_u16.to_i16 overlows on 32768_u16.to_i16 + overlows on -1_i16.to_u8 overlows on -1_i16.to_u8 + overlows on 2147483648_u64.to_i32 overlows on 2147483648_u64.to_i32 + overlows on 128_u8.to_i8 overlows on 128_u8.to_i8 + overlows on -1_i8.to_u64 overlows on -1_i8.to_u64 + overlows on -1.to_u64 overlows on -1.to_u64 + overlows on 128_f64.to_i8 overlows on 128_f64.to_i8 + overlows on -1_i8.to_u32 overlows on -1_i8.to_u32 + overlows on 32768_u64.to_i16 overlows on 32768_u64.to_i16 +.system + successful command successful command +sh: line 1: commanddoesnotexist: command not found + command does not exist command does not exist + failing command failing command + successful command with output successful command with output +Code gen: hooks + does extended macro does extended macro + does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body + does included macro does included macro + does finished does finished + does inherited macro does inherited macro + does inherited macro recursively does inherited macro recursively + fixes empty types in hooks (#3946) fixes empty types in hooks (#3946) + does added method macro does added method macro +Crystal::Repl::Interpreter + typeof + interprets typeof virtual type interprets typeof virtual type + interprets typeof metaclass type interprets typeof metaclass type + interprets typeof instance type interprets typeof instance type +Code gen: primitives + codegens f32 codegens f32 + defined method that calls primitive (bug) defined method that calls primitive (bug) + passes issue #328 passes issue #328 + gets crystal class instance type id gets crystal class instance type id + arithmetic primitives + codegens 2 &* 3 codegens 2 &* 3 + codegens 8.unsafe_mod 3 codegens 8.unsafe_mod 3 + codegens 1.to_f! codegens 1.to_f! + codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 codegens 1 - 2 + codegens 8.unsafe_div 3 codegens 8.unsafe_div 3 + codegens 16.unsafe_shr 2 codegens 16.unsafe_shr 2 + codegens 1 &+ 2 codegens 1 &+ 2 + codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 codegens 2 * 3 + skips bounds checking when to_i produces same type skips bounds checking when to_i produces same type + codegens 16.unsafe_shl 2 codegens 16.unsafe_shl 2 + codegens 1.to_f codegens 1.to_f codegens 1.to_f codegens 1.to_f codegens 1.to_f codegens 1.to_f codegens 1.to_f codegens 1.to_f codegens 1.to_f codegens 1.to_f + codegens 1.to_i16! codegens 1.to_i16! + codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 codegens 1 + 2 + codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 codegens 1.to_i16 + codegens 1 &- 2 codegens 1 &- 2 + codegens __LINE__ codegens __LINE__ + uses built-in llvm function that returns a tuple uses built-in llvm function that returns a tuple + codegens pointer of int codegens pointer of int + allows @[Primitive] on method that has body allows @[Primitive] on method that has body + va_arg + works with C code works with C code works with C code works with C code works with C code works with C code works with C code works with C code works with C code works with C code + uses llvm's va_arg instruction uses llvm's va_arg instruction + codegens string codegens string + allows redefining a primitive method allows redefining a primitive method + codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 + codegens int codegens int + codegens char codegens char + atomicrmw + codegens atomicrmw with enums codegens atomicrmw with enums + codegens atomicrmw with symbols codegens atomicrmw with symbols + codegens atomicrmw with enums codegens atomicrmw with enums + sums two numbers out of an [] of Number sums two numbers out of an [] of Number + codegens long codegens long + doesn't optimize away call whose obj is not passed as self (#2226) doesn't optimize away call whose obj is not passed as self (#2226) + codegens bool codegens bool + codegens char ord codegens char ord + can invoke cast on primitive typedef (#614) can invoke cast on primitive typedef (#614) + allows @[Primitive] on fun declarations allows @[Primitive] on fun declarations + can invoke binary on primitive typedef (#614) can invoke binary on primitive typedef (#614) + codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 + codegens crystal_type_id for class codegens crystal_type_id for class + doesn't treat `(1 == 1) == true` as `1 == 1 == true` (#328) doesn't treat `(1 == 1) == true` as `1 == 1 == true` (#328) + codegens f64 codegens f64 + codegens crystal_type_id with union type codegens crystal_type_id with union type +Normalize: unless + normalizes unless normalizes unless +Semantic: recursive struct check + detects recursive generic struct through generic module (#4720) detects recursive generic struct through generic module (#4720) + errors on recursive struct errors on recursive struct + detects recursive struct through module detects recursive struct through module + errors on recursive generic struct inside module errors on recursive generic struct inside module + errors on recursive struct through named tuple errors on recursive struct through named tuple + errors on recursive struct inside module errors on recursive struct inside module + detects recursive struct through inheritance (#3071) detects recursive struct through inheritance (#3071) + errors on mutually recursive struct errors on mutually recursive struct + errors on private recursive type errors on private recursive type + errors on recursive struct through recursive alias (#4454) (#4455) errors on recursive struct through recursive alias (#4454) (#4455) + detects recursive generic struct through module (#4720) detects recursive generic struct through module (#4720) + errors on recursive abstract struct through module (#11384) errors on recursive abstract struct through module (#11384) + errors on recursive struct through tuple errors on recursive struct through tuple Crystal::Formatter + formats "if 1\n2\n3\n# foo\nend" formats "if 1\n2\n3\n# foo\nend" + formats "NamedTuple(\n a: Int32,\n)" formats "NamedTuple(\n a: Int32,\n)" + formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" + formats "bar do\n call(foo <<-X\n bar\n X\n )\nend" formats "bar do\n call(foo <<-X\n bar\n X\n )\nend" + formats "begin 0[1] rescue 2 end" formats "begin 0[1] rescue 2 end" + formats "->{}" formats "->{}" + formats "foo(a: //, b: //)" formats "foo(a: //, b: //)" + formats "case foo\nwhen 1\n # A\nelse\n# B\nend\n" formats "case foo\nwhen 1\n # A\nelse\n# B\nend\n" + formats "macro foo\n {% if 1 %} 2 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" + formats "\n# hello\n\n\n1" formats "\n# hello\n\n\n1" + formats "foo.\nbar" formats "foo.\nbar" + formats "foo &.nil?" formats "foo &.nil?" + formats "def foo ( x : Int32 ) \n end" formats "def foo ( x : Int32 ) \n end" + formats "->foo!" formats "->foo!" + formats " {% if 1 %} 2 {% end %}" formats " {% if 1 %} 2 {% end %}" + formats "@x[ 1 ] ||= 2" formats "@x[ 1 ] ||= 2" + formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" + formats "macro foo\n {{ 1 + 2 }}\\\nend" formats "macro foo\n {{ 1 + 2 }}\\\nend" + formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" + formats "Foo( )" formats "Foo( )" + formats "foo[1, &.bar] = 1" formats "foo[1, &.bar] = 1" + formats ":&" formats ":&" + formats "def foo(\n &block\n)\nend" formats "def foo(\n &block\n)\nend" + formats "asm(\"a\" : :: : \"volatile\")" formats "asm(\"a\" : :: : \"volatile\")" + formats "foo(\n 1,\n # 2,\n # 3,\n)" formats "foo(\n 1,\n # 2,\n # 3,\n)" + formats "select\n# when foo\nwhen bar\n break\nend" formats "select\n# when foo\nwhen bar\n break\nend" + formats "bar = foo(->do\n 1 + 2\nend)" formats "bar = foo(->do\n 1 + 2\nend)" + formats "lib Foo\n $foo = hello : Int32 \nend" formats "lib Foo\n $foo = hello : Int32 \nend" + formats "1 + \\\n2" formats "1 + \\\n2" + formats "1 \\\nensure 2" formats "1 \\\nensure 2" + formats "coco.lala\nfoo\n .bar" formats "coco.lala\nfoo\n .bar" + formats "unless a\n2\n3\nend" formats "unless a\n2\n3\nend" + formats "def foo ( x = 1 ) \n end" formats "def foo ( x = 1 ) \n end" + formats "->(x : Int32) {}" formats "->(x : Int32) {}" + formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" + formats "_ = 1" formats "_ = 1" + formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" + formats "a = if 1\n2\nelse\n3\nend" formats "a = if 1\n2\nelse\n3\nend" + formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" + formats "a[1] , b[2] = 1 , 2" formats "a[1] , b[2] = 1 , 2" + formats "break *1 , *2" formats "break *1 , *2" + formats "[\n1,\n2,\n3]" formats "[\n1,\n2,\n3]" + formats "1 if 2\n# foo" formats "1 if 2\n# foo" + formats "foo(baz1 do\nend)" formats "foo(baz1 do\nend)" + formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" + formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" + formats "foo : (self)?" formats "foo : (self)?" + formats "a &.b.c.as(C)" formats "a &.b.c.as(C)" + formats "foo 1,\na: 1,\nb: 2,\nc: 3" formats "foo 1,\na: 1,\nb: 2,\nc: 3" + formats "loop do\n 1\nrescue\n 2\nend" formats "loop do\n 1\nrescue\n 2\nend" + formats "1.[]=(2) { 3 }" formats "1.[]=(2) { 3 }" + formats "macro foo\n 1 + 2 \n end" formats "macro foo\n 1 + 2 \n end" + formats "x : {A, B, }" formats "x : {A, B, }" + formats "while 1;\n2; end" formats "while 1;\n2; end" + formats "a &.a.!" formats "a &.a.!" + formats "while 1 # foo\n # bar\n 2\nend" formats "while 1 # foo\n # bar\n 2\nend" + formats "alias Foo= Bar" formats "alias Foo= Bar" + formats "while 1\n# nothing\nend" formats "while 1\n# nothing\nend" + formats "alias Foo::Bar= Baz" formats "alias Foo::Bar= Baz" + formats "::Pointer(T)" formats "::Pointer(T)" + formats "unless a\n # hello\n 2\nend" formats "unless a\n # hello\n 2\nend" + formats "foo &.is_a?(T)" formats "foo &.is_a?(T)" + formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" + formats "asm(\"a\" :: \"d\"(e)\n)" formats "asm(\"a\" :: \"d\"(e)\n)" + formats "1 && 2" formats "1 && 2" + formats "X(typeof(begin\n e.is_a?(Y) ? 1 : 2\nend))" formats "X(typeof(begin\n e.is_a?(Y) ? 1 : 2\nend))" + formats "foo([\n 1,\n bar do\n end,\n [\n 2,\n ],\n])" formats "foo([\n 1,\n bar do\n end,\n [\n 2,\n ],\n])" + formats "1\n.as?(Int32)" formats "1\n.as?(Int32)" + formats "if 1\n return foo(\n 1,\n 2,\n )\nend" formats "if 1\n return foo(\n 1,\n 2,\n )\nend" + formats "a = while 1\n2\nend" formats "a = while 1\n2\nend" + formats "foo" formats "foo" + formats "begin\n1\nensure\n2\nend" formats "begin\n1\nensure\n2\nend" + formats "next {1, 2}, 3" formats "next {1, 2}, 3" + formats "typeof( 1, 2, 3 )" formats "typeof( 1, 2, 3 )" + formats "def foo( x , * y )\nend" formats "def foo( x , * y )\nend" + formats "begin\n 1\n # Comment\n\n\nend" formats "begin\n 1\n # Comment\n\n\nend" + formats "next 1" formats "next 1" + formats "foo do\n {1 => foo <<-X\n bar\n X\n }\nend" formats "foo do\n {1 => foo <<-X\n bar\n X\n }\nend" + formats "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" formats "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" + formats "# ```text\n# 1 + 2\n# ```\n#\n# ```\n# 3 + 4\n# ```" formats "# ```text\n# 1 + 2\n# ```\n#\n# ```\n# 3 + 4\n# ```" + formats "if a\n2\n3\nelse\n4\n5\nend" formats "if a\n2\n3\nelse\n4\n5\nend" + formats "a = 1\n;\nb = 2" formats "a = 1\n;\nb = 2" + formats "$1" formats "$1" + formats "def foo ( @@x) \n end" formats "def foo ( @@x) \n end" + formats "/\#{1}/imx" formats "/\#{1}/imx" + formats " [ 1, \n 2 , \n 3 ] " formats " [ 1, \n 2 , \n 3 ] " + formats "1\n\n\n2" formats "1\n\n\n2" + formats " {% for x in y %} 2 {% end %}" formats " {% for x in y %} 2 {% end %}" + formats "def foo\n case x\n # z\n when 1\n end\nend" formats "def foo\n case x\n # z\n when 1\n end\nend" formats "def foo( & \n )\nend" formats "def foo( & \n )\nend" - formats "unless a\n2\n3\nelse\n4\n5\nend" formats "unless a\n2\n3\nelse\n4\n5\nend" - formats "return { {1, 2}, {3, 4} }, 5" formats "return { {1, 2}, {3, 4} }, 5" - formats "if 1\n2 # foo\nend" formats "if 1\n2 # foo\nend" - formats "yield *1 ,2" formats "yield *1 ,2" - formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" - formats "next( 1 )" formats "next( 1 )" - formats "foo ()" formats "foo ()" - formats "'a'" formats "'a'" - formats "<<-FOO\nfoo\n1\nFOO" formats "<<-FOO\nfoo\n1\nFOO" - formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - formats "-> : Int32 { }" formats "-> : Int32 { }" - formats "def foo(x y)\nend" formats "def foo(x y)\nend" - formats "foo.[1]" formats "foo.[1]" - formats "1 #=> 2" formats "1 #=> 2" - formats "a=1" formats "a=1" - formats "1.[]= { 3 }" formats "1.[]= { 3 }" - formats "macro foo\n def bar \n end \n end" formats "macro foo\n def bar \n end \n end" - formats "foo(\n <<-HERE,\n hello\n HERE\n # foo\n foo: 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n # foo\n foo: 1,\n)" - formats "->foo" formats "->foo" - formats "b &.[c].d" formats "b &.[c].d" - formats "foo[1, &.bar] ||= 1" formats "foo[1, &.bar] ||= 1" - formats "def foo(a : T) forall T\n #\n\n\nend" formats "def foo(a : T) forall T\n #\n\n\nend" - formats "1.[]=() { 3 }" formats "1.[]=() { 3 }" - formats "(())" formats "(())" - formats "pointerof( @a )" formats "pointerof( @a )" - formats "def foo(a, # comment\n *b)\nend" formats "def foo(a, # comment\n *b)\nend" - formats "def foo(\n\n#foo\nx,\n\n#bar\nz\n)\nend" formats "def foo(\n\n#foo\nx,\n\n#bar\nz\n)\nend" - formats "x : Int32 |\nString" formats "x : Int32 |\nString" - formats "foo &bar" formats "foo &bar" - formats "a = # foo\n bar(1)" formats "a = # foo\n bar(1)" - formats "macro foo( x = 1, y = 2, &block)\nend" formats "macro foo( x = 1, y = 2, &block)\nend" - formats "def foo(x)\n case 1\n when self // 2\n 3\n end\nend" formats "def foo(x)\n case 1\n when self // 2\n 3\n end\nend" - formats "yield(\n1 , \n2)" formats "yield(\n1 , \n2)" - formats "(a).b { }\nc" formats "(a).b { }\nc" - formats "foo &.[](1, 2)" formats "foo &.[](1, 2)" - formats "inner &.color=(@color)\n1" formats "inner &.color=(@color)\n1" - formats "\n\n1" formats "\n\n1" - formats "foo[ 1, 2 ]?" formats "foo[ 1, 2 ]?" + formats "break { {1, 2}, {3, 4} }" formats "break { {1, 2}, {3, 4} }" + formats "yield *1" formats "yield *1" + formats "def foo : A(B)\n nil\nend" formats "def foo : A(B)\n nil\nend" + formats "case\nelse\n 1\nend" formats "case\nelse\n 1\nend" formats "def foo: Int32\nend" formats "def foo: Int32\nend" - formats "{1 => 2,\n 3 => 4, # lala\n}\n" formats "{1 => 2,\n 3 => 4, # lala\n}\n" - does not add `&` without flag `method_signature_yield` - formats "def foo()\n yield\nend" formats "def foo()\n yield\nend" - formats "def foo(\nx,\n)\n yield\nend" formats "def foo(\nx,\n)\n yield\nend" + formats "select\nwhen foo # foo\n # bar\nelse # foo\n # bar\nend" formats "select\nwhen foo # foo\n # bar\nelse # foo\n # bar\nend" + formats "1 > 2" formats "1 > 2" + formats "foo &.responds_to?(:foo).bar" formats "foo &.responds_to?(:foo).bar" + formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" + formats "foo.as Int32*" formats "foo.as Int32*" + adds `&` to yielding methods that don't have a block parameter (#8764) formats "def foo(\n)\n yield\nend" formats "def foo(\n)\n yield\nend" - formats "def foo(x,\ny,)\n yield\nend" formats "def foo(x,\ny,)\n yield\nend" - formats "def foo(x,\n y)\n yield\nend" formats "def foo(x,\n y)\n yield\nend" + formats "def foo\n yield\nend" formats "def foo\n yield\nend" + formats "def foo # bar\n yield\nend" formats "def foo # bar\n yield\nend" + formats "def foo(x ,)\n yield\nend" formats "def foo(x ,)\n yield\nend" + formats "macro f\n yield\n {{ yield }}\nend" formats "macro f\n yield\n {{ yield }}\nend" + formats "def foo(\nx,\n)\n yield\nend" formats "def foo(\nx,\n)\n yield\nend" + formats "def foo(x,\n)\n yield\nend" formats "def foo(x,\n)\n yield\nend" formats "def foo(\nx)\n yield\nend" formats "def foo(\nx)\n yield\nend" formats "def foo(x\n)\n yield\nend" formats "def foo(x\n)\n yield\nend" - formats "def foo(x,\n)\n yield\nend" formats "def foo(x,\n)\n yield\nend" - formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" - formats "def foo # bar\n yield\nend" formats "def foo # bar\n yield\nend" formats "def foo(x)\n yield\nend" formats "def foo(x)\n yield\nend" - formats "def foo(a, **b)\n yield\nend" formats "def foo(a, **b)\n yield\nend" - formats "def foo\n yield\nend" formats "def foo\n yield\nend" - formats "def foo(x ,)\n yield\nend" formats "def foo(x ,)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" - formats "foo.foo1(\n bar\n .bar1\n .bar2)" formats "foo.foo1(\n bar\n .bar1\n .bar2)" - formats "module Ton\n macro foo\n class {{name.id}}\n end\n end\nend" formats "module Ton\n macro foo\n class {{name.id}}\n end\n end\nend" - formats "def run\n\nrescue\n 2\n 3\nend" formats "def run\n\nrescue\n 2\n 3\nend" - formats "case 1\nelse # foo\n # bar\nend" formats "case 1\nelse # foo\n # bar\nend" - formats "@x : A(B | C)?" formats "@x : A(B | C)?" - formats "macro foo(\n a,\n *b,\n)\nend" formats "macro foo(\n a,\n *b,\n)\nend" - formats "foo &.bar.as?(T)" formats "foo &.bar.as?(T)" - formats "foo.[] = 1" formats "foo.[] = 1" - formats "def foo\n\n1\n\nend" formats "def foo\n\n1\n\nend" - formats "FOO = 2\nA = 1" formats "FOO = 2\nA = 1" - formats "def foo(x = __FILE__ )\nend" formats "def foo(x = __FILE__ )\nend" - formats "%[hello]" formats "%[hello]" - formats "x : (A -> B)" formats "x : (A -> B)" - formats "loop do\n 1\n loop do\n 2\n rescue\n 3\n end\n 4\nend" formats "loop do\n 1\n loop do\n 2\n rescue\n 3\n end\n 4\nend" - formats "foo &.as?(T)" formats "foo &.as?(T)" - formats "1.=== { 3 }" formats "1.=== { 3 }" - formats "-> { 1 }" formats "-> { 1 }" - formats "::NamedTuple()" formats "::NamedTuple()" - formats "foo.%(bar)" formats "foo.%(bar)" - formats "a = \\\n # foo\n bar(1)" formats "a = \\\n # foo\n bar(1)" - formats "module Foo; 1; end" formats "module Foo; 1; end" - formats "class Foo\nend\nclass Bar\nend" formats "class Foo\nend\nclass Bar\nend" - formats "foo a , b , x: 1" formats "foo a , b , x: 1" - formats "def foo : Int32\n 1\nend" formats "def foo : Int32\n 1\nend" + formats "def foo(x,\ny,)\n yield\nend" formats "def foo(x,\ny,)\n yield\nend" + formats "def foo(a, **b)\n yield\nend" formats "def foo(a, **b)\n yield\nend" + formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" + formats "def foo()\n yield\nend" formats "def foo()\n yield\nend" + formats "def foo(x,\ny)\n yield\nend" formats "def foo(x,\ny)\n yield\nend" + formats "def foo( & )\nend" formats "def foo( & )\nend" + formats "macro foo\n {% if 1 %} 2 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% end %}\nend" + formats "foo(1,\n2,\n)" formats "foo(1,\n2,\n)" + formats "->{}" formats "->{}" formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - formats "case 1 \n in Int32 \n 3 \n end" formats "case 1 \n in Int32 \n 3 \n end" - formats " <<-HTML\n foo\n HTML" formats " <<-HTML\n foo\n HTML" - formats "return *1 , *2" formats "return *1 , *2" - formats "if 1\nelse\n2\nend\n3" formats "if 1\nelse\n2\nend\n3" - formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" - formats "foo 1, do\n2\nend" formats "foo 1, do\n2\nend" - formats "break *1 ,2" formats "break *1 ,2" - formats "foo &.bar" formats "foo &.bar" - formats "~ 1" formats "~ 1" - formats "def foo(x : (self)?)\nend" formats "def foo(x : (self)?)\nend" - formats "alias A = (B) -> C" formats "alias A = (B) -> C" - formats "def foo(x) # bar\n # baz\nend" formats "def foo(x) # bar\n # baz\nend" - formats "break 1 , 2" formats "break 1 , 2" - formats "foo (1)" formats "foo (1)" - formats "foo(1, / /)" formats "foo(1, / /)" - formats "Foo( Bar( ) )" formats "Foo( Bar( ) )" - formats "def foo(\n foo,\n\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n\n @[MyAnn]\n &block\n); end" - formats "foo.\nbar" formats "foo.\nbar" - formats "a-1" formats "a-1" - formats "1 + \\\n2" formats "1 + \\\n2" - formats "lib LibFoo\n {% begin %}\n fun x = y(Int32)\n {% end %}\nend" formats "lib LibFoo\n {% begin %}\n fun x = y(Int32)\n {% end %}\nend" - formats "{} of A => B\n{} of Foo => Bar" formats "{} of A => B\n{} of Foo => Bar" - formats "foo ((1) ? 2 : 3)" formats "foo ((1) ? 2 : 3)" - formats "@[::Foo::Bar]" formats "@[::Foo::Bar]" - formats "abstract class Foo\nend" formats "abstract class Foo\nend" - formats "def foo\n a = 1; # foo\n a = 2; # bar\nend\n" formats "def foo\n a = 1; # foo\n a = 2; # bar\nend\n" - formats "a+1" formats "a+1" - formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n foo => true,\n}" formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n foo => true,\n}" - formats "if 1 # foo\n2\nend" formats "if 1 # foo\n2\nend" - formats "1 * 2" formats "1 * 2" - formats "asm(\"nop\" : \"a\"(0), \"b\"(1)\n: \"c\"(2), \"d\"(3) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(1)\n: \"c\"(2), \"d\"(3) )" - formats "case 1\nwhen a; 2\nelse; b\nend" formats "case 1\nwhen a; 2\nelse; b\nend" - formats "[\n # foo\n] of String" formats "[\n # foo\n] of String" - formats "foo : (Array(String)?) | String" formats "foo : (Array(String)?) | String" - formats "foo([\n 1,\n bar do\n end,\n [\n 2,\n ],\n])" formats "foo([\n 1,\n bar do\n end,\n [\n 2,\n ],\n])" - formats "foo self // 1" formats "foo self // 1" - formats "a &.!.!" formats "a &.!.!" - formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\n # comment\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\n # comment\nend" - formats "10 / a" formats "10 / a" - formats "alias A = ({A, (B)})" formats "alias A = ({A, (B)})" - formats "<<-FOO\n1\nFOO\n\n{\n 1 => 2,\n 10 => 3,\n}" formats "<<-FOO\n1\nFOO\n\n{\n 1 => 2,\n 10 => 3,\n}" - formats "ary.size = (1).to_i" formats "ary.size = (1).to_i" - formats "yield *1 , *2" formats "yield *1 , *2" - formats "foo : Pointer(Foo)*" formats "foo : Pointer(Foo)*" - formats ":>>" formats ":>>" - formats "$1?" formats "$1?" - formats "if a\n2\n3\nelse\n4\n5\nend" formats "if a\n2\n3\nelse\n4\n5\nend" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] baz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] baz\n); end" - formats "asm(\"a\" :: \"d\"(e)\n)" formats "asm(\"a\" :: \"d\"(e)\n)" - formats "\"foo\" \\\n \"bar\"" formats "\"foo\" \\\n \"bar\"" - formats "if 1\n[ 1 , 2 , 3 ]\nend" formats "if 1\n[ 1 , 2 , 3 ]\nend" - formats "macro foo\n {% if true %}if true{% end %}\n {% if true %}end{% end %}\nend" formats "macro foo\n {% if true %}if true{% end %}\n {% if true %}end{% end %}\nend" - formats "/\#{1}/imx" formats "/\#{1}/imx" - formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" - formats "a = foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "a = foo(1, 2, {\n foo: 1,\n bar: 2,\n})" - formats "def foo\n {{@type}}\nend" formats "def foo\n {{@type}}\nend" - formats "-> :: foo?" formats "-> :: foo?" - formats "next( *1 , *2 )" formats "next( *1 , *2 )" - formats "a &.a.!" formats "a &.a.!" - formats "asm(\"nop\" ::: \"eax\" )" formats "asm(\"nop\" ::: \"eax\" )" - formats "if 1\n return foo(\n 1,\n 2,\n )\nend" formats "if 1\n return foo(\n 1,\n 2,\n )\nend" - formats "{{ foo <<-X\nbar\nX\n}}" formats "{{ foo <<-X\nbar\nX\n}}" formats "1.=== do\nend" formats "1.=== do\nend" - formats "-> do\nend" formats "-> do\nend" - formats "1/2" formats "1/2" - formats "{\n <<-KEY => 1,\n key\n KEY\n}" formats "{\n <<-KEY => 1,\n key\n KEY\n}" - formats "->(x : Int32) { }" formats "->(x : Int32) { }" - formats "foo = 1\n->foo.foo?" formats "foo = 1\n->foo.foo?" - formats "a = while 1\n2\nend" formats "a = while 1\n2\nend" - formats "def foo\n@x = uninitialized Int32\nend" formats "def foo\n@x = uninitialized Int32\nend" - formats "1 # foo\n1234 # bar" formats "1 # foo\n1234 # bar" - formats "1 ? 2 : 3" formats "1 ? 2 : 3" - formats "(1 .. )" formats "(1 .. )" - formats "{ {1}.foo, 2 }" formats "{ {1}.foo, 2 }" - formats "begin\n # Comment\n\n\nend" formats "begin\n # Comment\n\n\nend" - formats "$~.bar" formats "$~.bar" - formats "next 1 , 2" formats "next 1 , 2" - formats "foo (1), 2" formats "foo (1), 2" - formats "page= <<-HTML\n foo\nHTML" formats "page= <<-HTML\n foo\nHTML" - formats "Foo( x: Int32 , y: Float64 )" formats "Foo( x: Int32 , y: Float64 )" - formats "def foo(a,\n *b)\nend" formats "def foo(a,\n *b)\nend" - formats "fun foo(x : Int32) : Int32\n 1\nend" formats "fun foo(x : Int32) : Int32\n 1\nend" - formats "{ 1 => 2 ,\n\n 3 => 4 }" formats "{ 1 => 2 ,\n\n 3 => 4 }" - formats "foo = 1\n->foo.bar(Int32)" formats "foo = 1\n->foo.bar(Int32)" - formats "1 #=>2" formats "1 #=>2" - formats "foo[1, &.bar] = 1" formats "foo[1, &.bar] = 1" + formats "case 1\nwhen 2\n 3\n # foo\nelse\n 4\n # bar\nend" formats "case 1\nwhen 2\n 3\n # foo\nelse\n 4\n # bar\nend" formats "module Foo\n# nothing\nend" formats "module Foo\n# nothing\nend" - formats "foo(baz1 do\nend)" formats "foo(baz1 do\nend)" - formats "def foo(a : T) forall T\n #\n\nend" formats "def foo(a : T) forall T\n #\n\nend" - formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" - formats "\"\#{foo = 1\n}\"" formats "\"\#{foo = 1\n}\"" - formats "[foo <<-X\nbar\nX\n]" formats "[foo <<-X\nbar\nX\n]" - gives proper line number in syntax error inside macro gives proper line number in syntax error inside macro - formats "1\n# hello\n\n\n" formats "1\n# hello\n\n\n" - formats "foo(1 ||\n # foo\n 2)" formats "foo(1 ||\n # foo\n 2)" - formats "next 1" formats "next 1" - formats "if 1 &&\n (2 || 3)\n 1\nelse\n 2\nend" formats "if 1 &&\n (2 || 3)\n 1\nelse\n 2\nend" + formats "1 ;\n 2" formats "1 ;\n 2" + formats "case 1\nwhen 8 then 1\nwhen 16 then 2\nwhen 256 then 3\nwhen 'a' then 5\nwhen \"foo\" then 6\nelse 4\nend" formats "case 1\nwhen 8 then 1\nwhen 16 then 2\nwhen 256 then 3\nwhen 'a' then 5\nwhen \"foo\" then 6\nelse 4\nend" + formats "yield 1 , 2" formats "yield 1 , 2" + formats "[\n1,\n\n2]" formats "[\n1,\n\n2]" + formats "def foo( x , & block : Int32->Float64)\nend" formats "def foo( x , & block : Int32->Float64)\nend" + formats "__FILE__" formats "__FILE__" + formats "foo &.>=(2)" formats "foo &.>=(2)" + formats "def foo ( bar @@select) \n end" formats "def foo ( bar @@select) \n end" + formats "if 1\n2 # foo\nend" formats "if 1\n2 # foo\nend" + formats "loop do\n 1\n loop do\n 2\n rescue\n 3\n end\n 4\nend" formats "loop do\n 1\n loop do\n 2\n rescue\n 3\n end\n 4\nend" + formats "foo 1, # comment\n do\n end" formats "foo 1, # comment\n do\n end" + formats "\n# hello\n1" formats "\n# hello\n1" + formats "foo.responds_to? :bar\n1" formats "foo.responds_to? :bar\n1" + formats "foo do\n # bar\nend" formats "foo do\n # bar\nend" + formats "~ 1" formats "~ 1" + formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" + formats "module Readline\n @@completion_proc : (String -> Array(String)?) | (String -> Array(String)) | Nil\nend" formats "module Readline\n @@completion_proc : (String -> Array(String)?) | (String -> Array(String)) | Nil\nend" + formats "foo do\n bar do\n foo <<-X\n bar\n X\n end\nend" formats "foo do\n bar do\n foo <<-X\n bar\n X\n end\nend" + formats "x : Int32 = 1" formats "x : Int32 = 1" + formats "1.>=(2) { 3 }" formats "1.>=(2) { 3 }" + formats "def foo(\n\n#foo\nx,\n\n#bar\nz\n)\nend" formats "def foo(\n\n#foo\nx,\n\n#bar\nz\n)\nend" + formats "case 1\nelse # foo\n # bar\nend" formats "case 1\nelse # foo\n # bar\nend" + formats "<<-FOO\nfoo\nfoo\nFOO" formats "<<-FOO\nfoo\nfoo\nFOO" + formats "! 1" formats "! 1" + formats " [ 1 , 2 , 3 ] " formats " [ 1 , 2 , 3 ] " + formats " <<-HTML\n foo\n HTML" formats " <<-HTML\n foo\n HTML" + formats "if 1\n foo(\n bar,\n # comment\n )\nend" formats "if 1\n foo(\n bar,\n # comment\n )\nend" + formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" + formats "a = \nif 1\n2\nend" formats "a = \nif 1\n2\nend" + Unicode bi-directional control characters + formats "\"\u2068\#{1}\"" formats "\"\u2068\#{1}\"" + formats "\"\u2067\#{1}\"" formats "\"\u2067\#{1}\"" + formats "%Q(\u2066\#{1})" formats "%Q(\u2066\#{1})" + formats "%i(\u202E)" formats "%i(\u202E)" + formats "<<-EOS\n\u202D\#{1}\nEOS" formats "<<-EOS\n\u202D\#{1}\nEOS" + formats "\"\\c\u2066\#{1}\"" formats "\"\\c\u2066\#{1}\"" + formats "def foo(\"\u202E\" x)\nend" formats "def foo(\"\u202E\" x)\nend" + formats "%r(\u2068)" formats "%r(\u2068)" + formats "%r(\u202E)" formats "%r(\u202E)" + formats "{\"\u202B\": 1}" formats "{\"\u202B\": 1}" + formats "foo(\"\u202A\": 1)" formats "foo(\"\u202A\": 1)" + formats "%(\u202E)" formats "%(\u202E)" + formats "%Q(\u2069\#{1})" formats "%Q(\u2069\#{1})" + formats "%Q(\u2067)" formats "%Q(\u2067)" + formats "%r(\u2067)" formats "%r(\u2067)" + formats "/\u202D\#{1}/" formats "/\u202D\#{1}/" + formats "<<-EOS\n\u202C\#{1}\nEOS" formats "<<-EOS\n\u202C\#{1}\nEOS" + formats "def foo(\"\u2067\" x)\nend" formats "def foo(\"\u2067\" x)\nend" + formats "/\u2069\#{1}/" formats "/\u2069\#{1}/" + formats "%q(\u202B)" formats "%q(\u202B)" + formats "%Q(\u2067\#{1})" formats "%Q(\u2067\#{1})" + formats "%q(\u202E)" formats "%q(\u202E)" + formats "<<-EOS\n\u2069\#{1}\nEOS" formats "<<-EOS\n\u2069\#{1}\nEOS" + formats "def foo(\"\u2068\" x)\nend" formats "def foo(\"\u2068\" x)\nend" + formats "{\"\u2067\": 1}" formats "{\"\u2067\": 1}" + formats "%r(\u2066\#{1})" formats "%r(\u2066\#{1})" + formats "%r(\u202D)" formats "%r(\u202D)" + formats "\"\u202E\#{1}\"" formats "\"\u202E\#{1}\"" + formats "\"\\c\u202E\#{1}\"" formats "\"\\c\u202E\#{1}\"" + formats "\"\u2066\"" formats "\"\u2066\"" + formats "\"\\c\u202B\"" formats "\"\\c\u202B\"" + formats "foo(\"\u202D\": 1)" formats "foo(\"\u202D\": 1)" + formats "<<-EOS\n\u2067\#{1}\nEOS" formats "<<-EOS\n\u2067\#{1}\nEOS" + formats "{\"\u202D\": 1}" formats "{\"\u202D\": 1}" + formats "\"\u202D\"" formats "\"\u202D\"" + formats "foo(\"\u2068\": 1)" formats "foo(\"\u2068\": 1)" + formats "def foo(\"\u202D\" x)\nend" formats "def foo(\"\u202D\" x)\nend" + formats "<<-EOS\n\u202B\nEOS" formats "<<-EOS\n\u202B\nEOS" + formats "\"\u202A\"" formats "\"\u202A\"" + formats "foo(\"\u2069\": 1)" formats "foo(\"\u2069\": 1)" + formats "<<-EOS\n\u202A\nEOS" formats "<<-EOS\n\u202A\nEOS" + formats "%i(\u202D)" formats "%i(\u202D)" + formats "/\u2069/" formats "/\u2069/" + formats "%r(\u202D\#{1})" formats "%r(\u202D\#{1})" + formats "\"\\c\u202C\"" formats "\"\\c\u202C\"" + formats "/\u202A\#{1}/" formats "/\u202A\#{1}/" + formats "%w(\u202B)" formats "%w(\u202B)" + formats "%r(\u2069\#{1})" formats "%r(\u2069\#{1})" + formats "%r(\u202C\#{1})" formats "%r(\u202C\#{1})" + formats "{\"\u202A\": 1}" formats "{\"\u202A\": 1}" + formats "{\"\u2066\": 1}" formats "{\"\u2066\": 1}" + formats "%(\u2066)" formats "%(\u2066)" + formats "%q(\u202D)" formats "%q(\u202D)" + formats "\"\\c\u2068\#{1}\"" formats "\"\\c\u2068\#{1}\"" + formats "<<-EOS\n\u202E\#{1}\nEOS" formats "<<-EOS\n\u202E\#{1}\nEOS" + formats "NamedTuple(\"\u202A\": Int32)" formats "NamedTuple(\"\u202A\": Int32)" + formats "<<-'EOS'\n\u2069\nEOS" formats "<<-'EOS'\n\u2069\nEOS" + formats "%Q(\u2068)" formats "%Q(\u2068)" + formats "<<-'EOS'\n\u202B\nEOS" formats "<<-'EOS'\n\u202B\nEOS" + formats "<<-EOS\n\u2066\#{1}\nEOS" formats "<<-EOS\n\u2066\#{1}\nEOS" + formats "\"\\c\u202E\"" formats "\"\\c\u202E\"" + formats "%q(\u2067)" formats "%q(\u2067)" + formats "<<-EOS\n\u202B\#{1}\nEOS" formats "<<-EOS\n\u202B\#{1}\nEOS" + formats "%q(\u2066)" formats "%q(\u2066)" + formats "%Q(\u202B)" formats "%Q(\u202B)" + formats "%r(\u202E\#{1})" formats "%r(\u202E\#{1})" + formats "/\u202B/" formats "/\u202B/" + formats "\"\\c\u202C\#{1}\"" formats "\"\\c\u202C\#{1}\"" + formats "%q(\u2068)" formats "%q(\u2068)" + formats "%i(\u2068)" formats "%i(\u2068)" + formats "%Q(\u2068\#{1})" formats "%Q(\u2068\#{1})" + formats "%r(\u202A)" formats "%r(\u202A)" + formats "\"\u202B\#{1}\"" formats "\"\u202B\#{1}\"" + formats "%(\u2068)" formats "%(\u2068)" + formats "%r(\u2069)" formats "%r(\u2069)" + formats "%Q(\u202D)" formats "%Q(\u202D)" + formats "NamedTuple(\"\u202B\": Int32)" formats "NamedTuple(\"\u202B\": Int32)" + formats "NamedTuple(\"\u202C\": Int32)" formats "NamedTuple(\"\u202C\": Int32)" + formats "%q(\u2069)" formats "%q(\u2069)" + formats "<<-EOS\n\u2067\nEOS" formats "<<-EOS\n\u2067\nEOS" + formats "foo(\"\u202E\": 1)" formats "foo(\"\u202E\": 1)" + formats "%Q(\u202A)" formats "%Q(\u202A)" + formats "def foo(\"\u202B\" x)\nend" formats "def foo(\"\u202B\" x)\nend" + formats "/\u202D/" formats "/\u202D/" + formats "%Q(\u202C)" formats "%Q(\u202C)" + formats "\"\\c\u2069\"" formats "\"\\c\u2069\"" + formats "%Q(\u202C\#{1})" formats "%Q(\u202C\#{1})" + formats "%i(\u2066)" formats "%i(\u2066)" + formats "NamedTuple(\"\u2069\": Int32)" formats "NamedTuple(\"\u2069\": Int32)" + formats "%(\u202A)" formats "%(\u202A)" + formats "%r(\u202B)" formats "%r(\u202B)" + formats "/\u202E/" formats "/\u202E/" + formats "foo(\"\u2066\": 1)" formats "foo(\"\u2066\": 1)" + formats "\"\u2069\"" formats "\"\u2069\"" + formats "<<-EOS\n\u2069\nEOS" formats "<<-EOS\n\u2069\nEOS" + formats "foo(\"\u2067\": 1)" formats "foo(\"\u2067\": 1)" + formats "%w(\u2069)" formats "%w(\u2069)" + formats "%(\u202B)" formats "%(\u202B)" + formats "<<-'EOS'\n\u2068\nEOS" formats "<<-'EOS'\n\u2068\nEOS" + formats "/\u202C/" formats "/\u202C/" + formats "%Q(\u202B\#{1})" formats "%Q(\u202B\#{1})" + formats "%w(\u202A)" formats "%w(\u202A)" + formats "%Q(\u202A\#{1})" formats "%Q(\u202A\#{1})" + formats "%w(\u202C)" formats "%w(\u202C)" + formats "NamedTuple(\"\u2066\": Int32)" formats "NamedTuple(\"\u2066\": Int32)" + formats "NamedTuple(\"\u202E\": Int32)" formats "NamedTuple(\"\u202E\": Int32)" + formats "\"\\c\u2066\"" formats "\"\\c\u2066\"" + formats "%(\u2067)" formats "%(\u2067)" + formats "/\u2068\#{1}/" formats "/\u2068\#{1}/" + formats "/\u202A/" formats "/\u202A/" + formats "\"\\c\u202D\#{1}\"" formats "\"\\c\u202D\#{1}\"" + formats "%w(\u2066)" formats "%w(\u2066)" + formats "/\u2068/" formats "/\u2068/" + formats "/\u202C\#{1}/" formats "/\u202C\#{1}/" + formats "\"\u2066\#{1}\"" formats "\"\u2066\#{1}\"" + formats "def foo(\"\u2066\" x)\nend" formats "def foo(\"\u2066\" x)\nend" + formats "def foo(\"\u202C\" x)\nend" formats "def foo(\"\u202C\" x)\nend" + formats "%w(\u202E)" formats "%w(\u202E)" + formats "<<-EOS\n\u202E\nEOS" formats "<<-EOS\n\u202E\nEOS" + formats "\"\u202D\#{1}\"" formats "\"\u202D\#{1}\"" + formats "%(\u202C)" formats "%(\u202C)" + formats "\"\u202A\#{1}\"" formats "\"\u202A\#{1}\"" + formats "/\u2067/" formats "/\u2067/" + formats "%Q(\u202E\#{1})" formats "%Q(\u202E\#{1})" + formats "{\"\u202C\": 1}" formats "{\"\u202C\": 1}" + formats "<<-EOS\n\u202C\nEOS" formats "<<-EOS\n\u202C\nEOS" + formats "<<-'EOS'\n\u2067\nEOS" formats "<<-'EOS'\n\u2067\nEOS" + formats "\"\\c\u2067\#{1}\"" formats "\"\\c\u2067\#{1}\"" + formats "{\"\u2068\": 1}" formats "{\"\u2068\": 1}" + formats "NamedTuple(\"\u2067\": Int32)" formats "NamedTuple(\"\u2067\": Int32)" + formats "%i(\u2069)" formats "%i(\u2069)" + formats "{\"\u2069\": 1}" formats "{\"\u2069\": 1}" + formats "def foo(\"\u202A\" x)\nend" formats "def foo(\"\u202A\" x)\nend" + formats "def foo(\"\u2069\" x)\nend" formats "def foo(\"\u2069\" x)\nend" + formats "/\u2066/" formats "/\u2066/" + formats "%i(\u2067)" formats "%i(\u2067)" + formats "\"\\c\u2069\#{1}\"" formats "\"\\c\u2069\#{1}\"" + formats "\"\u2069\#{1}\"" formats "\"\u2069\#{1}\"" + formats "<<-EOS\n\u2068\#{1}\nEOS" formats "<<-EOS\n\u2068\#{1}\nEOS" + formats "<<-EOS\n\u202D\nEOS" formats "<<-EOS\n\u202D\nEOS" + formats "%(\u2069)" formats "%(\u2069)" + formats "\"\u202B\"" formats "\"\u202B\"" + formats "\"\u202C\#{1}\"" formats "\"\u202C\#{1}\"" + formats "%r(\u202B\#{1})" formats "%r(\u202B\#{1})" + formats "\"\u202C\"" formats "\"\u202C\"" + formats "%q(\u202A)" formats "%q(\u202A)" + formats "<<-'EOS'\n\u202A\nEOS" formats "<<-'EOS'\n\u202A\nEOS" + formats "\"\u2068\"" formats "\"\u2068\"" + formats "{\"\u202E\": 1}" formats "{\"\u202E\": 1}" + formats "%i(\u202A)" formats "%i(\u202A)" + formats "\"\\c\u2067\"" formats "\"\\c\u2067\"" + formats "<<-EOS\n\u202A\#{1}\nEOS" formats "<<-EOS\n\u202A\#{1}\nEOS" + formats "%r(\u2066)" formats "%r(\u2066)" + formats "%Q(\u202E)" formats "%Q(\u202E)" + formats "%q(\u202C)" formats "%q(\u202C)" + formats "%w(\u2067)" formats "%w(\u2067)" + formats "\"\\c\u202A\"" formats "\"\\c\u202A\"" + formats "/\u2067\#{1}/" formats "/\u2067\#{1}/" + formats "<<-'EOS'\n\u202D\nEOS" formats "<<-'EOS'\n\u202D\nEOS" + formats "foo(\"\u202C\": 1)" formats "foo(\"\u202C\": 1)" + formats "<<-'EOS'\n\u2066\nEOS" formats "<<-'EOS'\n\u2066\nEOS" + formats "/\u2066\#{1}/" formats "/\u2066\#{1}/" + formats "%Q(\u202D\#{1})" formats "%Q(\u202D\#{1})" + formats "\"\\c\u202D\"" formats "\"\\c\u202D\"" + formats "\"\\c\u202B\#{1}\"" formats "\"\\c\u202B\#{1}\"" + formats "/\u202E\#{1}/" formats "/\u202E\#{1}/" + formats "%r(\u2067\#{1})" formats "%r(\u2067\#{1})" + formats "%r(\u202C)" formats "%r(\u202C)" + formats "\"\u202E\"" formats "\"\u202E\"" + formats "NamedTuple(\"\u202D\": Int32)" formats "NamedTuple(\"\u202D\": Int32)" + formats "\"\\c\u202A\#{1}\"" formats "\"\\c\u202A\#{1}\"" + formats "/\u202B\#{1}/" formats "/\u202B\#{1}/" + formats "%r(\u2068\#{1})" formats "%r(\u2068\#{1})" + formats "%w(\u202D)" formats "%w(\u202D)" + formats "<<-EOS\n\u2068\nEOS" formats "<<-EOS\n\u2068\nEOS" + formats "foo(\"\u202B\": 1)" formats "foo(\"\u202B\": 1)" + formats "<<-'EOS'\n\u202E\nEOS" formats "<<-'EOS'\n\u202E\nEOS" + formats "%Q(\u2069)" formats "%Q(\u2069)" + formats "%Q(\u2066)" formats "%Q(\u2066)" + formats "%i(\u202C)" formats "%i(\u202C)" + formats "%r(\u202A\#{1})" formats "%r(\u202A\#{1})" + formats "\"\\c\u2068\"" formats "\"\\c\u2068\"" + formats "NamedTuple(\"\u2068\": Int32)" formats "NamedTuple(\"\u2068\": Int32)" + formats "<<-EOS\n\u2066\nEOS" formats "<<-EOS\n\u2066\nEOS" + formats "%(\u202D)" formats "%(\u202D)" + formats "\"\u2067\"" formats "\"\u2067\"" + formats "%w(\u2068)" formats "%w(\u2068)" + formats "<<-'EOS'\n\u202C\nEOS" formats "<<-'EOS'\n\u202C\nEOS" + formats "%i(\u202B)" formats "%i(\u202B)" + formats "foo.as?(T).bar" formats "foo.as?(T).bar" + formats "case 1\nwhen 2 # a\n # b\nend" formats "case 1\nwhen 2 # a\n # b\nend" + formats "0x1234_u32" formats "0x1234_u32" + formats "with foo yield bar" formats "with foo yield bar" + formats "select # some comment\nwhen bar\n break\nend" formats "select # some comment\nwhen bar\n break\nend" + formats "run(\"a\", 1)" formats "run(\"a\", 1)" + formats "foo . bar()" formats "foo . bar()" + formats "1.[]= do\nend" formats "1.[]= do\nend" + formats "{1 => 2,\n 3 => 4, # lala\n}\n" formats "{1 => 2,\n 3 => 4, # lala\n}\n" + formats "def foo ( @select) \n end" formats "def foo ( @select) \n end" + formats "next( 1 , 2 )" formats "next( 1 , 2 )" + formats "%" formats "%" + formats "call(foo <<-X\nbar\nX\n)" formats "call(foo <<-X\nbar\nX\n)" + formats "case\n# hello\nwhen 1\n 2\nend" formats "case\n# hello\nwhen 1\n 2\nend" + formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" + formats "def foo(\n foo,\n\n @[MyAnn]\n @[MyAnn]\n & : Nil -> Nil\n); end" formats "def foo(\n foo,\n\n @[MyAnn]\n @[MyAnn]\n & : Nil -> Nil\n); end" + formats "a+1" formats "a+1" + formats "foo{|x| x}" formats "foo{|x| x}" + formats "module Foo; 1; end" formats "module Foo; 1; end" + formats "until 1\n2\nend" formats "until 1\n2\nend" + formats "def foo\n 1\n # Comment\n\n\nend" formats "def foo\n 1\n # Comment\n\n\nend" + formats "as? Foo" formats "as? Foo" + formats "case 1 \n when 2 ; 3 \n when 4 ; 5\nend" formats "case 1 \n when 2 ; 3 \n when 4 ; 5\nend" + formats "->@@foo.foo=" formats "->@@foo.foo=" + formats "foo : self? | A" formats "foo : self? | A" + formats "if 1\nif 2\n3 # foo\nend\nend" formats "if 1\nif 2\n3 # foo\nend\nend" + formats "foo &bar" formats "foo &bar" + formats "foo . responds_to?( :bar )" formats "foo . responds_to?( :bar )" + formats " <<-HTML\n foo\nHTML" formats " <<-HTML\n foo\nHTML" + formats "private def foo\nend\nprivate def bar\nend" formats "private def foo\nend\nprivate def bar\nend" + formats "def foo(\nx, #foo\nz #bar\n)\nend" formats "def foo(\nx, #foo\nz #bar\n)\nend" + formats "if a\n2\nelse\nend" formats "if a\n2\nelse\nend" + formats "String???" formats "String???" + formats ":&**" formats ":&**" + formats "foo x, self // 1" formats "foo x, self // 1" + formats "def foo(**z, &block)\nend" formats "def foo(**z, &block)\nend" + formats "alias A = ((B(C | D) | E) | F)" formats "alias A = ((B(C | D) | E) | F)" formats "a = b = 1\na, b =\n b, a" formats "a = b = 1\na, b =\n b, a" - formats "macro []=(x, y)\nend" formats "macro []=(x, y)\nend" - formats "macro foo\n %foo{x.id+2}\nend" formats "macro foo\n %foo{x.id+2}\nend" - formats " macro foo\n end\n\n :+" formats " macro foo\n end\n\n :+" - formats "foo : (F(A)) | D" formats "foo : (F(A)) | D" - formats "{ \"foo\" => 1 }" formats "{ \"foo\" => 1 }" - formats "foo(1, # foo\n &.bar)" formats "foo(1, # foo\n &.bar)" - formats "case 1 \n when .foo? \n 3 \n end" formats "case 1 \n when .foo? \n 3 \n end" - formats "[\n <<-EOF,\n foo\n EOF\n]" formats "[\n <<-EOF,\n foo\n EOF\n]" - formats "foo = 1\n->foo.foo=" formats "foo = 1\n->foo.foo=" - formats "while 1\n2\nend" formats "while 1\n2\nend" - formats "(1)" formats "(1)" - formats "+ a + d" formats "+ a + d" - formats "foo &.bar.responds_to?(:baz)" formats "foo &.bar.responds_to?(:baz)" - formats "->foo!" formats "->foo!" + formats "def foo(a : T) forall T \n #\nend" formats "def foo(a : T) forall T \n #\nend" + formats "1/2" formats "1/2" + formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" + formats ":|" formats ":|" + formats "macro foo( x , y )\nend" formats "macro foo( x , y )\nend" + formats "def foo(x) # bar\n # baz\nend" formats "def foo(x) # bar\n # baz\nend" + formats "\n # hello\n\n1" formats "\n # hello\n\n1" + formats "if 1\n2 && 3\nend" formats "if 1\n2 && 3\nend" + formats "macro foo\n {{\n1 + 2 }}\nend" formats "macro foo\n {{\n1 + 2 }}\nend" + formats "1 / 2" formats "1 / 2" + formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n bar => <<-BAR,\n bar\n BAR\n}" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n bar => <<-BAR,\n bar\n BAR\n}" + formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" + formats "foo({\nbar: 1,\n})" formats "foo({\nbar: 1,\n})" + formats "unless a\n2\nelse\n3\nend" formats "unless a\n2\nelse\n3\nend" + formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" + formats "def foo(x) : Int32 # bar\n # baz\nend" formats "def foo(x) : Int32 # bar\n # baz\nend" + formats "{ {1 => 2} }" formats "{ {1 => 2} }" + formats "-> : Int32? {}" formats "-> : Int32? {}" + formats "[\n] of \n Foo " formats "[\n] of \n Foo " + formats "if 1\nelse\n# nothing\nend" formats "if 1\nelse\n# nothing\nend" + formats "foo.[1, 2] = 3" formats "foo.[1, 2] = 3" + formats "x : Int32[ 8 ]" formats "x : Int32[ 8 ]" + formats "1 ?\n 2 : \n 3" formats "1 ?\n 2 : \n 3" + formats "1234 # foo\n1 # bar" formats "1234 # foo\n1 # bar" + formats "struct Foo(T)\n# bar\n1\nend" formats "struct Foo(T)\n# bar\n1\nend" + formats "foo &.responds_to?(:foo)" formats "foo &.responds_to?(:foo)" + formats "foo . is_a? ( Bar )" formats "foo . is_a? ( Bar )" + formats "{% if true %}\n # x\n{% end %}" formats "{% if true %}\n # x\n{% end %}" + formats "macro foo\nend" formats "macro foo\nend" formats "1\n\n2" formats "1\n\n2" - formats "def foo()\n1\nend" formats "def foo()\n1\nend" - formats "&+ 1" formats "&+ 1" - formats "::foo(1, 2)" formats "::foo(1, 2)" - formats "lib Foo\n fun foo =\n bar(Int32,\n Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32,\n Int32) : Int32\nend" - formats "macro foo\n if 1\n 1 + 2\n end\nend" formats "macro foo\n if 1\n 1 + 2\n end\nend" - formats "foo x: 1, y: 2" formats "foo x: 1, y: 2" - formats "if 1\n node.is_a?(T)\nend" formats "if 1\n node.is_a?(T)\nend" - formats "macro foo=(x)\nend" formats "macro foo=(x)\nend" - formats "next 1 , *2" formats "next 1 , *2" - formats "foo(1 &- 2)" formats "foo(1 &- 2)" - formats "$1.bar" formats "$1.bar" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] @[MyAnn] baz,\n @[MyAnn]\n @[MyAnn]\n biz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] @[MyAnn] baz,\n @[MyAnn]\n @[MyAnn]\n biz\n); end" - formats "{% if z %}\n 1\n{% end %}\n\ndef foo\n z =\n 123 + # foo\n 4 # bar\n\n 1\nend" formats "{% if z %}\n 1\n{% end %}\n\ndef foo\n z =\n 123 + # foo\n 4 # bar\n\n 1\nend" - formats "foo.@bar" formats "foo.@bar" - formats "x = {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}" formats "x = {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}" - formats "class Foo\nx = 1\nend" formats "class Foo\nx = 1\nend" - formats "->@@foo.foo" formats "->@@foo.foo" - formats "a &.b.as C" formats "a &.b.as C" - formats "break { {1, 2}, {3, 4} }" formats "break { {1, 2}, {3, 4} }" - formats "foo[ 1 , 2 ]" formats "foo[ 1 , 2 ]" - formats "asm(\n\"nop\"\n)" formats "asm(\n\"nop\"\n)" - formats "-> :: foo!" formats "-> :: foo!" - formats "1_234" formats "1_234" - formats "foo do\n {% foo <<-X\n bar\n X\n %}\nend" formats "foo do\n {% foo <<-X\n bar\n X\n %}\nend" - formats "foo . bar = 1" formats "foo . bar = 1" - formats "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" - formats "foo[x: 1, &.bar] = 1" formats "foo[x: 1, &.bar] = 1" - formats "macro foo\n {% for value, i in values %}\\\n {% if true %}\\\n {% end %}\\\n {{ 1 }}/\n {% end %}\\\nend\n\n{\n 1 => 2,\n 1234 => 5,\n}\n" formats "macro foo\n {% for value, i in values %}\\\n {% if true %}\\\n {% end %}\\\n {{ 1 }}/\n {% end %}\\\nend\n\n{\n 1 => 2,\n 1234 => 5,\n}\n" - formats "def bar\n foo(<<-X,\n a\n X\n 1)\nend" formats "def bar\n foo(<<-X,\n a\n X\n 1)\nend" - formats "<<-FOO\nfoobar\nFOO" formats "<<-FOO\nfoobar\nFOO" - formats "if 1;\n2;\nelsif 3;\n4;\nend" formats "if 1;\n2;\nelsif 3;\n4;\nend" - formats "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" formats "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" - formats "foo.as?(T).bar" formats "foo.as?(T).bar" - formats "foo(\"bar\" \\\n\"baz\")" formats "foo(\"bar\" \\\n\"baz\")" - formats "def foo\n 1\nend\n\n# Comment\n\ndef bar\n 2\nend" formats "def foo\n 1\nend\n\n# Comment\n\ndef bar\n 2\nend" - formats "if 1;\n2;\nelse;\n3;\nend" formats "if 1;\n2;\nelse;\n3;\nend" - formats "1.>=() { 3 }" formats "1.>=() { 3 }" - formats "a = case 1\nwhen 2\n3\nelse\n4\nend" formats "a = case 1\nwhen 2\n3\nelse\n4\nend" - formats "x = a do\n 1 ||\n 2\nend" formats "x = a do\n 1 ||\n 2\nend" - formats "1 ... 2" formats "1 ... 2" - formats "x : Int32*" formats "x : Int32*" - formats "[\n 1, 2, # foo\n 3,\n]" formats "[\n 1, 2, # foo\n 3,\n]" - formats "asm(\"nop\")" formats "asm(\"nop\")" - formats "%{hello}" formats "%{hello}" - formats "lib Bar\n enum Foo\n A\n end\nend" formats "lib Bar\n enum Foo\n A\n end\nend" - formats "1 || 2" formats "1 || 2" - formats "def foo ( x : self ) \n end" formats "def foo ( x : self ) \n end" + formats "foo(\n# x\n1,\n\n# y\nz: 2,\n\n# a\nb: 3)" formats "foo(\n# x\n1,\n\n# y\nz: 2,\n\n# a\nb: 3)" + formats " {% begin %} 2 {% end %}" formats " {% begin %} 2 {% end %}" + formats "foo \\\n 1,\n 2" formats "foo \\\n 1,\n 2" + formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" + formats "p = Foo[\n 1, 2, 3,\n 4, 5, 6\n]\n" formats "p = Foo[\n 1, 2, 3,\n 4, 5, 6\n]\n" + formats "unless a\nunless b\nelse\n4\nend\nend" formats "unless a\nunless b\nelse\n4\nend\nend" formats "fun foo(\n x : Int32,\n ...\n) : Int32\n 1\nend" formats "fun foo(\n x : Int32,\n ...\n) : Int32\n 1\nend" - formats "->@foo.foo=" formats "->@foo.foo=" - formats "@[Foo]\ndef foo\nend" formats "@[Foo]\ndef foo\nend" - formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" - formats "alias Foo=\nBar" formats "alias Foo=\nBar" - formats "while 1 # foo\n # bar\n 2\nend" formats "while 1 # foo\n # bar\n 2\nend" - formats "return {1, 2}, {3, 4}" formats "return {1, 2}, {3, 4}" - formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" - formats "foo : StaticArray(Foo, 12)[34]" formats "foo : StaticArray(Foo, 12)[34]" - formats "foo[x: 1, &.bar] ||= 1" formats "foo[x: 1, &.bar] ||= 1" - formats "module Moo ( T )\nend" formats "module Moo ( T )\nend" - formats "-> : {Int32} { String }" formats "-> : {Int32} { String }" - formats ":<<" formats ":<<" - formats " ((1) + 2)" formats " ((1) + 2)" - formats "->{}" formats "->{}" - formats "def foo(**b, # comment\n &block)\nend" formats "def foo(**b, # comment\n &block)\nend" - formats "foo \\\n foo: 1,\n bar: 2" formats "foo \\\n foo: 1,\n bar: 2" - formats "foo(/ /)" formats "foo(/ /)" - formats "def foo\n {% for x in y %}\n foo + bar\n {% end %}\nend" formats "def foo\n {% for x in y %}\n foo + bar\n {% end %}\nend" - formats "x : Int32**" formats "x : Int32**" - formats "case 1 \n when 2 then \n 3 \n end" formats "case 1 \n when 2 then \n 3 \n end" - formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" - formats "case 1\nwhen 8 then 1\nwhen 16 then 2\nwhen 256 then 3\nwhen 'a' then 5\nwhen \"foo\" then 6\nelse 4\nend" formats "case 1\nwhen 8 then 1\nwhen 16 then 2\nwhen 256 then 3\nwhen 'a' then 5\nwhen \"foo\" then 6\nelse 4\nend" - formats "x : {A, B}" formats "x : {A, B}" - formats "1\n..\n2" formats "1\n..\n2" - formats "foo 1 , 2" formats "foo 1 , 2" - formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" - formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" - formats "break {1, 2}, 3" formats "break {1, 2}, 3" - formats "{ {{FOO}}, nil}" formats "{ {{FOO}}, nil}" - formats "foo . responds_to? :bar" formats "foo . responds_to? :bar" - formats "a(&.b.c.as(C))" formats "a(&.b.c.as(C))" - formats "foo(->do\n 1 + 2\nend)" formats "foo(->do\n 1 + 2\nend)" - formats "foo" formats "foo" - formats "foo(\n 1,\n) {\n 2\n}" formats "foo(\n 1,\n) {\n 2\n}" - formats "Foo" formats "Foo" - formats "def foo ( x , y ) \n end" formats "def foo ( x , y ) \n end" - formats "def foo\nend\n\ndef bar\nend\n\n# foo" formats "def foo\nend\n\ndef bar\nend\n\n# foo" - formats "0u64" formats "0u64" - formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" - formats "unless a\nelse\n2\nend" formats "unless a\nelse\n2\nend" - formats "1 #foo \n2 #bar" formats "1 #foo \n2 #bar" - formats ":-" formats ":-" - formats "foo &.nil?()" formats "foo &.nil?()" - formats "1\n2\n# foo" formats "1\n2\n# foo" - formats "foo &.[]?( 1, 2 )" formats "foo &.[]?( 1, 2 )" - formats "a&+1" formats "a&+1" - formats "x : (A -> B)?" formats "x : (A -> B)?" - formats "def a\n {\n 1, # x\n # y\n }\nend" formats "def a\n {\n 1, # x\n # y\n }\nend" - formats "macro foo\n %foo{x,y}\nend" formats "macro foo\n %foo{x,y}\nend" - formats "foo(//, //)" formats "foo(//, //)" - formats "def foo(\n **a\n # comment\n)\n 1\nend" formats "def foo(\n **a\n # comment\n)\n 1\nend" - formats "foo(1,\n2,\n)" formats "foo(1,\n2,\n)" - formats "def foo( x , * y )\nend" formats "def foo( x , * y )\nend" - formats "return { 1 , 2 }" formats "return { 1 , 2 }" - formats "unless a\n2; 3\nelse\n3\nend" formats "unless a\n2; 3\nelse\n3\nend" - formats "foo(A |\nB |\nC)" formats "foo(A |\nB |\nC)" - formats "foo \"bar\": 1, \"baz qux\": 2" formats "foo \"bar\": 1, \"baz qux\": 2" - formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" - formats "asm(\"a\" :::: \"volatile\"\n)" formats "asm(\"a\" :::: \"volatile\"\n)" + formats "foo &.[]( 1, 2 )" formats "foo &.[]( 1, 2 )" + formats "nil?" formats "nil?" + formats "foo[&.bar] = 1" formats "foo[&.bar] = 1" + formats "{ {% begin %}1{% end %}, nil }" formats "{ {% begin %}1{% end %}, nil }" + formats "foo ()" formats "foo ()" + formats "1.as Int32" formats "1.as Int32" + formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" + formats "begin\n #hola\n 1\nend\n" formats "begin\n #hola\n 1\nend\n" formats "lib Foo\nfun foo : Int32\nend" formats "lib Foo\nfun foo : Int32\nend" - formats "alias Foo::Bar =Baz" formats "alias Foo::Bar =Baz" - formats " <<-EOF\n 1\nEOF" formats " <<-EOF\n 1\nEOF" - formats "def foo \n end" formats "def foo \n end" - formats "->Foo.foo!" formats "->Foo.foo!" - formats "foo(\"bar\": 1, \"baz qux\": 2)" formats "foo(\"bar\": 1, \"baz qux\": 2)" - formats "macro foo(\n a,\n **b,\n)\nend" formats "macro foo(\n a,\n **b,\n)\nend" - formats "def %(x)\n 1\nend" formats "def %(x)\n 1\nend" - formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" - formats "1 ensure 2" formats "1 ensure 2" - formats " {{\n1 + 2\n }}" formats " {{\n1 + 2\n }}" - formats " {{ 1 + 2 }}" formats " {{ 1 + 2 }}" - formats " {% for x in y %} 2 {% end %}" formats " {% for x in y %} 2 {% end %}" - formats "foo.[ 1 , 2 ]" formats "foo.[ 1 , 2 ]" - formats "->{}" formats "->{}" - formats "begin\n1\nrescue ex\n3\nend" formats "begin\n1\nrescue ex\n3\nend" - formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" - formats "case 1\nwhen 2\n\n#comment\nend" formats "case 1\nwhen 2\n\n#comment\nend" - formats "foo = 1\n->foo.[](Int32)" formats "foo = 1\n->foo.[](Int32)" - formats "def foo(\n **a\n)\n 1\nend" formats "def foo(\n **a\n)\n 1\nend" - formats "if a\nif b\nelse\n4\nend\nend" formats "if a\nif b\nelse\n4\nend\nend" - formats "class Foo ( T )\nend" formats "class Foo ( T )\nend" - formats "lib Foo\nfun foo\nend" formats "lib Foo\nfun foo\nend" - formats "<<-FOO\nfoo\nfoo\nFOO" formats "<<-FOO\nfoo\nfoo\nFOO" - formats "def foo\n1\n2\n# foo\nend" formats "def foo\n1\n2\n# foo\nend" - formats "foo\n \nbar" formats "foo\n \nbar" - formats "return { {1, 2}, {3, 4} }" formats "return { {1, 2}, {3, 4} }" - formats "-> : Int32 {}" formats "-> : Int32 {}" - formats "a = 1\nb, c = 2, 3\n{% begin %}\n a |= 1\n b |= 2\n c |= 3\n{% end %}" formats "a = 1\nb, c = 2, 3\n{% begin %}\n a |= 1\n b |= 2\n c |= 3\n{% end %}" - formats "foo : Foo*****" formats "foo : Foo*****" - formats "/foo \#{ bar }/" formats "/foo \#{ bar }/" - formats "def foo(x)\n {% if true %}\n # comment\n Foo = 1\n B = 2\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n # comment\n Foo = 1\n B = 2\n {% end %}\nend" + formats "next( *1 , *2 )" formats "next( *1 , *2 )" + formats "@@a" formats "@@a" + formats "class Foo\nx = 1\nend" formats "class Foo\nx = 1\nend" + formats "asm(\"nop\" :::: \"volatile\" )" formats "asm(\"nop\" :::: \"volatile\" )" + formats "\"foo \#{ 1 } \#{ __DIR__ }\"" formats "\"foo \#{ 1 } \#{ __DIR__ }\"" + formats "foo[x: 1, &.bar]" formats "foo[x: 1, &.bar]" formats "'\\u{0123}'" formats "'\\u{0123}'" + formats "next 1, {2, 3}" formats "next 1, {2, 3}" + formats "macro foo\n %foo{x.id+2}\nend" formats "macro foo\n %foo{x.id+2}\nend" formats "def foo( x , & block : Int32 )\nend" formats "def foo( x , & block : Int32 )\nend" - formats "true" formats "true" - formats "foo = [1, [2,\n 3],\n 4]" formats "foo = [1, [2,\n 3],\n 4]" - formats "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" formats "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" - formats "yield (1).foo" formats "yield (1).foo" - formats "case 1\nend" formats "case 1\nend" - formats "{% if true %}\n # x\n #\n{% end %}\n\n# ```\n# x\n# ```" formats "{% if true %}\n # x\n #\n{% end %}\n\n# ```\n# x\n# ```" - formats "foo &.bar.as(T)" formats "foo &.bar.as(T)" - formats "Foo:: Bar" formats "Foo:: Bar" - formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" - formats "1 / 2" formats "1 / 2" - formats "foo do;\n1; end" formats "foo do;\n1; end" - formats "def foo ( ) \n1\nend" formats "def foo ( ) \n1\nend" - formats "[] of Int32\n1" formats "[] of Int32\n1" - formats "enum Foo : Int32\nA = 1\nend" formats "enum Foo : Int32\nA = 1\nend" - formats "foo(baz(x, y) do\n 1 + 2\nend)" formats "foo(baz(x, y) do\n 1 + 2\nend)" - formats "1\n.." formats "1\n.." - formats "a &.b.c.as C" formats "a &.b.c.as C" - formats "unless a\n # hello\n 2\nend" formats "unless a\n # hello\n 2\nend" - formats "-> :: Foo . foo" formats "-> :: Foo . foo" - formats "case 1 \n when 2 ,\n 3 \n 4 \n end" formats "case 1 \n when 2 ,\n 3 \n 4 \n end" - formats "1.[]= do\nend" formats "1.[]= do\nend" - formats "[ # foo\n 1,\n]" formats "[ # foo\n 1,\n]" - formats " {%\na = 1\n %}" formats " {%\na = 1\n %}" - formats "def foo(a, **b : Int32)\nend" formats "def foo(a, **b : Int32)\nend" - formats "%i(one two three)" formats "%i(one two three)" - formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" - formats " case 1\n when 2\n 3\n else #:newline, :eof\n 1 if 2\n return 3\n end\n" formats " case 1\n when 2\n 3\n else #:newline, :eof\n 1 if 2\n return 3\n end\n" - formats "1 + \n2" formats "1 + \n2" - formats "b &.[c]?.d" formats "b &.[c]?.d" - formats "return 1" formats "return 1" - formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" - formats "enum E\n A # hello\n B # hello; C # hello\nend" formats "enum E\n A # hello\n B # hello; C # hello\nend" - formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" - formats "macro [](x)\nend" formats "macro [](x)\nend" - formats "a = 1\n;\nb = 2" formats "a = 1\n;\nb = 2" - formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" - formats "1 > 2" formats "1 > 2" - formats "enum Foo; A = 1; end" formats "enum Foo; A = 1; end" - formats "a = foo(bar([\n 1,\n]))" formats "a = foo(bar([\n 1,\n]))" - formats "a.!" formats "a.!" - formats "class Foo # foo\nend" formats "class Foo # foo\nend" - formats "1 == / /" formats "1 == / /" - formats "def foo ( x : Foo.class ) \n end" formats "def foo ( x : Foo.class ) \n end" - formats "if 1\nelse\n# nothing\nend" formats "if 1\nelse\n# nothing\nend" - formats "macro flags\n {% if 1 %}\\\n 1 {% else %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n 1 {% else %}\\\n {% end %}\\\nend" - formats "foo = 1\n->foo.[]=(Int32)" formats "foo = 1\n->foo.[]=(Int32)" - formats "<<-FOO\nfoo\nFOO" formats "<<-FOO\nfoo\nFOO" - formats "x 1, \\\n 2" formats "x 1, \\\n 2" + formats "x = <<-EOF\n 1\nEOF" formats "x = <<-EOF\n 1\nEOF" + formats "x.try &.[]= 123, 456" formats "x.try &.[]= 123, 456" + formats "1 + \\\n2 + \\\n3" formats "1 + \\\n2 + \\\n3" + formats "(1 .. )" formats "(1 .. )" + formats "begin\n / /\nend" formats "begin\n / /\nend" + formats "x : Int32*" formats "x : Int32*" + formats "@a" formats "@a" + formats "foo (1)" formats "foo (1)" + formats "[1, 2, 3]" formats "[1, 2, 3]" + formats "def a\n [\n 1, # x\n # y\n ]\nend" formats "def a\n [\n 1, # x\n # y\n ]\nend" + formats "a = foo(bar(\n 1,\n 2,\n))" formats "a = foo(bar(\n 1,\n 2,\n))" + formats "- 1" formats "- 1" + formats "{%\n if 1\n 2\n end\n%}" formats "{%\n if 1\n 2\n end\n%}" + formats "\"\\a\\c\\b\\d\"" formats "\"\\a\\c\\b\\d\"" formats "def //(x)\n 1\nend" formats "def //(x)\n 1\nend" - formats " [ 1 , 2 , 3 ] " formats " [ 1 , 2 , 3 ] " - formats "case\n# hello\nwhen 1\n 2\nend" formats "case\n# hello\nwhen 1\n 2\nend" - formats "%" formats "%" - formats "a(&.b.c.as C)" formats "a(&.b.c.as C)" - formats "foo(\n a: 1,\n b: 2,\n )\n" formats "foo(\n a: 1,\n b: 2,\n )\n" - formats "1 && 2" formats "1 && 2" - formats "def foo(x, *, z)\nend" formats "def foo(x, *, z)\nend" - formats "enum Foo;end" formats "enum Foo;end" - formats "begin 0[1] rescue 2 end" formats "begin 0[1] rescue 2 end" - formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" - formats "break( *1 , *2 )" formats "break( *1 , *2 )" + formats "a = 1 + # foo\n2" formats "a = 1 + # foo\n2" + formats "def foo(@[MyAnn] & : String -> Nil); end" formats "def foo(@[MyAnn] & : String -> Nil); end" + formats "def foo(@[MyAnn] &); end" formats "def foo(@[MyAnn] &); end" + formats "def foo(\n a,\n b,\n)\nend" formats "def foo(\n a,\n b,\n)\nend" + formats "-> { 1 }" formats "-> { 1 }" + formats "foo(1, # foo\n &.bar)" formats "foo(1, # foo\n &.bar)" + formats "break *1 ,2" formats "break *1 ,2" + formats "{% if true %}\n # x\n # y\n{% end %}" formats "{% if true %}\n # x\n # y\n{% end %}" + formats "break { 1 , 2 }" formats "break { 1 , 2 }" + formats "select \n when foo \n 2 \n when bar \n 3 \n end" formats "select \n when foo \n 2 \n when bar \n 3 \n end" + formats "{ 1 => 2 ,\n\n 3 => 4 }" formats "{ 1 => 2 ,\n\n 3 => 4 }" + formats "__LINE__" formats "__LINE__" + formats "foo { | a, ( _ , c ) | a + c }" formats "foo { | a, ( _ , c ) | a + c }" + formats "NamedTuple(\n a: Int32,)" formats "NamedTuple(\n a: Int32,)" + formats "def execute\n begin\n 1\n ensure\n 2\n end\n 3\nend" formats "def execute\n begin\n 1\n ensure\n 2\n end\n 3\nend" + formats "case 1\nwhen 2\n#comment\nend" formats "case 1\nwhen 2\n#comment\nend" + formats "foo &.[]?(1, 2)" formats "foo &.[]?(1, 2)" + formats "break( 1 , 2 )" formats "break( 1 , 2 )" + formats "def foo(**z)\nend" formats "def foo(**z)\nend" + formats "foo { | a, ( b , c, ), | a + b + c }" formats "foo { | a, ( b , c, ), | a + b + c }" + formats "yield" formats "yield" + formats "foo : self?" formats "foo : self?" + formats "case 1\nend" formats "case 1\nend" + formats "def foo\n@x = uninitialized Int32\nend" formats "def foo\n@x = uninitialized Int32\nend" + formats "if 1 &&\n2 &&\n3\n4\nend" formats "if 1 &&\n2 &&\n3\n4\nend" + formats "1.!= { 3 }" formats "1.!= { 3 }" assert assert - formats "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" formats "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" - formats "{ 1 => 2 }" formats "{ 1 => 2 }" - formats "foo a , **b" formats "foo a , **b" - formats "<<-HTML\n \#{__FILE__}\n HTML" formats "<<-HTML\n \#{__FILE__}\n HTML" - formats "foo : (String -> String?) | (String)" formats "foo : (String -> String?) | (String)" - formats "begin\n #hola\n 1\nend\n" formats "begin\n #hola\n 1\nend\n" - formats "\"hel\\nlo\"" formats "\"hel\\nlo\"" - formats "a = case 1\n when 1, # 1\n 2, # 2\n 3 # 3\n 1\n end" formats "a = case 1\n when 1, # 1\n 2, # 2\n 3 # 3\n 1\n end" - formats " [ 1, \n 2 , \n 3 ] " formats " [ 1, \n 2 , \n 3 ] " + formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" + formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" + formats "getter foo # comment\n\ndef foo\nend" formats "getter foo # comment\n\ndef foo\nend" + formats "begin\n1 ? 2 : 3\nend" formats "begin\n1 ? 2 : 3\nend" + formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" + formats "-> : Int32[1] {}" formats "-> : Int32[1] {}" + formats "-> : {x: Int32, y: String} {}" formats "-> : {x: Int32, y: String} {}" + formats "module Ton\n macro foo\n class {{name.id}}\n end\n end\nend" formats "module Ton\n macro foo\n class {{name.id}}\n end\n end\nend" + formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\n # comment\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\n # comment\nend" + formats "foo 1 , 2" formats "foo 1 , 2" formats "-> :: Foo . foo!" formats "-> :: Foo . foo!" - formats "foo : self? | A" formats "foo : self? | A" - formats "->do\nx\nend" formats "->do\nx\nend" - formats "while / /\nend" formats "while / /\nend" - formats "@x[ 1 ] += 2" formats "@x[ 1 ] += 2" - formats "case 1 \n when 2 , 3 \n 4 \n end" formats "case 1 \n when 2 , 3 \n 4 \n end" - formats "foo(1, &.bar)" formats "foo(1, &.bar)" - formats "def foo(x, *, y, **z)\nend" formats "def foo(x, *, y, **z)\nend" - formats "def foo( & block )\nend" formats "def foo( & block )\nend" - formats "coco.lala\nfoo\n .bar" formats "coco.lala\nfoo\n .bar" - formats "foo.bar = \n1" formats "foo.bar = \n1" - formats "def foo\n 1\n #\n\n\nrescue\nend" formats "def foo\n 1\n #\n\n\nrescue\nend" - formats "foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n})" formats "foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n})" - formats "foo(&.bar)" formats "foo(&.bar)" - formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" - formats "a &.b.c.as(C)" formats "a &.b.c.as(C)" - formats "->( x )\n:\nInt32 { }" formats "->( x )\n:\nInt32 { }" - formats "$0" formats "$0" - formats "1 ||\n # foo\n 2" formats "1 ||\n # foo\n 2" - formats "p = Foo[\n 1, 2, 3,\n 4, 5, 6\n]\n" formats "p = Foo[\n 1, 2, 3,\n 4, 5, 6\n]\n" - formats "begin\n 1\n # Comment\n\n\nend" formats "begin\n 1\n # Comment\n\n\nend" - formats "1" formats "1" - formats "macro foo\n 1 + 2\nend" formats "macro foo\n 1 + 2\nend" - formats "def foo(@[MyAnn] & : String -> Nil); end" formats "def foo(@[MyAnn] & : String -> Nil); end" - formats "foo.[ 1, 2 ]?" formats "foo.[ 1, 2 ]?" + formats "foo{|x|\n x}" formats "foo{|x|\n x}" formats "{ %() }" formats "{ %() }" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" - formats "lib Foo\nfun foo () : Int32\nend" formats "lib Foo\nfun foo () : Int32\nend" - formats "a = if 1\n2\nelsif 3\n4\nend" formats "a = if 1\n2\nelsif 3\n4\nend" - formats "case / /\nwhen /x/, / /\n / /\nend" formats "case / /\nwhen /x/, / /\n / /\nend" - formats "abstract def foo \n 1" formats "abstract def foo \n 1" - formats "class Foo\n def foo\n # nothing\n end\nend" formats "class Foo\n def foo\n # nothing\n end\nend" - formats "class Foo\n macro foo\n 1 + 2 \n end\n end" formats "class Foo\n macro foo\n 1 + 2 \n end\n end" - formats "foo (1).bar" formats "foo (1).bar" - formats "->@foo.foo?" formats "->@foo.foo?" - formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" + formats "foo[x: 1, &.bar] = 1" formats "foo[x: 1, &.bar] = 1" + formats "a-1" formats "a-1" + formats ":>>" formats ":>>" + formats "begin\n 1 \\\n + 2\n 3\nend" formats "begin\n 1 \\\n + 2\n 3\nend" + formats "foo[&.bar] ||= 1" formats "foo[&.bar] ||= 1" + formats "{%\n if true\n 1\n else\n 2\n end\n%}" formats "{%\n if true\n 1\n else\n 2\n end\n%}" + formats "@[Foo]\ndef foo\nend" formats "@[Foo]\ndef foo\nend" + formats "<<-HTML\n foo\n \#{\"foo\"}\n HTML" formats "<<-HTML\n foo\n \#{\"foo\"}\n HTML" formats "def foo\n1\nrescue\n2\nend" formats "def foo\n1\nrescue\n2\nend" - formats "-> : Int32[1] {}" formats "-> : Int32[1] {}" - formats "foo.bar += \n1" formats "foo.bar += \n1" - formats "[\n] of \n Foo " formats "[\n] of \n Foo " - formats "alias Foo::Bar=Baz" formats "alias Foo::Bar=Baz" - formats "\"\\a\\c\\b\\d\"" formats "\"\\a\\c\\b\\d\"" - formats "# Hello\n#\n# ```\n# puts 1+2 # bye\n# 1+2 # hello\n#\n# 1+2\n# ```\n\n# ```\n# puts 1+2\n\n# ```\n# puts 1+2\n\n# Hola\n#\n# 1+2\n# foo do\n# 3+4\n# end\n\n# Hey\n#\n# 1+2\n# foo do\n# 3+4\n# end\n#\n# ```\n# 1+2\n# ```\n#\n# 1+2\n#\n# Bye\n" formats "# Hello\n#\n# ```\n# puts 1+2 # bye\n# 1+2 # hello\n#\n# 1+2\n# ```\n\n# ```\n# puts 1+2\n\n# ```\n# puts 1+2\n\n# Hola\n#\n# 1+2\n# foo do\n# 3+4\n# end\n\n# Hey\n#\n# 1+2\n# foo do\n# 3+4\n# end\n#\n# ```\n# 1+2\n# ```\n#\n# 1+2\n#\n# Bye\n" - formats "next { {1, 2}, {3, 4} }, 5" formats "next { {1, 2}, {3, 4} }, 5" - formats "@x[ 1 ] &&= 2" formats "@x[ 1 ] &&= 2" - formats "def foo(x)\n {% if true %}\n x = x + 2\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n x = x + 2\n {% end %}\nend" - formats "/ /" formats "/ /" - formats "module M\n @[MyAnn(\n 1\n\n )]\nend" formats "module M\n @[MyAnn(\n 1\n\n )]\nend" - formats "1.[]=(2) { 3 }" formats "1.[]=(2) { 3 }" - formats "a &.b.as(C)" formats "a &.b.as(C)" - formats "abstract def foo\nabstract def bar" formats "abstract def foo\nabstract def bar" - formats "foo &.bar do\n 1 + 2\nend" formats "foo &.bar do\n 1 + 2\nend" - formats "unless a\n2\nelse\n3\nend" formats "unless a\n2\nelse\n3\nend" - formats "foo.bar. as? Int32" formats "foo.bar. as? Int32" - formats "break { {1, 2}, {3, 4} }, 5" formats "break { {1, 2}, {3, 4} }, 5" - formats "@@a" formats "@@a" - formats "unless a\nunless b\nelse\n4\nend\nend" formats "unless a\nunless b\nelse\n4\nend\nend" - formats "->(x : Int32) {}" formats "->(x : Int32) {}" - formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" - formats "if 1\n2 && 3\nend" formats "if 1\n2 && 3\nend" - formats "{ # foo\n 1 => 2,\n}" formats "{ # foo\n 1 => 2,\n}" - formats "{ A: 1 }\n" formats "{ A: 1 }\n" - formats "def foo\nend;def bar\nend" formats "def foo\nend;def bar\nend" + formats " 1" formats " 1" + formats "foo[ 1, 2 ]?" formats "foo[ 1, 2 ]?" + formats "foo(1 &- 2)" formats "foo(1 &- 2)" + formats "def foo(a,\n *b)\nend" formats "def foo(a,\n *b)\nend" + formats "::Tuple(T)" formats "::Tuple(T)" + formats "if 1\n1\n\n# foo\nend" formats "if 1\n1\n\n# foo\nend" + formats "foo : (Array(String)?) | String" formats "foo : (Array(String)?) | String" + formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" + formats "1 if 2" formats "1 if 2" + formats "1 && (\n 2 || 3\n)" formats "1 && (\n 2 || 3\n)" + formats "a, b = \nif 1\n2\nend" formats "a, b = \nif 1\n2\nend" + formats "macro foo\n macro bar\n \\{% begin %}\n \\\\{% puts %}\n \\{% end %}\n end\nend" formats "macro foo\n macro bar\n \\{% begin %}\n \\\\{% puts %}\n \\{% end %}\n end\nend" + formats "Foo::Bar(T, U?)?" formats "Foo::Bar(T, U?)?" + formats "break 1" formats "break 1" + formats "return {1, 2}, 3" formats "return {1, 2}, 3" + formats "class Foo ( *T, U )\nend" formats "class Foo ( *T, U )\nend" + formats "{/ / => / /, / / => / /}" formats "{/ / => / /, / / => / /}" + formats "foo 1 , &bar" formats "foo 1 , &bar" + formats "%r(foo \#{ bar })" formats "%r(foo \#{ bar })" + formats "module Foo ( U, *T ); 1; end" formats "module Foo ( U, *T ); 1; end" + formats "@x &&= 1" formats "@x &&= 1" + formats "def a\n b(\n 1, # x\n # y\n )\nend" formats "def a\n b(\n 1, # x\n # y\n )\nend" + formats "foo a , **b" formats "foo a , **b" + formats "next *1 ,2" formats "next *1 ,2" + formats "def foo(a : T) forall T\n #\n\nend" formats "def foo(a : T) forall T\n #\n\nend" + formats "x = 1\nx += 1" formats "x = 1\nx += 1" + formats "foo do | x | \n x \n end" formats "foo do | x | \n x \n end" + formats "1*2" formats "1*2" + formats "{% verbatim do %}{{1}} + {{2}}{% end %}" formats "{% verbatim do %}{{1}} + {{2}}{% end %}" + formats "{% if flag?(:freebsd) %}\n 1 + 2\n{% end %}\n\ncase x\nwhen 1234 then 1\nelse x\nend" formats "{% if flag?(:freebsd) %}\n 1 + 2\n{% end %}\n\ncase x\nwhen 1234 then 1\nelse x\nend" + formats "foo(1, ) { }" formats "foo(1, ) { }" + formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" + formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" + formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" + formats "1\n..2" formats "1\n..2" + formats "Foo::Bar?" formats "Foo::Bar?" + formats "foo { | a, ( b , c ) | a + b + c }" formats "foo { | a, ( b , c ) | a + b + c }" + formats "is_a? Foo" formats "is_a? Foo" + formats "begin\n1\nrescue Int32 \n3\nend" formats "begin\n1\nrescue Int32 \n3\nend" + formats "return( 1 )" formats "return( 1 )" + formats "1.<= { 3 }" formats "1.<= { 3 }" + formats "foo(\n 1, # hola\n2, # chau\n )" formats "foo(\n 1, # hola\n2, # chau\n )" + gives proper line number in syntax error inside macro gives proper line number in syntax error inside macro + formats "asm(\"nop\" :: \"r\"(0))" formats "asm(\"nop\" :: \"r\"(0))" + formats "foo(\n 1,\n # 2,\n 3,\n)" formats "foo(\n 1,\n # 2,\n 3,\n)" + formats "foo({\n 1 => 2,\n 3 => {\n 4 => 5,\n },\n})" formats "foo({\n 1 => 2,\n 3 => {\n 4 => 5,\n },\n})" + formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n foo => true,\n}" formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n foo => true,\n}" + formats "inner &.color=(@color)\n1" formats "inner &.color=(@color)\n1" + formats "1&+2&*3" formats "1&+2&*3" + formats "-> : {Int32} { String }" formats "-> : {Int32} { String }" + formats "as Foo" formats "as Foo" + formats "class Foo\n # ```\n # 1\n # ```\nend\n" formats "class Foo\n # ```\n # 1\n # ```\nend\n" + formats "break {1, 2}, {3, 4}" formats "break {1, 2}, {3, 4}" + formats "{ {1, 2, 3} }" formats "{ {1, 2, 3} }" + formats "+ 1" formats "+ 1" + formats "a &.!" formats "a &.!" + formats "x = uninitialized Int32" formats "x = uninitialized Int32" + formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" + formats "<<-FOO\nFOO" formats "<<-FOO\nFOO" + formats "macro foo( x = 1, y = 2, &block)\nend" formats "macro foo( x = 1, y = 2, &block)\nend" formats "begin\n array[\n 0, # Zero\n ]\nend" formats "begin\n array[\n 0, # Zero\n ]\nend" - formats "a = if 1\n2\nelse\n3\nend" formats "a = if 1\n2\nelse\n3\nend" - formats "A = 1\nFOO = 2\n\nEX = 3" formats "A = 1\nFOO = 2\n\nEX = 3" - formats "def foo(a,\n &block)\nend" formats "def foo(a,\n &block)\nend" - formats "-> :: Foo . foo?" formats "-> :: Foo . foo?" - formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" + formats "a.b &.[c]?\n1" formats "a.b &.[c]?\n1" + formats "foo(\n a: 1,\n b: 2,\n )\n" formats "foo(\n a: 1,\n b: 2,\n )\n" + formats "1 && # foo\n 2 &&\n 3" formats "1 && # foo\n 2 &&\n 3" + formats "foo(1, &.bar)" formats "foo(1, &.bar)" + formats "def foo\nend\ndef bar\nend" formats "def foo\nend\ndef bar\nend" + formats "break 1 , *2" formats "break 1 , *2" + formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" + formats "\"\#{\n foo = 1\n}\"" formats "\"\#{\n foo = 1\n}\"" + formats "unless a\nunless b\n3\nelse\n4\nend\nend" formats "unless a\nunless b\n3\nelse\n4\nend\nend" + formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" + formats "@foo : Int32 # comment\n\ndef foo\nend" formats "@foo : Int32 # comment\n\ndef foo\nend" + formats "foo(1, / /)" formats "foo(1, / /)" + formats "lib Foo\n fun Bar\nend" formats "lib Foo\n fun Bar\nend" + formats "begin\n a\nend.b { }\nc" formats "begin\n a\nend.b { }\nc" + formats "foo (1).bar" formats "foo (1).bar" + formats "break *1" formats "break *1" + formats "x = {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}" formats "x = {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}" + formats "foo \\\nbar" formats "foo \\\nbar" + formats "lib Foo\nend" formats "lib Foo\nend" + formats "abstract class Foo\nend" formats "abstract class Foo\nend" + formats "@[Foo( 1, 2 )]" formats "@[Foo( 1, 2 )]" + formats "a[b] ||= c" formats "a[b] ||= c" + formats ":&+" formats ":&+" + formats "if a\n2; 3\nelse\n3\nend" formats "if a\n2; 3\nelse\n3\nend" + formats "Foo:: Bar" formats "Foo:: Bar" + formats "enum E\n A # hello\n B # hello; C # hello\nend" formats "enum E\n A # hello\n B # hello; C # hello\nend" + formats "yield 1 , \n2" formats "yield 1 , \n2" + formats "def bar\n foo(<<-X,\n a\n X\n 1)\nend" formats "def bar\n foo(<<-X,\n a\n X\n 1)\nend" + formats "a = foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "a = foo(1, 2, {\n foo: 1,\n bar: 2,\n})" + formats "if / /\nend" formats "if / /\nend" + formats "a = foo &.bar do\n 1 + 2\nend" formats "a = foo &.bar do\n 1 + 2\nend" + formats "if # some comment\n 2 # another\n 3 # final \n end # end " formats "if # some comment\n 2 # another\n 3 # final \n end # end " + formats "return" formats "return" + formats "Set { 1 , 2 }" formats "Set { 1 , 2 }" + formats "if a\n2\nend" formats "if a\n2\nend" + formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" + formats "def foo ( ) \n1\nend" formats "def foo ( ) \n1\nend" + formats "->( ){ x }" formats "->( ){ x }" + formats "1.<= do\nend" formats "1.<= do\nend" + formats "1 + # foo\n2" formats "1 + # foo\n2" + formats ":&-" formats ":&-" + formats "alignof( Int32 )" formats "alignof( Int32 )" + formats "foo\n .foo1(bar\n .bar1\n .bar2)" formats "foo\n .foo1(bar\n .bar1\n .bar2)" + formats "foo(\"b\#{1}\" \\\n\"baz\")" formats "foo(\"b\#{1}\" \\\n\"baz\")" + formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" + formats "{ foo: 1 }" formats "{ foo: 1 }" + formats "-> :: foo=" formats "-> :: foo=" + formats "x: Int32" formats "x: Int32" + formats "foo {;;1}" formats "foo {;;1}" + formats "long_variable_name = [\n {\n :foo => 1,\n }, {\n :bar => 2,\n },\n]" formats "long_variable_name = [\n {\n :foo => 1,\n }, {\n :bar => 2,\n },\n]" + formats "foo {;1}" formats "foo {;1}" + formats "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" formats "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" + formats "case nil\nelse nil; nil # comment\nend" formats "case nil\nelse nil; nil # comment\nend" + formats "@[ Foo ]\ndef foo\nend" formats "@[ Foo ]\ndef foo\nend" + formats "if 1 &&\n (2 || 3)\n 1\nelse\n 2\nend" formats "if 1 &&\n (2 || 3)\n 1\nelse\n 2\nend" + formats "foo.bar\n .baz(\n 1\n )" formats "foo.bar\n .baz(\n 1\n )" + formats ":^" formats ":^" + formats "macro foo\n {% 1 + 2 %}\nend" formats "macro foo\n {% 1 + 2 %}\nend" + formats "foo.bar(1) # comment\n .baz" formats "foo.bar(1) # comment\n .baz" + formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" + formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" + formats " case 1\n when 2\n 3\n else #:newline, :eof\n 1 if 2\n return 3\n end\n" formats " case 1\n when 2\n 3\n else #:newline, :eof\n 1 if 2\n return 3\n end\n" + formats "[\n {\n 1 => 2,\n }, {\n 3 => 4,\n }, {\n 5 => 6,\n },\n]" formats "[\n {\n 1 => 2,\n }, {\n 3 => 4,\n }, {\n 5 => 6,\n },\n]" + formats "def foo\nend\n\ndef bar\nend\n\n# foo" formats "def foo\nend\n\ndef bar\nend\n\n# foo" formats "asm(\"nop\" : : )" formats "asm(\"nop\" : : )" - formats "enum Foo\nA = 1\nend" formats "enum Foo\nA = 1\nend" - formats "def foo(\n &block\n)\nend" formats "def foo(\n &block\n)\nend" - formats "lib Bar\n enum Foo\n end\nend" formats "lib Bar\n enum Foo\n end\nend" - formats "def x(@y = ->(z) {})\nend" formats "def x(@y = ->(z) {})\nend" - formats "bar do\n foo <<-X\n bar\n X\nend" formats "bar do\n foo <<-X\n bar\n X\nend" - formats "if 1\n [\n 1,\n ].none?\nend" formats "if 1\n [\n 1,\n ].none?\nend" - formats "asm(\"nop\" : \"a\"(0) )" formats "asm(\"nop\" : \"a\"(0) )" - formats "SomeLib.UppercasedFunCall 1, 2" formats "SomeLib.UppercasedFunCall 1, 2" - formats "class Foo;end" formats "class Foo;end" + formats "SomeLib.UppercasedFunCall" formats "SomeLib.UppercasedFunCall" + formats "1_234" formats "1_234" + formats "-> : Array(Int32) {}" formats "-> : Array(Int32) {}" + formats "a.!" formats "a.!" + formats "foo(\"bar\" \\\n\"baz\")" formats "foo(\"bar\" \\\n\"baz\")" + formats "foo.[] = 1" formats "foo.[] = 1" + formats "foo a: 1\nb" formats "foo a: 1\nb" + formats "\n# hello\n\n1" formats "\n# hello\n\n1" + formats "a = foo(bar(baz3 do\nend))" formats "a = foo(bar(baz3 do\nend))" + formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" + formats "foo = 1\n->foo.bar(Int32)" formats "foo = 1\n->foo.bar(Int32)" + formats "if a\n # hello\n 2\nend" formats "if a\n # hello\n 2\nend" + formats "class Foo\n def foo\n # nothing\n end\nend" formats "class Foo\n def foo\n # nothing\n end\nend" + formats "10//a" formats "10//a" + formats "{ {{FOO}}, nil}" formats "{ {{FOO}}, nil}" + formats "foo : Foo * * * * *" formats "foo : Foo * * * * *" + formats "if 1 # foo\nend" formats "if 1 # foo\nend" + formats "module Foo # foo\nend" formats "module Foo # foo\nend" + formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n @[MyAnn]\n biz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n @[MyAnn]\n biz\n); end" + formats "->@foo.foo!" formats "->@foo.foo!" + formats "a = 1\ndef bar\nend" formats "a = 1\ndef bar\nend" + formats "1 ||\n # foo\n 2" formats "1 ||\n # foo\n 2" + formats "foo.bar(&.baz)" formats "foo.bar(&.baz)" + formats "-> : Int32 | String { 1 }" formats "-> : Int32 | String { 1 }" + formats "bar = foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n })" formats "bar = foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n })" + formats "return *1 ,2" formats "return *1 ,2" + formats "select \n when foo \n 2 \n end" formats "select \n when foo \n 2 \n end" + formats "[\n1, # a\n2, # b\n 3 # c\n]" formats "[\n1, # a\n2, # b\n 3 # c\n]" + formats "foo do # a\n # b\n bar\nend" formats "foo do # a\n # b\n bar\nend" + formats ":&*" formats ":&*" + formats "<<-HTML\n \#{__FILE__}\n HTML" formats "<<-HTML\n \#{__FILE__}\n HTML" + formats "Tuple()" formats "Tuple()" formats "1.as? Int32" formats "1.as? Int32" - formats "`foo \#{ bar }`" formats "`foo \#{ bar }`" - formats "x : A | B" formats "x : A | B" - formats "foo 1, # comment\n do\n end" formats "foo 1, # comment\n do\n end" - formats "foo &.[]( 1, 2 )" formats "foo &.[]( 1, 2 )" - formats "foo[&.bar] = 1" formats "foo[&.bar] = 1" - formats "def foo\n 1\n # Comment\n\n\nend" formats "def foo\n 1\n # Comment\n\n\nend" - formats ":/" formats ":/" - formats "\"\#{\"\#{foo}\"}\"" formats "\"\#{\"\#{foo}\"}\"" - formats "foo bar, \\\nbaz" formats "foo bar, \\\nbaz" - formats "foo.bar.baz\n.qux" formats "foo.bar.baz\n.qux" - formats "begin\n 1 \\\n + 2\n 3\nend" formats "begin\n 1 \\\n + 2\n 3\nend" + formats "def foo(x)\n {% if true %}\n x = x + 2\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n x = x + 2\n {% end %}\nend" formats "a = begin\n 1\nend\n\na =\nbegin\n 1\nend\n\na = if 1\n 2\nend\n\nb = 1\nb ||= begin\n 2\nend\n\nb ||= if 1\n 2\nend\n\nb += if 1\n 2\nend\n\nb +=\nif 1\n 2\nend\n\na, b = begin\n 1\nend\n\na, b =\nbegin\n 1\nend\n\nc[x] = begin\n 2\nend\n\nc[x] =\nbegin\n 2\nend\n\nc[x] = if 1\n 2\nend\n\nc[x] ||= begin 1\n 2\nend\n\nc[x] ||= if 1\n 2\nend\n\nc[x] += if 1\n 2\nend\n\nc[x] += begin 1\n 2\nend\n\nc[x] +=\nbegin\n 1\n 2\nend\n\nfoo.bar = begin\nend\n\nfoo.bar =\nbegin\nend\n\nfoo.bar = if\n 2\nend\n\nfoo.bar += begin\n 2\nend\n\nfoo.bar += if\n 2\nend\n\n" formats "a = begin\n 1\nend\n\na =\nbegin\n 1\nend\n\na = if 1\n 2\nend\n\nb = 1\nb ||= begin\n 2\nend\n\nb ||= if 1\n 2\nend\n\nb += if 1\n 2\nend\n\nb +=\nif 1\n 2\nend\n\na, b = begin\n 1\nend\n\na, b =\nbegin\n 1\nend\n\nc[x] = begin\n 2\nend\n\nc[x] =\nbegin\n 2\nend\n\nc[x] = if 1\n 2\nend\n\nc[x] ||= begin 1\n 2\nend\n\nc[x] ||= if 1\n 2\nend\n\nc[x] += if 1\n 2\nend\n\nc[x] += begin 1\n 2\nend\n\nc[x] +=\nbegin\n 1\n 2\nend\n\nfoo.bar = begin\nend\n\nfoo.bar =\nbegin\nend\n\nfoo.bar = if\n 2\nend\n\nfoo.bar += begin\n 2\nend\n\nfoo.bar += if\n 2\nend\n\n" - formats "::Tuple()" formats "::Tuple()" - formats "foo(bar(baz3 do\nend))" formats "foo(bar(baz3 do\nend))" - formats "case 1 \n when 2 \n 3 \n else 4 \n end" formats "case 1 \n when 2 \n 3 \n else 4 \n end" - formats "foo &.bar.is_a?(Baz)" formats "foo &.bar.is_a?(Baz)" - formats "macro foo\n {{ 1 + 2 }}\\\nend" formats "macro foo\n {{ 1 + 2 }}\\\nend" - formats "foo &.as?(T).bar" formats "foo &.as?(T).bar" - formats "1 .. 2" formats "1 .. 2" - formats "0x1234_u32" formats "0x1234_u32" - formats "foo.as(T).bar" formats "foo.as(T).bar" - formats "class Actor\n macro inherited\n\nend\nend\n" formats "class Actor\n macro inherited\n\nend\nend\n" - formats "def foo ( &@block) \n end" formats "def foo ( &@block) \n end" - formats "[\n1, # a\n2, # b\n 3 # c\n]" formats "[\n1, # a\n2, # b\n 3 # c\n]" - formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" - formats "module Foo\n1\n\n# foo\nend" formats "module Foo\n1\n\n# foo\nend" - formats "foo do\n bar do\n foo <<-X\n bar\n X\n end\nend" formats "foo do\n bar do\n foo <<-X\n bar\n X\n end\nend" - formats "break { 1 , 2 }" formats "break { 1 , 2 }" - formats "macro foo\n def bar\n {{\n 1 + 2\n }}\n end\nend" formats "macro foo\n def bar\n {{\n 1 + 2\n }}\n end\nend" - formats "foo : Foo * * * * *" formats "foo : Foo * * * * *" - formats "foo { | ( a, *b , c ) | a }" formats "foo { | ( a, *b , c ) | a }" - formats "def a\n b(\n 1, # x\n # y\n 2\n )\nend" formats "def a\n b(\n 1, # x\n # y\n 2\n )\nend" - formats "break( 1 )" formats "break( 1 )" - formats "#!shebang\n1 + 2" formats "#!shebang\n1 + 2" - formats "# ```text\n# 1 + 2\n# ```\n#\n# ```\n# 3 + 4\n# ```" formats "# ```text\n# 1 + 2\n# ```\n#\n# ```\n# 3 + 4\n# ```" - formats "foo.[]" formats "foo.[]" - formats "<<-FOO\nbarfoo\nFOO" formats "<<-FOO\nbarfoo\nFOO" - formats "foo a: 1\nb" formats "foo a: 1\nb" - formats "foo.[ 1 , 2 ] =3" formats "foo.[ 1 , 2 ] =3" - formats "if 1\n {% for x in y %} {% end %}\nend" formats "if 1\n {% for x in y %} {% end %}\nend" - formats "def foo(\n foo,\n @[MyAnn] &block\n); end" formats "def foo(\n foo,\n @[MyAnn] &block\n); end" - formats " {{\n1 + 2 }}" formats " {{\n1 + 2 }}" - formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" - formats "def foo( x , & block : Int32 ->)\nend" formats "def foo( x , & block : Int32 ->)\nend" - formats "def foo\n 1\n 2\nrescue IO\n 1\nend" formats "def foo\n 1\n 2\nrescue IO\n 1\nend" - formats ":*" formats ":*" - formats "1.<= { 3 }" formats "1.<= { 3 }" - formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" - formats "@[Foo]" formats "@[Foo]" + formats "@x[ 1 ] += 2" formats "@x[ 1 ] += 2" formats "if 1\n ((1) + 2)\nend" formats "if 1\n ((1) + 2)\nend" - formats "alias A = (B(C, (C | D)) | E)" formats "alias A = (B(C, (C | D)) | E)" - formats "->@foo.foo" formats "->@foo.foo" - formats "macro foo\n {{\n1 + 2 }}\nend" formats "macro foo\n {{\n1 + 2 }}\nend" - formats "foo {;;1}" formats "foo {;;1}" - formats "10**a" formats "10**a" - formats "next( 1 , 2 )" formats "next( 1 , 2 )" - formats "yield(1 , \n2)" formats "yield(1 , \n2)" - formats "alias A = ( A | B )" formats "alias A = ( A | B )" - formats "Foo( A , 1 )" formats "Foo( A , 1 )" - formats "foo do # a\n # b\n bar\nend" formats "foo do # a\n # b\n bar\nend" - formats "begin\n ()\nend" formats "begin\n ()\nend" - formats "->Foo.foo=" formats "->Foo.foo=" - formats "next { 1 , 2 }" formats "next { 1 , 2 }" - formats "def foo\na = bar do\n1\nend\nend" formats "def foo\na = bar do\n1\nend\nend" - formats "x : Int32 = 1" formats "x : Int32 = 1" - formats "foo(\n [\n 1,\n 2,\n ],\n [\n 3,\n 4,\n ]\n)" formats "foo(\n [\n 1,\n 2,\n ],\n [\n 3,\n 4,\n ]\n)" + formats "case 1 \n when 2 \n 3 \n end" formats "case 1 \n when 2 \n 3 \n end" + formats "1 ; 2" formats "1 ; 2" + formats "foo &.bar.responds_to?(:baz)" formats "foo &.bar.responds_to?(:baz)" + formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" + formats " <<-EOF\n 1\nEOF" formats " <<-EOF\n 1\nEOF" + formats "foo( )" formats "foo( )" + formats "1\nyield\n2" formats "1\nyield\n2" + formats "[\n# foo\n] of String" formats "[\n# foo\n] of String" + formats "%i(one two three)" formats "%i(one two three)" + formats "1.== do\nend" formats "1.== do\nend" + formats "foo[&.bar]?" formats "foo[&.bar]?" + formats "a = 1\na ||= begin\n 1\nend" formats "a = 1\na ||= begin\n 1\nend" + formats "x : { {A, B}, {C, D} }" formats "x : { {A, B}, {C, D} }" + formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" formats "foo { | a, ( b , (c, d) ) | a + b + c }" formats "foo { | a, ( b , (c, d) ) | a + b + c }" - formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" - formats "NamedTuple(\n a: Int32,\n)" formats "NamedTuple(\n a: Int32,\n)" - formats "enum Foo\nend" formats "enum Foo\nend" - formats "-> : Int32 {}" formats "-> : Int32 {}" - formats "x[ y ] += 1" formats "x[ y ] += 1" - formats "select \n when foo then 2 \n end" formats "select \n when foo then 2 \n end" - formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" - formats "def a\n b(\n 1, # x\n # y\n )\nend" formats "def a\n b(\n 1, # x\n # y\n )\nend" - formats "foo(1 + \n2)" formats "foo(1 + \n2)" - formats "def foo ( @x, @y) \n end" formats "def foo ( @x, @y) \n end" - formats "class Foo\n enum Bar\n A; B; C;\n D; E; F\nend\nend\n" formats "class Foo\n enum Bar\n A; B; C;\n D; E; F\nend\nend\n" - formats "foo(\n 1,\n # 2,\n # 3,\n)" formats "foo(\n 1,\n # 2,\n # 3,\n)" - formats "foo = {1, {2,\n 3},\n 4}" formats "foo = {1, {2,\n 3},\n 4}" - formats "begin\nend\n\n# a\n" formats "begin\nend\n\n# a\n" - formats "unless a\n2\nend" formats "unless a\n2\nend" - formats "foo(\n 1,\n &.foo\n)" formats "foo(\n 1,\n &.foo\n)" - formats "def /(x)\n 1\nend" formats "def /(x)\n 1\nend" - formats "(size - 1).downto(0) do |i|\n yield @buffer[i]\nend" formats "(size - 1).downto(0) do |i|\n yield @buffer[i]\nend" - formats "asm(\"a\" ::: \"f\"\n)" formats "asm(\"a\" ::: \"f\"\n)" - formats "break *1" formats "break *1" - formats "-> : Int32* {}" formats "-> : Int32* {}" - formats "String???" formats "String???" + formats "if 1;\n2; end" formats "if 1;\n2; end" + formats "return( *1 , *2 )" formats "return( *1 , *2 )" + formats "x 1, \\\n 2" formats "x 1, \\\n 2" + formats "pointerof( @a )" formats "pointerof( @a )" + formats "foo &.bar.as?(T)" formats "foo &.bar.as?(T)" + formats "if 1\nbegin\n2\nensure\n3\nend\nend" formats "if 1\nbegin\n2\nensure\n3\nend\nend" + formats "-> :: Foo . foo" formats "-> :: Foo . foo" + formats "{ {1, 2, 3} => 4 }" formats "{ {1, 2, 3} => 4 }" + formats "if 1 # foo\n2\nend" formats "if 1 # foo\n2\nend" + formats "def foo(a : T) forall T\n #\n\n\nend" formats "def foo(a : T) forall T\n #\n\n\nend" + formats "Foo" formats "Foo" + formats "foo = 1\n->foo.[](Int32)" formats "foo = 1\n->foo.[](Int32)" + formats "if a\nif b\n3\nelse\n4\nend\nend" formats "if a\nif b\n3\nelse\n4\nend\nend" + formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" + formats "foo 1, # comment\n # bar\n do\n end" formats "foo 1, # comment\n # bar\n do\n end" + formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" formats "lib Foo\nfun foo() : Int32\nend" formats "lib Foo\nfun foo() : Int32\nend" - formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" - formats ":&**" formats ":&**" - formats "a, b = \nif 1\n2\nend" formats "a, b = \nif 1\n2\nend" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] baz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] baz\n); end" - formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" - formats "def foo(a,\n **b)\nend" formats "def foo(a,\n **b)\nend" - formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" - formats "1 rescue 2" formats "1 rescue 2" - formats "foo(\n 1,\n 2\n) do\n 1\nend" formats "foo(\n 1,\n 2\n) do\n 1\nend" - formats "foo(\n 1,\n # 2,\n 3,\n)" formats "foo(\n 1,\n # 2,\n 3,\n)" - formats "macro foo\n 1 \n {{ \n 42 \n }} \n 2 \nend" formats "macro foo\n 1 \n {{ \n 42 \n }} \n 2 \nend" - formats "def foo( & )\nend" formats "def foo( & )\nend" - formats "$1" formats "$1" - formats "foo( 1 , 2 )" formats "foo( 1 , 2 )" - formats "return 1 , 2" formats "return 1 , 2" - formats "[c.x]\n .foo" formats "[c.x]\n .foo" - formats "[1, 2,\n 3, 4]\n" formats "[1, 2,\n 3, 4]\n" - formats "\"foo \#{ 1 + 2 }\"" formats "\"foo \#{ 1 + 2 }\"" - formats "case 1 # foo\nwhen 2\nend" formats "case 1 # foo\nwhen 2\nend" - formats "1\n.as?(Int32)" formats "1\n.as?(Int32)" - formats "foo\n.bar\n.baz" formats "foo\n.bar\n.baz" - formats "@[Foo::Bar]" formats "@[Foo::Bar]" - formats ":&+" formats ":&+" - formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n bar => <<-BAR,\n bar\n BAR\n}" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n bar => <<-BAR,\n bar\n BAR\n}" - formats "nil" formats "nil" - formats "if a\n2\nelse\nend" formats "if a\n2\nelse\nend" - formats "#######" formats "#######" - formats "foo 1, a: 1,\nb: 2,\nc: 3" formats "foo 1, a: 1,\nb: 2,\nc: 3" - formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" - formats "module Moo \n\n 1 \n\nend" formats "module Moo \n\n 1 \n\nend" - formats "x.try &.[] 123" formats "x.try &.[] 123" - formats "あ.い = 1" formats "あ.い = 1" - formats "def foo : Int32 \n end" formats "def foo : Int32 \n end" - formats "1 \\\nif 2" formats "1 \\\nif 2" - formats " ( 1; 2; 3 ) " formats " ( 1; 2; 3 ) " - formats "foo &.is_a?(T).bar" formats "foo &.is_a?(T).bar" - formats "case 1 \n when 2 \n 3 \n when 4 \n 5 \n end" formats "case 1 \n when 2 \n 3 \n when 4 \n 5 \n end" - formats "%w{one( two( three)}" formats "%w{one( two( three)}" - formats "foo.responds_to? :bar\n1" formats "foo.responds_to? :bar\n1" - formats "\"foo \#{bar}\" \\\n \"baz\"" formats "\"foo \#{bar}\" \\\n \"baz\"" - formats "def foo : A | B(C)\n nil\nend" formats "def foo : A | B(C)\n nil\nend" - formats "foo(\n 1,\n a: 1,\n b: 2,\n)" formats "foo(\n 1,\n a: 1,\n b: 2,\n)" - formats "return( 1 , 2 )" formats "return( 1 , 2 )" - formats "self.as(Int32)" formats "self.as(Int32)" - formats "foo { |x| (x).a }" formats "foo { |x| (x).a }" - formats "def foo(x : A(B), y)\nend" formats "def foo(x : A(B), y)\nend" - formats " {% if 1 %} 2 {% end %}" formats " {% if 1 %} 2 {% end %}" - formats "1 unless 2" formats "1 unless 2" - formats "def foo(@[MyAnn] &); end" formats "def foo(@[MyAnn] &); end" - formats "long_variable_name = [\n {\n :foo => 1,\n },\n {\n :bar => 2,\n },\n]" formats "long_variable_name = [\n {\n :foo => 1,\n },\n {\n :bar => 2,\n },\n]" - formats "module Foo ( U, *T ); 1; end" formats "module Foo ( U, *T ); 1; end" - formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" - formats "__FILE__" formats "__FILE__" - formats "x\n# foo\n\n# bar" formats "x\n# foo\n\n# bar" - formats "def foo(*y, **z)\nend" formats "def foo(*y, **z)\nend" - formats "asm(\n # the assembly template string, following the\n # syntax for LLVM's integrated assembler\n \"nop\" : # output operands\n\"=r\"(foo), \"=r\"(bar) : # input operands\n\"r\"(1), \"r\"(baz) : # names of clobbered registers\n\"eax\", \"memory\" : # optional flags, corresponding to the LLVM IR\n # sideeffect / alignstack / inteldialect / unwind attributes\n\"volatile\", \"alignstack\", \"intel\", \"unwind\"\n)" formats "asm(\n # the assembly template string, following the\n # syntax for LLVM's integrated assembler\n \"nop\" : # output operands\n\"=r\"(foo), \"=r\"(bar) : # input operands\n\"r\"(1), \"r\"(baz) : # names of clobbered registers\n\"eax\", \"memory\" : # optional flags, corresponding to the LLVM IR\n # sideeffect / alignstack / inteldialect / unwind attributes\n\"volatile\", \"alignstack\", \"intel\", \"unwind\"\n)" - formats "foo do\n {{ foo <<-X\n bar\n X\n }}\nend" formats "foo do\n {{ foo <<-X\n bar\n X\n }}\nend" - formats "foo[1, &.bar]" formats "foo[1, &.bar]" - formats "->Foo.foo" formats "->Foo.foo" - formats "1.>=(2) { 3 }" formats "1.>=(2) { 3 }" - formats "{ foo: 1 }" formats "{ foo: 1 }" - formats "$?.bar" formats "$?.bar" - formats "bar = foo(->do\n 1 + 2\nend)" formats "bar = foo(->do\n 1 + 2\nend)" - formats "select \n when foo ; 2 \n end" formats "select \n when foo ; 2 \n end" - formats "{ 1 => 2 , 3 => 4 }" formats "{ 1 => 2 , 3 => 4 }" - formats "enum Foo\nA \nend" formats "enum Foo\nA \nend" - formats "macro foo\n {% for x in y %} 2 {% end %}\nend" formats "macro foo\n {% for x in y %} 2 {% end %}\nend" - formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "case 1\nend" formats "case 1\nend" - formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" - formats "1.!= { 3 }" formats "1.!= { 3 }" - formats "{ {1, 2, 3} }" formats "{ {1, 2, 3} }" + formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" + formats "begin\n call\n # comment\nrescue\n call\n # comment\nelse\n call\n # comment\nensure\n call\n # comment\nend" formats "begin\n call\n # comment\nrescue\n call\n # comment\nelse\n call\n # comment\nensure\n call\n # comment\nend" formats "begin\n 1 + \\\n 2\n 3\nend" formats "begin\n 1 + \\\n 2\n 3\nend" - formats "foo({\n 1 => 2,\n 3 => {\n 4 => 5,\n },\n})" formats "foo({\n 1 => 2,\n 3 => {\n 4 => 5,\n },\n})" - formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" - formats "case\nelse\n 1\nend" formats "case\nelse\n 1\nend" - formats "struct Foo \n\n 1 \n\nend" formats "struct Foo \n\n 1 \n\nend" - formats "return *1" formats "return *1" - formats "{% if flag?(:freebsd) %}\n 1 + 2\n{% end %}\n\ncase x\nwhen 1234 then 1\nelse x\nend" formats "{% if flag?(:freebsd) %}\n 1 + 2\n{% end %}\n\ncase x\nwhen 1234 then 1\nelse x\nend" - formats "::NamedTuple(T)" formats "::NamedTuple(T)" - formats "run(\"a\", 1)" formats "run(\"a\", 1)" - formats "foo . bar( x , y )" formats "foo . bar( x , y )" - formats "::Tuple(T)" formats "::Tuple(T)" - formats "->Foo.foo?" formats "->Foo.foo?" - formats "<<-FOO\nFOO" formats "<<-FOO\nFOO" - formats "enum Foo\n A = 10\n FOO = 123\n BARBAZ = 1234\nend\n" formats "enum Foo\n A = 10\n FOO = 123\n BARBAZ = 1234\nend\n" - formats "foo[a, b: 2]" formats "foo[a, b: 2]" - formats "def foo ( x ) : Int32 \n end" formats "def foo ( x ) : Int32 \n end" - formats "alias X = ((Y, Z) ->)" formats "alias X = ((Y, Z) ->)" + formats "yield 1\n2" formats "yield 1\n2" + formats "{\n a: 1,\n foo: bar,\n}" formats "{\n a: 1,\n foo: bar,\n}" + formats "{x => self // 1}" formats "{x => self // 1}" + formats "::NamedTuple()" formats "::NamedTuple()" + formats "FOO = 2\nA = 1" formats "FOO = 2\nA = 1" + does not add `&` without flag `method_signature_yield` + formats "def foo # bar\n yield\nend" formats "def foo # bar\n yield\nend" + formats "def foo(\n)\n yield\nend" formats "def foo(\n)\n yield\nend" + formats "def foo(x,\n)\n yield\nend" formats "def foo(x,\n)\n yield\nend" + formats "def foo(\nx,\n)\n yield\nend" formats "def foo(\nx,\n)\n yield\nend" + formats "def foo(x ,)\n yield\nend" formats "def foo(x ,)\n yield\nend" + formats "def foo\n yield\nend" formats "def foo\n yield\nend" + formats "def foo(x,\ny,)\n yield\nend" formats "def foo(x,\ny,)\n yield\nend" + formats "def foo(\nx)\n yield\nend" formats "def foo(\nx)\n yield\nend" + formats "def foo(x\n)\n yield\nend" formats "def foo(x\n)\n yield\nend" + formats "def foo(a, **b)\n yield\nend" formats "def foo(a, **b)\n yield\nend" + formats "def foo()\n yield\nend" formats "def foo()\n yield\nend" + formats "def foo(\nx, y)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" + formats "def foo(x)\n yield\nend" formats "def foo(x)\n yield\nend" + formats "def foo(x,\n y)\n yield\nend" formats "def foo(x,\n y)\n yield\nend" + formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" + formats "case 1 \n when 2 ,\n 3 \n 4 \n end" formats "case 1 \n when 2 ,\n 3 \n 4 \n end" + formats "{ A: 1 }\n" formats "{ A: 1 }\n" + formats "foo = 1\n->foo.bar(Int32*)" formats "foo = 1\n->foo.bar(Int32*)" + formats "foo[1, &.bar]?" formats "foo[1, &.bar]?" + formats " * a = 1 " formats " * a = 1 " + formats "\"\#{ # foo\n foo = 1\n}\"" formats "\"\#{ # foo\n foo = 1\n}\"" + formats "%i{one( two( three)}" formats "%i{one( two( three)}" + formats "macro foo\n {% for value, i in values %}\\\n {% if true %}\\\n {% end %}\\\n {{ 1 }}/\n {% end %}\\\nend\n\n{\n 1 => 2,\n 1234 => 5,\n}\n" formats "macro foo\n {% for value, i in values %}\\\n {% if true %}\\\n {% end %}\\\n {{ 1 }}/\n {% end %}\\\nend\n\n{\n 1 => 2,\n 1234 => 5,\n}\n" + formats "a&-1" formats "a&-1" + formats "[\n <<-EOF,\n foo\n EOF\n]" formats "[\n <<-EOF,\n foo\n EOF\n]" + formats "if a\n2\n3\nend" formats "if a\n2\n3\nend" + formats "a = %w(\n one two\n three four\n)" formats "a = %w(\n one two\n three four\n)" + formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" + formats "foo ( )" formats "foo ( )" + formats "$~.bar" formats "$~.bar" + formats "<<-HTML\n hello \n world \n HTML" formats "<<-HTML\n hello \n world \n HTML" + formats "def foo(x @y)\nend" formats "def foo(x @y)\nend" + formats "def /(x)\n 1\nend" formats "def /(x)\n 1\nend" + formats "foo : ( A | B )" formats "foo : ( A | B )" + formats "case 1 \n when 2 then 3 \n end" formats "case 1 \n when 2 then 3 \n end" + formats " {{\n1 + 2\n }}" formats " {{\n1 + 2\n }}" formats "x : Int32" formats "x : Int32" - formats "foo[bar.baz]\n .qux" formats "foo[bar.baz]\n .qux" - formats "begin\n1\nrescue Int32 \n3\nend" formats "begin\n1\nrescue Int32 \n3\nend" - formats "a[b] ||= c" formats "a[b] ||= c" - formats "a.b &.[c]\n1" formats "a.b &.[c]\n1" - formats "foo(bar(\n 1,\n baz(\n 2,\n 3,\n )\n))" formats "foo(bar(\n 1,\n baz(\n 2,\n 3,\n )\n))" - formats "def foo(a, &@b)\nend" formats "def foo(a, &@b)\nend" - formats "def foo\n2 # foo\nend" formats "def foo\n2 # foo\nend" - formats "SomeLib.UppercasedFunCall" formats "SomeLib.UppercasedFunCall" - formats ":|" formats ":|" + formats "while 1 &&\n2 &&\n3\n4\nend" formats "while 1 &&\n2 &&\n3\n4\nend" + formats "foo : StaticArray(Foo, 12)[34]" formats "foo : StaticArray(Foo, 12)[34]" + formats "lib Foo\nfun foo( ... ) : Int32\nend" formats "lib Foo\nfun foo( ... ) : Int32\nend" + formats "10/a" formats "10/a" + formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" + formats "foo x: 1" formats "foo x: 1" + formats " ( 1; 2; 3 ) " formats " ( 1; 2; 3 ) " + formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" + formats "foo(\n1,\n 2 \n)" formats "foo(\n1,\n 2 \n)" + formats "foo(\n 1,\n 2\n) do\n 1\nend" formats "foo(\n 1,\n 2\n) do\n 1\nend" + formats "macro foo\n <<-FOO\n hello \n FOO\nend" formats "macro foo\n <<-FOO\n hello \n FOO\nend" + formats "<<-FOO\nfoo\nFOO" formats "<<-FOO\nfoo\nFOO" + formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" + formats "def foo(@[MyAnn] v); end" formats "def foo(@[MyAnn] v); end" + formats "foo = 1\n->foo.foo" formats "foo = 1\n->foo.foo" + formats "if a\nif b\nelse\n4\nend\nend" formats "if a\nif b\nelse\n4\nend\nend" + formats ":<<" formats ":<<" + formats "[] of Int32\n1" formats "[] of Int32\n1" + formats "a = case 1\nwhen 2\n3\nend" formats "a = case 1\nwhen 2\n3\nend" + formats "foo a , b , x: 1" formats "foo a , b , x: 1" + formats "x = a do\n 1 ||\n 2\nend" formats "x = a do\n 1 ||\n 2\nend" + formats "foo\n \nbar" formats "foo\n \nbar" + formats "foo.bar = \n1" formats "foo.bar = \n1" + formats "begin\n begin\n\n end\nend" formats "begin\n begin\n\n end\nend" + formats "next *1" formats "next *1" + formats "case 1 \n when 2 \n 3 \n when 4 \n 5 \n end" formats "case 1 \n when 2 \n 3 \n when 4 \n 5 \n end" + formats ":*" formats ":*" + formats "1 \\\nrescue 2" formats "1 \\\nrescue 2" + formats "%w(\n one two\n three four\n)" formats "%w(\n one two\n three four\n)" + formats "a&+1" formats "a&+1" + formats "def foo(\n foo,\n\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n\n @[MyAnn]\n &block\n); end" + formats "lib Foo\n fun Foo = Bar\nend" formats "lib Foo\n fun Foo = Bar\nend" + formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" + formats "->@@foo.foo" formats "->@@foo.foo" + formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" + formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" + formats "FOO = 2 + 3\nA = 1 - 10" formats "FOO = 2 + 3\nA = 1 - 10" + formats "foo.bar do\n baz\n .b\nend" formats "foo.bar do\n baz\n .b\nend" + formats "foo = [1, [2,\n 3],\n 4]" formats "foo = [1, [2,\n 3],\n 4]" + formats "def foo=(x)\nend" formats "def foo=(x)\nend" + formats ":-" formats ":-" + formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" formats " .. 2" formats " .. 2" - formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" - formats "[\n a(), # b\n]" formats "[\n a(), # b\n]" - formats "def foo(&: Int32)\nend" formats "def foo(&: Int32)\nend" - formats "0i64" formats "0i64" - formats "begin\n1\nrescue ex : Int32 \n3\nend" formats "begin\n1\nrescue ex : Int32 \n3\nend" - formats "case 1\nwhen \"foo\" ; 3\nwhen \"lalalala\"; 4\nelse 5\nend" formats "case 1\nwhen \"foo\" ; 3\nwhen \"lalalala\"; 4\nelse 5\nend" - formats "asm(\n# foo\n\"nop\"\n# bar\n)" formats "asm(\n# foo\n\"nop\"\n# bar\n)" - formats "case foo\nwhen 1\n # A\nelse\n# B\nend\n" formats "case foo\nwhen 1\n # A\nelse\n# B\nend\n" - formats ":\"foo\"" formats ":\"foo\"" - formats "instance_alignof( Int32 )" formats "instance_alignof( Int32 )" - formats "case 1\nwhen \"foo\" then 3\nwhen \"lalalala\" then 4\nelse 5\nend" formats "case 1\nwhen \"foo\" then 3\nwhen \"lalalala\" then 4\nelse 5\nend" - formats "def `(x)\n 1\nend" formats "def `(x)\n 1\nend" - formats "case 0\nwhen 0 then 1; 2\n# Comments\nend" formats "case 0\nwhen 0 then 1; 2\n# Comments\nend" - formats "1&+2&*3" formats "1&+2&*3" - formats "Foo:: Bar" formats "Foo:: Bar" - formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" - formats "a || b" formats "a || b" - formats "foo.bar # comment\n .baz" formats "foo.bar # comment\n .baz" - formats "foo(a: //, b: //)" formats "foo(a: //, b: //)" - formats "foo &.as(T)" formats "foo &.as(T)" - formats "-> :: Foo . foo=" formats "-> :: Foo . foo=" - formats "foo.bar. as Int32" formats "foo.bar. as Int32" - formats "foo &.responds_to?(:foo)" formats "foo &.responds_to?(:foo)" - formats "@x[ 1 ] ||= 2" formats "@x[ 1 ] ||= 2" - formats "@[ Foo ]\ndef foo\nend" formats "@[ Foo ]\ndef foo\nend" - formats "private getter foo" formats "private getter foo" - formats "def foo(a : T) forall T \n #\nend" formats "def foo(a : T) forall T \n #\nend" - formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" - formats "[1, 2, 3] of Foo" formats "[1, 2, 3] of Foo" - formats "foo.bar(&.%(baz))" formats "foo.bar(&.%(baz))" - formats "case 1 \n when 2 \n 3 \n end" formats "case 1 \n when 2 \n 3 \n end" - formats "if 1\ncase 1\nwhen 2\n3\nend\nend" formats "if 1\ncase 1\nwhen 2\n3\nend\nend" - formats "alias Foo::Bar= Baz" formats "alias Foo::Bar= Baz" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n\n @[MyAnn]\n\n biz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n\n @[MyAnn]\n\n biz\n); end" - formats "foo(\n 1, # hola\n2, # chau\n )" formats "foo(\n 1, # hola\n2, # chau\n )" - formats "foo do \n x \n end" formats "foo do \n x \n end" - formats "if 1\n2\n3\n# foo\nend" formats "if 1\n2\n3\n# foo\nend" - formats "module Foo;end" formats "module Foo;end" - formats "foo . is_a? ( Bar )" formats "foo . is_a? ( Bar )" - formats "def foo ( bar @@select) \n end" formats "def foo ( bar @@select) \n end" - formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" - formats "{%\n if true\n 1\n else\n 2\n end\n%}" formats "{%\n if true\n 1\n else\n 2\n end\n%}" - formats "foo bar:baz, qux:other" formats "foo bar:baz, qux:other" + formats "class Foo # foo\nend" formats "class Foo # foo\nend" + formats "1.===() { 3 }" formats "1.===() { 3 }" + formats "next 1 , 2" formats "next 1 , 2" + formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" + formats "1 #=>2" formats "1 #=>2" + formats "alias A = (B)" formats "alias A = (B)" + formats "foo { |x| (x).a }" formats "foo { |x| (x).a }" + formats "foo &.bar.nil?" formats "foo &.bar.nil?" formats "if 1\n foo(\n bar\n # comment\n )\nend" formats "if 1\n foo(\n bar\n # comment\n )\nend" - formats "foo(1,\n &.bar)" formats "foo(1,\n &.bar)" - formats "foo &.bar( 1 , 2 )" formats "foo &.bar( 1 , 2 )" - formats "- 1" formats "- 1" + formats "def foo( x , & block )\nend" formats "def foo( x , & block )\nend" + formats "foo(->do\n 1 + 2\nend)" formats "foo(->do\n 1 + 2\nend)" + formats "def foo ( x : Foo.class ) \n end" formats "def foo ( x : Foo.class ) \n end" + formats "foo.bar += \n1" formats "foo.bar += \n1" + formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] @[MyAnn] baz,\n @[MyAnn]\n @[MyAnn]\n biz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] @[MyAnn] baz,\n @[MyAnn]\n @[MyAnn]\n biz\n); end" + formats "foo(bar([\n 1,\n]))" formats "foo(bar([\n 1,\n]))" + formats " {%\na = 1\n %}" formats " {%\na = 1\n %}" + formats "alias Foo::Bar=Baz" formats "alias Foo::Bar=Baz" + formats "case nil\nelse nil; nil\n# comment\nend" formats "case nil\nelse nil; nil\n# comment\nend" + formats "alias X = (A, B) ->\nbar : C" formats "alias X = (A, B) ->\nbar : C" + formats "class Foo; 1; end" formats "class Foo; 1; end" + formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" + formats "foo.bar=(2)\n1" formats "foo.bar=(2)\n1" + formats "a = case 1\n when 1, # 1\n 2, # 2\n 3 # 3\n 1\n end" formats "a = case 1\n when 1, # 1\n 2, # 2\n 3 # 3\n 1\n end" + formats "foo &.is_a?(T).bar" formats "foo &.is_a?(T).bar" + formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" + formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" + formats "$0.bar" formats "$0.bar" + formats "def foo(&block: Int32)\nend" formats "def foo(&block: Int32)\nend" + formats "foo . bar = 1" formats "foo . bar = 1" + formats "foo.[ 1 , 2 ]" formats "foo.[ 1 , 2 ]" + formats "if 1\nelse\n2 # foo\nend" formats "if 1\nelse\n2 # foo\nend" + formats "foo[x: 1, &.bar] ||= 1" formats "foo[x: 1, &.bar] ||= 1" + formats "foo \"bar\": 1, \"baz qux\": 2" formats "foo \"bar\": 1, \"baz qux\": 2" + formats "{1, 2, 3}" formats "{1, 2, 3}" + formats "def foo ( x , y ) \n end" formats "def foo ( x , y ) \n end" + formats "case 1 \n in Int32 \n 3 \n end" formats "case 1 \n in Int32 \n 3 \n end" + formats "macro foo\n {% if true %}if true{% end %}\n {% if true %}end{% end %}\nend" formats "macro foo\n {% if true %}if true{% end %}\n {% if true %}end{% end %}\nend" + formats "NamedTuple()" formats "NamedTuple()" + formats "unless a\n2\nelse\nend" formats "unless a\n2\nelse\nend" + formats "{\n \"a\" => 1, \"b\" => 2,\n \"foo\" => 3, \"bar\" => 4,\n \"coconio\" => 5, \"lala\" => 6,\n}\n" formats "{\n \"a\" => 1, \"b\" => 2,\n \"foo\" => 3, \"bar\" => 4,\n \"coconio\" => 5, \"lala\" => 6,\n}\n" + formats "x : (A -> )" formats "x : (A -> )" + formats "-> :: foo!" formats "-> :: foo!" formats "yield( *1 , *2 )" formats "yield( *1 , *2 )" - formats "def foo( x , & : Int32 )\nend" formats "def foo( x , & : Int32 )\nend" + formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" + formats "->@@foo.foo!" formats "->@@foo.foo!" + formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" + formats "while 1\n2 # foo\nend" formats "while 1\n2 # foo\nend" + formats "asm(\"nop\" :: )" formats "asm(\"nop\" :: )" + formats "if 1\nfoo do | x , y | \n x \n end\nend" formats "if 1\nfoo do | x , y | \n x \n end\nend" + formats "enum Foo\nA \nend" formats "enum Foo\nA \nend" + formats "a &.b.as C" formats "a &.b.as C" + formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" + formats "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" formats "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" + formats "\"hel\\nlo\"" formats "\"hel\\nlo\"" formats "foo(\n 1,\n) do\n 2\nend" formats "foo(\n 1,\n) do\n 2\nend" - formats "foo(self // 1)" formats "foo(self // 1)" - formats "foo(\n# x\n1,\n\n# y\nz: 2,\n\n# a\nb: 3)" formats "foo(\n# x\n1,\n\n# y\nz: 2,\n\n# a\nb: 3)" - formats "{% if z %}\n class Foo\n end\n{% end %}" formats "{% if z %}\n class Foo\n end\n{% end %}" - formats "asm(\"a\" : : : : \"volatile\")" formats "asm(\"a\" : : : : \"volatile\")" - formats "foo{|x| x}" formats "foo{|x| x}" - formats "foo &.bar" formats "foo &.bar" - formats "def foo ( x , y ,\n) \n end" formats "def foo ( x , y ,\n) \n end" - formats "def foo ( bar @select) \n end" formats "def foo ( bar @select) \n end" - formats "foo : self?" formats "foo : self?" - formats "\"hel\nlo\"" formats "\"hel\nlo\"" - formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" - formats "def foo(a, **b, # comment\n &block)\nend" formats "def foo(a, **b, # comment\n &block)\nend" - formats "->@@foo.foo=" formats "->@@foo.foo=" + formats "foo &.bar do\n 1 + 2\nend" formats "foo &.bar do\n 1 + 2\nend" + formats "foo(bar(\n 1,\n baz(\n 2,\n 3,\n )\n))" formats "foo(bar(\n 1,\n baz(\n 2,\n 3,\n )\n))" + formats "foo.[1]" formats "foo.[1]" + formats "1 if nil?\na.b + c" formats "1 if nil?\na.b + c" + formats "&+ 1" formats "&+ 1" + formats "if 1\n [\n 1,\n ].none?\nend" formats "if 1\n [\n 1,\n ].none?\nend" + formats "macro foo\n %foo\nend" formats "macro foo\n %foo\nend" + formats "\"\#{\"\#{foo}\"}\"" formats "\"\#{\"\#{foo}\"}\"" + formats "<<-HTML\n hello \n HTML" formats "<<-HTML\n hello \n HTML" + formats "foo : Pointer(Foo)*" formats "foo : Pointer(Foo)*" + formats "a = # foo\n bar(1)" formats "a = # foo\n bar(1)" + formats "-> :: foo?" formats "-> :: foo?" + formats "{\n 1 => 2,\n 10 => 30,\n 30 => 40,\n \"foobar\" => 50,\n \"coco\" => 60,\n}" formats "{\n 1 => 2,\n 10 => 30,\n 30 => 40,\n \"foobar\" => 50,\n \"coco\" => 60,\n}" + formats "macro foo\n def bar\n {{\n 1 + 2\n }}\n end\nend" formats "macro foo\n def bar\n {{\n 1 + 2\n }}\n end\nend" + formats "break 1, {2, 3}" formats "break 1, {2, 3}" + formats "instance_sizeof( Int32 )" formats "instance_sizeof( Int32 )" + formats "class X; annotation FooAnnotation ; end ; end" formats "class X; annotation FooAnnotation ; end ; end" + formats "foo do \n x \n end" formats "foo do \n x \n end" + formats "if 1\n {{1 + 2}}\nend" formats "if 1\n {{1 + 2}}\nend" + formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" + formats "lib Foo\nunion Foo\nend\nend" formats "lib Foo\nunion Foo\nend\nend" + formats "def %(x)\n 1\nend" formats "def %(x)\n 1\nend" + formats "1..\n2" formats "1..\n2" + formats "foo &.[]" formats "foo &.[]" + formats "def foo : Int32\n 1\nend" formats "def foo : Int32\n 1\nend" formats "{ {% for x in 1..2 %}3{% end %}, nil }" formats "{ {% for x in 1..2 %}3{% end %}, nil }" - formats "foo \\\nbar" formats "foo \\\nbar" - formats "foo {;1}" formats "foo {;1}" - formats "::Foo:: Bar" formats "::Foo:: Bar" - formats "1 + 2" formats "1 + 2" - formats "foo { | a, ( b , c ) | a + b + c }" formats "foo { | a, ( b , c ) | a + b + c }" - formats "foo { | a, ( _ , c ) | a + c }" formats "foo { | a, ( _ , c ) | a + c }" - formats ":foo" formats ":foo" + formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" + formats "case 1 \n when 2 ; 3 \n end" formats "case 1 \n when 2 ; 3 \n end" + formats "1 #foo \n2 #bar" formats "1 #foo \n2 #bar" + formats "1\n2\n# foo" formats "1\n2\n# foo" + formats "a = 1\nb, c = 2, 3\n{% begin %}\n a |= 1\n b |= 2\n c |= 3\n{% end %}" formats "a = 1\nb, c = 2, 3\n{% begin %}\n a |= 1\n b |= 2\n c |= 3\n{% end %}" + formats "foo \\\n foo: 1,\n bar: 2" formats "foo \\\n foo: 1,\n bar: 2" + formats "1\n.as(Int32)" formats "1\n.as(Int32)" + formats "def foo(\"bar baz\" qux)\nend" formats "def foo(\"bar baz\" qux)\nend" + formats "def foo ( x , y ,\n) \n end" formats "def foo ( x , y ,\n) \n end" + formats "foo(1, ) do\nend" formats "foo(1, ) do\nend" + formats "->{\nx\n}" formats "->{\nx\n}" + formats "case / /\nwhen /x/, / /\n / /\nend" formats "case / /\nwhen /x/, / /\n / /\nend" + formats "foo &.as(T)" formats "foo &.as(T)" formats "1.!=(2) { 3 }" formats "1.!=(2) { 3 }" - formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" - formats "10 ** a" formats "10 ** a" - formats "{\n a: 1,\n foo: bar,\n}" formats "{\n a: 1,\n foo: bar,\n}" - formats "foo.as ( Int32* )" formats "foo.as ( Int32* )" - formats "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" formats "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" - formats "foo(<<-X,\na\nX\n 1)" formats "foo(<<-X,\na\nX\n 1)" - formats "->\n:\nInt32\n{\n}" formats "->\n:\nInt32\n{\n}" - formats "private FOO = 2\nprivate A = 1" formats "private FOO = 2\nprivate A = 1" - formats "[\n a() # b\n]" formats "[\n a() # b\n]" - formats "foo{}" formats "foo{}" - formats "foo\n .bar\n .baz(\n 1\n )" formats "foo\n .bar\n .baz(\n 1\n )" - formats "def foo(**z, &block)\nend" formats "def foo(**z, &block)\nend" - formats "lib Foo\n fun foo =\n\n\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n\n\n bar(Int32) : Int32\nend" - formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" - formats "return" formats "return" - formats "@a" formats "@a" - formats "# foo\na = 1 # bar" formats "# foo\na = 1 # bar" - formats "yield( 1 )" formats "yield( 1 )" - formats "def foo(\n **a # comment\n)\n 1\nend" formats "def foo(\n **a # comment\n)\n 1\nend" - formats "x = uninitialized Int32" formats "x = uninitialized Int32" - formats "a = foo &.bar do\n 1 + 2\nend" formats "a = foo &.bar do\n 1 + 2\nend" - formats "class Actor\n macro inherited\nend\nend\n" formats "class Actor\n macro inherited\nend\nend\n" - formats "macro foo()\nend" formats "macro foo()\nend" + formats "{% for a in %w() %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% for a in %w() %}\n <<-FOO\n hello \n FOO\n{% end %}" + formats "lib Foo\nstruct Foo\nend\nend" formats "lib Foo\nstruct Foo\nend\nend" + formats "foo(\n 1,\n &.foo\n)" formats "foo(\n 1,\n &.foo\n)" + formats "foo = 1\n->foo.foo?" formats "foo = 1\n->foo.foo?" + formats "[] of (((Array(T))))" formats "[] of (((Array(T))))" + formats "->{1}" formats "->{1}" + formats "def foo(@[MyAnn] &block); end" formats "def foo(@[MyAnn] &block); end" + formats "return 1\n# end" formats "return 1\n# end" + formats "X(typeof(begin\n e.is_a?(Y)\nend))" formats "X(typeof(begin\n e.is_a?(Y)\nend))" + formats "1.<=(2) { 3 }" formats "1.<=(2) { 3 }" + formats "def foo(x y)\nend" formats "def foo(x y)\nend" + formats "foo.as? Int32*" formats "foo.as? Int32*" + formats "foo( 1 , 2 )" formats "foo( 1 , 2 )" + formats "offsetof( String, @length )" formats "offsetof( String, @length )" + formats "-> { }" formats "-> { }" + formats "foo(bar(baz3 do\nend))" formats "foo(bar(baz3 do\nend))" + formats "macro foo\n {% for x in y %} 2 {% end %}\nend" formats "macro foo\n {% for x in y %} 2 {% end %}\nend" + formats "-> : Int32 {}" formats "-> : Int32 {}" + formats "def foo \n end" formats "def foo \n end" formats "%x(foo \#{ bar })" formats "%x(foo \#{ bar })" - formats "1..\n2" formats "1..\n2" - formats "@[Foo( 1, 2, foo: 3 )]" formats "@[Foo( 1, 2, foo: 3 )]" - formats "def foo( x , & block : Int32->Float64)\nend" formats "def foo( x , & block : Int32->Float64)\nend" - formats "lib Foo\n fun bar = Bar\nend" formats "lib Foo\n fun bar = Bar\nend" - formats "[1,\n2,\n3\n]" formats "[1,\n2,\n3\n]" - formats "1\n.as(Int32)" formats "1\n.as(Int32)" - formats "foo = 1\n->foo.foo!" formats "foo = 1\n->foo.foo!" - formats "10/a" formats "10/a" - formats "return( *1 , *2 )" formats "return( *1 , *2 )" - formats "asm(\"nop\" :: )" formats "asm(\"nop\" :: )" - formats "if / /\nend" formats "if / /\nend" - formats "getter foo # comment\n\ndef foo\nend" formats "getter foo # comment\n\ndef foo\nend" - formats "foo : A(B)\nbar : C" formats "foo : A(B)\nbar : C" - formats "case\nend" formats "case\nend" - formats "if a\n b &c\nend" formats "if a\n b &c\nend" - formats "def foo(x)\n case self // x\n when 2\n 3\n end\nend" formats "def foo(x)\n case self // x\n when 2\n 3\n end\nend" - formats "bla.select(&.all?{ |x| x } )" formats "bla.select(&.all?{ |x| x } )" - formats "class Bar\nprotected def foo(x)\na=b(c)\nend\nend" formats "class Bar\nprotected def foo(x)\na=b(c)\nend\nend" - formats "as Foo" formats "as Foo" - formats "class Foo\n macro foo\n 1\n end\nend" formats "class Foo\n macro foo\n 1\n end\nend" - formats "def foo(\n a,\n b\n)\nend" formats "def foo(\n a,\n b\n)\nend" + formats "foo &.bar.is_a?(Baz)" formats "foo &.bar.is_a?(Baz)" + formats "return 1 , 2" formats "return 1 , 2" + formats "\n\n1" formats "\n\n1" + formats "{{ foo <<-X\nbar\nX\n}}" formats "{{ foo <<-X\nbar\nX\n}}" + formats "<<-FOO\nfoo\n1\nFOO" formats "<<-FOO\nfoo\n1\nFOO" formats "if 1\n ->{ 1 }\nend" formats "if 1\n ->{ 1 }\nend" - formats "def a\n b(\n a: 1, # x\n # y\n b: 2\n )\nend" formats "def a\n b(\n a: 1, # x\n # y\n b: 2\n )\nend" - formats "foo.% bar" formats "foo.% bar" - formats "macro foo(x, *, z)\nend" formats "macro foo(x, *, z)\nend" - formats "#### ###" formats "#### ###" - formats "x = 1\nx += 1" formats "x = 1\nx += 1" - formats "false" formats "false" - formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" - formats "begin\n select\n when foo\n # foo\n # bar\n else\n # foo\n # bar\n end\nend" formats "begin\n select\n when foo\n # foo\n # bar\n else\n # foo\n # bar\n end\nend" - formats "def foo(x @y)\nend" formats "def foo(x @y)\nend" - formats "if a\nelse\n2\nend" formats "if a\nelse\n2\nend" - formats "unless a\nunless b\n3\nelse\n4\nend\nend" formats "unless a\nunless b\n3\nelse\n4\nend\nend" - formats "Foo( x: Int32 )" formats "Foo( x: Int32 )" - formats "a = \\\n # foo\n nil" formats "a = \\\n # foo\n nil" - formats "as? Foo" formats "as? Foo" - formats "Foo( )" formats "Foo( )" - formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" - formats "while true\n1\n\n# foo\nend" formats "while true\n1\n\n# foo\nend" - formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" - formats "if 1;\n2; end" formats "if 1;\n2; end" - formats "1 + \\\n2 + \\\n3" formats "1 + \\\n2 + \\\n3" - formats "1 if 2" formats "1 if 2" - formats "1+2*3" formats "1+2*3" - formats " <<-HTML\n \#{1}\n HTML" formats " <<-HTML\n \#{1}\n HTML" - formats "foo ( )" formats "foo ( )" - formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "foo = 1\n->foo.bar=(Int32)" formats "foo = 1\n->foo.bar=(Int32)" - formats "x : {A, B, }" formats "x : {A, B, }" - formats "foo[x: 1, &.bar]" formats "foo[x: 1, &.bar]" - formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" - formats "nil?" formats "nil?" - formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" - formats "foo(bar([\n 1,\n]))" formats "foo(bar([\n 1,\n]))" - formats "1 # foo" formats "1 # foo" - formats "if # some comment\n 2 # another\n 3 # final \n end # end " formats "if # some comment\n 2 # another\n 3 # final \n end # end " - formats "macro foo\n 1 + 2 \n end" formats "macro foo\n 1 + 2 \n end" - formats "yield 1\n2" formats "yield 1\n2" - formats "class Foo; 1; end" formats "class Foo; 1; end" - formats "case 1\nwhen 2\n#comment\nend" formats "case 1\nwhen 2\n#comment\nend" - formats "# ```text\n# 1 + 2\n# ```" formats "# ```text\n# 1 + 2\n# ```" - formats "\"\#{\n foo = 1\n}\"" formats "\"\#{\n foo = 1\n}\"" - formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" - formats "$~" formats "$~" - formats "def foo ( @x) \n end" formats "def foo ( @x) \n end" - formats "case 1\nwhen 1, # 1\n 2, # 2\n 3 # 3\n 1\nend" formats "case 1\nwhen 1, # 1\n 2, # 2\n 3 # 3\n 1\nend" - formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" - formats "def foo(@x)\n\nrescue\nend" formats "def foo(@x)\n\nrescue\nend" + formats "asm(\"a\" : \"b\"(c)\n)" formats "asm(\"a\" : \"b\"(c)\n)" + formats "def a\n {\n 1, # x\n # y\n }\nend" formats "def a\n {\n 1, # x\n # y\n }\nend" + formats "def foo ( x : self ) \n end" formats "def foo ( x : self ) \n end" + formats "break {1, 2}, 3" formats "break {1, 2}, 3" + formats "Foo:: Bar" formats "Foo:: Bar" + formats "lib Bar\n enum Foo\n end\nend" formats "lib Bar\n enum Foo\n end\nend" + formats "[1, 2,\n 3, 4]\n" formats "[1, 2,\n 3, 4]\n" + formats "break { {1, 2}, {3, 4} }, 5" formats "break { {1, 2}, {3, 4} }, 5" + formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" + formats "alias A = (B) -> C" formats "alias A = (B) -> C" + formats "1 # foo\n1234 # bar" formats "1 # foo\n1234 # bar" + formats "foo &.bar" formats "foo &.bar" + formats "->@foo.foo" formats "->@foo.foo" + formats "::NamedTuple(T)" formats "::NamedTuple(T)" + formats "def foo\n# hello\n1\nend" formats "def foo\n# hello\n1\nend" + formats "->@foo.foo=" formats "->@foo.foo=" + formats "sizeof( Int32 )" formats "sizeof( Int32 )" formats "{ \"foo\": 1 }" formats "{ \"foo\": 1 }" - formats "long_variable_name = [\n {\n :foo => 1,\n }, {\n :bar => 2,\n },\n]" formats "long_variable_name = [\n {\n :foo => 1,\n }, {\n :bar => 2,\n },\n]" - formats "1#foo" formats "1#foo" - formats "if 1\n2\nelsif\n3\n4\nend" formats "if 1\n2\nelsif\n3\n4\nend" - formats "begin\n begin\n\n end\nend" formats "begin\n begin\n\n end\nend" - formats "foo &.[]=(1, 2)" formats "foo &.[]=(1, 2)" - formats "1 + \\\n2\n3" formats "1 + \\\n2\n3" - formats "a = %w(\n one two\n three four\n)" formats "a = %w(\n one two\n three four\n)" - formats " <<-EOF\n 1\n EOF" formats " <<-EOF\n 1\n EOF" - formats "break {1, 2}, {3, 4}" formats "break {1, 2}, {3, 4}" - formats "class X\n annotation FooAnnotation \n end \n end" formats "class X\n annotation FooAnnotation \n end \n end" - formats "\"\" + <<-END\n bar\n END" formats "\"\" + <<-END\n bar\n END" - formats "alias Foo = Bar" formats "alias Foo = Bar" - formats "asm(\"nop\" :::: \"volatile\" )" formats "asm(\"nop\" :::: \"volatile\" )" - formats "include Foo" formats "include Foo" - formats "macro bar\n 1\nend\n\ncase 1\nwhen 2 then 3\nwhen 45 then 6\nend" formats "macro bar\n 1\nend\n\ncase 1\nwhen 2 then 3\nwhen 45 then 6\nend" - formats "foo[x: 1, &.bar]?" formats "foo[x: 1, &.bar]?" - formats "if 1\n foo(\n bar,\n # comment\n )\nend" formats "if 1\n foo(\n bar,\n # comment\n )\nend" - formats "def self . foo\nend" formats "def self . foo\nend" - formats "a&-1" formats "a&-1" - formats "foo.bar(1) # comment\n .baz" formats "foo.bar(1) # comment\n .baz" - formats "foo(1, 2,\n)" formats "foo(1, 2,\n)" - formats "{%\n unless true\n 1\n end\n%}" formats "{%\n unless true\n 1\n end\n%}" - formats "->() do x end" formats "->() do x end" - formats "begin; 1; end" formats "begin; 1; end" - formats "case 1\nelse\n 2\nend" formats "case 1\nelse\n 2\nend" - formats "yield 1 , *2" formats "yield 1 , *2" - formats "{% verbatim do %}{{1}} + {{2}}{% end %}" formats "{% verbatim do %}{{1}} + {{2}}{% end %}" - formats "if 1\n {% if 2 %} {% end %}\nend" formats "if 1\n {% if 2 %} {% end %}\nend" - formats "foo do # hello\nend" formats "foo do # hello\nend" - formats "\"\\a\\c\#{foo}\\b\\d\"" formats "\"\\a\\c\#{foo}\\b\\d\"" + formats "{} of A => B\n{} of Foo => Bar" formats "{} of A => B\n{} of Foo => Bar" + formats "macro foo()\nend" formats "macro foo()\nend" + formats "def foo\n2 # foo\nend" formats "def foo\n2 # foo\nend" + formats "foo : (String -> String?) | (String)" formats "foo : (String -> String?) | (String)" + formats "[] of (Array(T))" formats "[] of (Array(T))" + formats "foo &.==(2)" formats "foo &.==(2)" + formats "foo . bar" formats "foo . bar" + formats "foo = 1\n->foo.bar=(Int32)" formats "foo = 1\n->foo.bar=(Int32)" + formats "a = [\n1,\n2]" formats "a = [\n1,\n2]" + formats "1 + \n2" formats "1 + \n2" + formats "macro foo\n {{1 + 2}}\nend" formats "macro foo\n {{1 + 2}}\nend" + formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" + formats "if 1\n# nothing\nend" formats "if 1\n# nothing\nend" + formats "foo.bar.baz\n.qux" formats "foo.bar.baz\n.qux" + formats "def foo ( x : Int32 = 1 ) \n end" formats "def foo ( x : Int32 = 1 ) \n end" + formats "asm(\n # the assembly template string, following the\n # syntax for LLVM's integrated assembler\n \"nop\" : # output operands\n\"=r\"(foo), \"=r\"(bar) : # input operands\n\"r\"(1), \"r\"(baz) : # names of clobbered registers\n\"eax\", \"memory\" : # optional flags, corresponding to the LLVM IR\n # sideeffect / alignstack / inteldialect / unwind attributes\n\"volatile\", \"alignstack\", \"intel\", \"unwind\"\n)" formats "asm(\n # the assembly template string, following the\n # syntax for LLVM's integrated assembler\n \"nop\" : # output operands\n\"=r\"(foo), \"=r\"(bar) : # input operands\n\"r\"(1), \"r\"(baz) : # names of clobbered registers\n\"eax\", \"memory\" : # optional flags, corresponding to the LLVM IR\n # sideeffect / alignstack / inteldialect / unwind attributes\n\"volatile\", \"alignstack\", \"intel\", \"unwind\"\n)" + formats "foo = {1, {2,\n 3},\n 4}" formats "foo = {1, {2,\n 3},\n 4}" + formats "x : (A -> B)" formats "x : (A -> B)" + formats "foo do;\n1; end" formats "foo do;\n1; end" + formats "10**a" formats "10**a" + formats "return 1" formats "return 1" + formats "1.>= do\nend" formats "1.>= do\nend" + formats ":+" formats ":+" formats "def foo ( x ,\n y ) \n end" formats "def foo ( x ,\n y ) \n end" - formats "break 1 , *2" formats "break 1 , *2" - formats "while 1\n2 # foo\nend" formats "while 1\n2 # foo\nend" - formats "def foo(**z : Foo)\nend" formats "def foo(**z : Foo)\nend" - formats "foo(\n1,\n\n 2 \n)" formats "foo(\n1,\n\n 2 \n)" - formats "def foo\n 1\n #\nrescue\nend" formats "def foo\n 1\n #\nrescue\nend" + formats "a = if 1\n2\nelsif 3\n4\nend" formats "a = if 1\n2\nelsif 3\n4\nend" + formats "/ /" formats "/ /" + formats "Union(Int32, String)?" formats "Union(Int32, String)?" + formats "if a\n b &c\nend" formats "if a\n b &c\nend" + formats "@x ||= 1" formats "@x ||= 1" + formats "<<-FOO\nfoobar\nFOO" formats "<<-FOO\nfoobar\nFOO" + formats "{ 1 => 2 ,\n 3 => 4 }" formats "{ 1 => 2 ,\n 3 => 4 }" + formats "a &.b[c]?" formats "a &.b[c]?" + formats "1 # foo\n1234 # bar\n\n10 # bar" formats "1 # foo\n1234 # bar\n\n10 # bar" + formats "foo . bar( x , y )" formats "foo . bar( x , y )" + formats "[1,\n2,\n3\n]" formats "[1,\n2,\n3\n]" + formats "Foo( x: Int32 , y: Float64 )" formats "Foo( x: Int32 , y: Float64 )" + formats "[ * [ * [ 1 ] ], * \n[ 2] ]" formats "[ * [ * [ 1 ] ], * \n[ 2] ]" + formats "{% foo <<-X\nbar\nX\n%}" formats "{% foo <<-X\nbar\nX\n%}" + formats "@[Foo()]" formats "@[Foo()]" + formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" + formats "abstract def foo \n 1" formats "abstract def foo \n 1" + formats "def x(@y = ->(z) {})\nend" formats "def x(@y = ->(z) {})\nend" + formats "1 #=> 2" formats "1 #=> 2" + formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" + formats "->do\nend" formats "->do\nend" + formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" + formats "foo &.@bar" formats "foo &.@bar" + formats "def foo : (A, B) ->\n nil\nend" formats "def foo : (A, B) ->\n nil\nend" + formats "`foo`" formats "`foo`" + formats "{% if true %}\n # x\n #\n{% end %}\n\n# ```\n# x\n# ```" formats "{% if true %}\n # x\n #\n{% end %}\n\n# ```\n# x\n# ```" + formats "1.==() { 3 }" formats "1.==() { 3 }" + formats "(a).b { }\nc" formats "(a).b { }\nc" + formats "Set{ # foo\n 1,\n}" formats "Set{ # foo\n 1,\n}" + formats "b &.[c]?.d" formats "b &.[c]?.d" + formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" + formats "$? = 1" formats "$? = 1" + formats "foo(\n 1, 2,\n&block)" formats "foo(\n 1, 2,\n&block)" + formats "<<-FOO\nbarfoo\nFOO" formats "<<-FOO\nbarfoo\nFOO" + formats "asm(\"nop\")" formats "asm(\"nop\")" + formats "def foo\n@x : Int32\nend" formats "def foo\n@x : Int32\nend" + formats "foo.bar # comment\n .baz" formats "foo.bar # comment\n .baz" + formats "foo(self // 1)" formats "foo(self // 1)" + formats "foo.bar &.baz( 1 , 2 )" formats "foo.bar &.baz( 1 , 2 )" + formats "1 || 2" formats "1 || 2" + formats "{ {foo: 2} }" formats "{ {foo: 2} }" formats "macro foo\n {{ 1 + 2 }}\\\n 1\n end" formats "macro foo\n {{ 1 + 2 }}\\\n 1\n end" - formats "def foo ( x , y , ) \n end" formats "def foo ( x , y , ) \n end" - formats "[/ /, / /]" formats "[/ /, / /]" - formats "foo.bar=(2)\n1" formats "foo.bar=(2)\n1" - formats "1 + # foo\n2" formats "1 + # foo\n2" + formats "foo((1..3))" formats "foo((1..3))" + formats "asm(\n\"nop\"\n)" formats "asm(\n\"nop\"\n)" + formats "x : Int32**" formats "x : Int32**" + formats "foo.as(T).bar" formats "foo.as(T).bar" + formats "0_u64" formats "0_u64" + formats "foo(\n1,\n\n 2 \n)" formats "foo(\n1,\n\n 2 \n)" + formats "def foo(a,\n **b)\nend" formats "def foo(a,\n **b)\nend" + formats "1 &&\n2 &&\n3" formats "1 &&\n2 &&\n3" + formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" + formats "foo.% bar" formats "foo.% bar" + formats "module Moo \n\n 1 \n\nend" formats "module Moo \n\n 1 \n\nend" + formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" + formats "begin\n1\nrescue\n3\nensure\n2\nend" formats "begin\n1\nrescue\n3\nensure\n2\nend" + formats "module Foo\n1\n\n# foo\nend" formats "module Foo\n1\n\n# foo\nend" + formats "@[Foo::Bar]" formats "@[Foo::Bar]" + formats "if 1\n foo(\n 1,\n 2 # lala\n )\nend\n" formats "if 1\n foo(\n 1,\n 2 # lala\n )\nend\n" formats "def foo(x)\n {% if true %}\n \\{% if true %}\n x = 1\n \\{% else %}\n x = 2\n \\{% end %}\n \\{% for x in y %}\n x = 1\n \\{% end %}\n \\{{x}}\n \\{% x %}\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n \\{% if true %}\n x = 1\n \\{% else %}\n x = 2\n \\{% end %}\n \\{% for x in y %}\n x = 1\n \\{% end %}\n \\{{x}}\n \\{% x %}\n {% end %}\nend" - formats "foo do | x , y | \n x \n end" formats "foo do | x , y | \n x \n end" + formats "def foo( @[MyAnn] v ); end" formats "def foo( @[MyAnn] v ); end" + formats "unless a\n2; 3\nelse\n3\nend" formats "unless a\n2; 3\nelse\n3\nend" + formats "if 1\n2\nend\nif 3\nend" formats "if 1\n2\nend\nif 3\nend" + formats "->() do x end" formats "->() do x end" + formats "foo : (A -> B)\nbar : C" formats "foo : (A -> B)\nbar : C" + formats "a = foo(baz1 do\nend)" formats "a = foo(baz1 do\nend)" + formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" + formats "{% if z %}\n class Foo\n end\n{% end %}" formats "{% if z %}\n class Foo\n end\n{% end %}" + formats "abstract def foo\nabstract def bar" formats "abstract def foo\nabstract def bar" + formats "+ a + d" formats "+ a + d" + formats "1 rescue 2" formats "1 rescue 2" + formats "next *1 , *2" formats "next *1 , *2" + formats "lib LibFoo\n struct Bar\n {% begin %}\n x : Int32\n {% end %}\n end\nend" formats "lib LibFoo\n struct Bar\n {% begin %}\n x : Int32\n {% end %}\n end\nend" + formats "foo(\n 1,\n) {\n 2\n}" formats "foo(\n 1,\n) {\n 2\n}" + formats "1 == / /" formats "1 == / /" + formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" + formats "foo[a, b: 2]" formats "foo[a, b: 2]" + formats "lib Foo\nfun foo\nend" formats "lib Foo\nfun foo\nend" + formats "def foo\n1\n2\n# foo\nend" formats "def foo\n1\n2\n# foo\nend" + formats "\"\#{foo = 1\n}\"" formats "\"\#{foo = 1\n}\"" + formats "あ.い = 1" formats "あ.い = 1" + formats "->foo" formats "->foo" + formats "bar do\n foo <<-X\n bar\n X\nend" formats "bar do\n foo <<-X\n bar\n X\nend" + formats "foo.bar. as? Int32" formats "foo.bar. as? Int32" + formats "foo(\"bar\": 1, \"baz qux\": 2)" formats "foo(\"bar\": 1, \"baz qux\": 2)" + formats "foo(1 + \n2)" formats "foo(1 + \n2)" + formats "[\n 1, # foo\n 3,\n]" formats "[\n 1, # foo\n 3,\n]" + formats "あ.い, う.え.お = 1, 2" formats "あ.い, う.え.お = 1, 2" + formats "def foo\nend;def bar\nend" formats "def foo\nend;def bar\nend" + formats "<<-FOO\n1\nFOO\n\n{\n 1 => 2,\n 10 => 3,\n}" formats "<<-FOO\n1\nFOO\n\n{\n 1 => 2,\n 10 => 3,\n}" + formats "case 1 \n when .foo? \n 3 \n end" formats "case 1 \n when .foo? \n 3 \n end" + formats "while / /\nend" formats "while / /\nend" + formats "def foo(x)\n {% if true %}\n # comment\n Foo = 1\n B = 2\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n # comment\n Foo = 1\n B = 2\n {% end %}\nend" + formats "foo[ 1 , 2 ] =3" formats "foo[ 1 , 2 ] =3" + formats "'a'" formats "'a'" + formats "def foo ( x ) : Int32 \n end" formats "def foo ( x ) : Int32 \n end" + formats "next 1 , *2" formats "next 1 , *2" + formats "def foo(**b, # comment\n &block)\nend" formats "def foo(**b, # comment\n &block)\nend" + formats "1\n2 \n # foo" formats "1\n2 \n # foo" + formats "# ```text\n# 1 + 2\n# ```" formats "# ```text\n# 1 + 2\n# ```" + formats "foo(//, //)" formats "foo(//, //)" + formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" + formats "foo &.bar.nil?()" formats "foo &.bar.nil?()" + formats "asm(\"a\" :: : : \"volatile\")" formats "asm(\"a\" :: : : \"volatile\")" + formats "next {1, 2}, {3, 4}" formats "next {1, 2}, {3, 4}" + formats "while true\n1\n\n# foo\nend" formats "while true\n1\n\n# foo\nend" + formats "class Foo\nend\nclass Bar\nend" formats "class Foo\nend\nclass Bar\nend" + formats "def run\n\nrescue\n 2\n 3\nend" formats "def run\n\nrescue\n 2\n 3\nend" + formats "def foo : A | B(C)\n nil\nend" formats "def foo : A | B(C)\n nil\nend" + formats "\"\\a\\c\#{foo}\\b\\d\"" formats "\"\\a\\c\#{foo}\\b\\d\"" + formats "if 1\n[ 1 , 2 , 3 ]\nend" formats "if 1\n[ 1 , 2 , 3 ]\nend" + formats "case 1\nwhen \"foo\" then 3\nwhen \"lalalala\" then 4\nelse 5\nend" formats "case 1\nwhen \"foo\" then 3\nwhen \"lalalala\" then 4\nelse 5\nend" + formats "foo (1; 2)" formats "foo (1; 2)" + formats "foo.bar. as Int32" formats "foo.bar. as Int32" + formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" + formats "while 1\n2\nend" formats "while 1\n2\nend" + formats "[\n a() # b\n]" formats "[\n a() # b\n]" + formats "\" \" * 2" formats "\" \" * 2" + formats "-> : Int32* {}" formats "-> : Int32* {}" + formats "foo.%(bar)" formats "foo.%(bar)" + formats "struct Foo \n\n 1 \n\nend" formats "struct Foo \n\n 1 \n\nend" + formats "foo(\n 1, 2)" formats "foo(\n 1, 2)" + formats "foo = 1\n->foo.foo=" formats "foo = 1\n->foo.foo=" + formats "def foo(x)\n self // x\nend" formats "def foo(x)\n self // x\nend" + formats "while 1 # foo\nend" formats "while 1 # foo\nend" + formats "def foo\n 1\nend\n\n# Comment\n\ndef bar\n 2\nend" formats "def foo\n 1\nend\n\n# Comment\n\ndef bar\n 2\nend" + formats "return { 1 , 2 }" formats "return { 1 , 2 }" + formats "String?" formats "String?" + formats "<<-FOO\nbarfoobar\nFOO" formats "<<-FOO\nbarfoobar\nFOO" + formats "foo.as? ( Int32* )" formats "foo.as? ( Int32* )" + formats "foo([\n 1,\n 2,\n 3,\n])" formats "foo([\n 1,\n 2,\n 3,\n])" + formats "-> : Int32 { }" formats "-> : Int32 { }" + formats "class X\n annotation FooAnnotation \n end \n end" formats "class X\n annotation FooAnnotation \n end \n end" + formats "if a\n2\nelse\n3\nend" formats "if a\n2\nelse\n3\nend" + formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" + formats "# foo\na = 1 # bar" formats "# foo\na = 1 # bar" + formats "foo(baz(x, y) do\n 1 + 2\nend)" formats "foo(baz(x, y) do\n 1 + 2\nend)" + formats "%[hello]" formats "%[hello]" + formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" + formats "lib Foo\n fun foo =\n\n\n bar : Void\nend" formats "lib Foo\n fun foo =\n\n\n bar : Void\nend" + formats "begin\n1\nrescue ex : Int32 \n3\nend" formats "begin\n1\nrescue ex : Int32 \n3\nend" + formats "\"\#{\n foo = 1}\"" formats "\"\#{\n foo = 1}\"" + formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" + formats "foo 1, a: 1,\nb: 2,\nc: 3" formats "foo 1, a: 1,\nb: 2,\nc: 3" + formats "\"foo \#{ __DIR__ }\"" formats "\"foo \#{ __DIR__ }\"" + formats "foo(1,\n &.bar)" formats "foo(1,\n &.bar)" + formats "def foo( x , & : Int32 )\nend" formats "def foo( x , & : Int32 )\nend" + formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" + formats "class Foo\n1\n\n# foo\nend" formats "class Foo\n1\n\n# foo\nend" + formats "1 \\\nif 2" formats "1 \\\nif 2" + formats "module M\n @[MyAnn(\n 1\n\n )]\nend" formats "module M\n @[MyAnn(\n 1\n\n )]\nend" + formats "$0" formats "$0" + formats "[1, 2, 3, ]" formats "[1, 2, 3, ]" + formats "{ {1}.foo, 2 }" formats "{ {1}.foo, 2 }" + formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" + formats "if a\nelse\n2\nend" formats "if a\nelse\n2\nend" + formats "foo { | ( a, *b , c ) | a }" formats "foo { | ( a, *b , c ) | a }" + formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" + formats "\"foo \#{bar}\" \\\n \"baz\"" formats "\"foo \#{bar}\" \\\n \"baz\"" + formats "extend Foo" formats "extend Foo" + formats "macro foo\n if 1\n 1 + 2\n end\nend" formats "macro foo\n if 1\n 1 + 2\n end\nend" + formats "->: Int32 do\nx\nend" formats "->: Int32 do\nx\nend" + formats "lib Foo\ntype Foo = Bar\nend" formats "lib Foo\ntype Foo = Bar\nend" + formats "foo(bar(\n 1,\n 2,\n))" formats "foo(bar(\n 1,\n 2,\n))" + formats "<<-HTML\n \#{\"foo\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n HTML" + formats "->( x : Int32 , y ) { x }" formats "->( x : Int32 , y ) { x }" + formats "a &.b.c.as C" formats "a &.b.c.as C" + formats "a , b = 1 , 2" formats "a , b = 1 , 2" + formats "def foo ( bar @select) \n end" formats "def foo ( bar @select) \n end" adds trailing comma to def multi-line normal, splat, and double splat parameters - formats "def foo(\n a,\n b c\n)\nend" formats "def foo(\n a,\n b c\n)\nend" - formats "macro foo(\n a,\n b\n)\nend" formats "macro foo(\n a,\n b\n)\nend" - formats "fun foo(\n a : Int32,\n ...\n)\nend" formats "fun foo(\n a : Int32,\n ...\n)\nend" - formats "def foo(\n a, b,\n c, d\n)\nend" formats "def foo(\n a, b,\n c, d\n)\nend" - formats "def foo(\n a : Int32,\n b : Int32\n)\nend" formats "def foo(\n a : Int32,\n b : Int32\n)\nend" - formats "def foo(\n a,\n @[Ann]\n b\n)\nend" formats "def foo(\n a,\n @[Ann]\n b\n)\nend" - formats "def foo(a, *args, &block)\nend" formats "def foo(a, *args, &block)\nend" - formats "def foo(a)\nend" formats "def foo(a)\nend" + formats "def foo(\n a,\n **b\n)\nend" formats "def foo(\n a,\n **b\n)\nend" formats "def foo(a, **kwargs)\nend" formats "def foo(a, **kwargs)\nend" formats "def foo(\n a,\n *b\n)\nend" formats "def foo(\n a,\n *b\n)\nend" - formats "def foo(\n a,\n @[Ann] b\n)\nend" formats "def foo(\n a,\n @[Ann] b\n)\nend" - formats "def foo(\n a : Int32,\n b : Int32 = 1\n)\nend" formats "def foo(\n a : Int32,\n b : Int32 = 1\n)\nend" formats "def foo(\n a, b\n)\nend" formats "def foo(\n a, b\n)\nend" - formats "def foo(\n a, # Foo\n b # Bar\n)\nend" formats "def foo(\n a, # Foo\n b # Bar\n)\nend" - formats "def foo(a, **kwargs, &block)\nend" formats "def foo(a, **kwargs, &block)\nend" - formats "def foo(\n a,\n)\nend" formats "def foo(\n a,\n)\nend" + formats "def foo(\n a : Int32,\n b : Int32 = 1\n)\nend" formats "def foo(\n a : Int32,\n b : Int32 = 1\n)\nend" formats "def foo(a, &block)\nend" formats "def foo(a, &block)\nend" - formats "macro foo(\n a,\n *b\n)\nend" formats "macro foo(\n a,\n *b\n)\nend" - formats "def foo(\n a,\n **b\n)\nend" formats "def foo(\n a,\n **b\n)\nend" + formats "macro foo(\n a,\n b\n)\nend" formats "macro foo(\n a,\n b\n)\nend" + formats "fun foo(\n a : Int32,\n b : Int32\n)\nend" formats "fun foo(\n a : Int32,\n b : Int32\n)\nend" formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" formats "def foo(a, b)\nend" formats "def foo(a, b)\nend" + formats "def foo(\n a : Int32,\n b : Int32\n)\nend" formats "def foo(\n a : Int32,\n b : Int32\n)\nend" + formats "def foo(a, *args, &block)\nend" formats "def foo(a, *args, &block)\nend" + formats "def foo(\n a,\n @[Ann] b\n)\nend" formats "def foo(\n a,\n @[Ann] b\n)\nend" + formats "def foo(\n a,\n)\nend" formats "def foo(\n a,\n)\nend" + formats "def foo(\n a,\n b c\n)\nend" formats "def foo(\n a,\n b c\n)\nend" + formats "macro foo(\n a,\n *b\n)\nend" formats "macro foo(\n a,\n *b\n)\nend" formats "def foo(\n a,\n b\n)\nend" formats "def foo(\n a,\n b\n)\nend" - formats "fun foo(\n a : Int32,\n b : Int32\n)\nend" formats "fun foo(\n a : Int32,\n b : Int32\n)\nend" + formats "fun foo(\n a : Int32,\n ...\n)\nend" formats "fun foo(\n a : Int32,\n ...\n)\nend" + formats "def foo(\n a, # Foo\n b # Bar\n)\nend" formats "def foo(\n a, # Foo\n b # Bar\n)\nend" formats "def foo(a, *args)\nend" formats "def foo(a, *args)\nend" - formats "a , b = 1 , 2" formats "a , b = 1 , 2" - formats "$? = 1" formats "$? = 1" - formats "a = case 1\nwhen 2\n3\nend" formats "a = case 1\nwhen 2\n3\nend" - formats "{% foo <<-X\nbar\nX\n%}" formats "{% foo <<-X\nbar\nX\n%}" - formats "%r(foo \#{ bar })" formats "%r(foo \#{ bar })" - formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" - formats "{1, 2, 3}" formats "{1, 2, 3}" - formats "def foo : self | Nil\n nil\nend" formats "def foo : self | Nil\n nil\nend" - formats "alias Foo::Bar = Baz" formats "alias Foo::Bar = Baz" - formats "foo[&.bar]" formats "foo[&.bar]" - formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" - formats "foo.[1, 2] = 3" formats "foo.[1, 2] = 3" - formats "break" formats "break" - formats "begin\n 0[1] rescue 2 end" formats "begin\n 0[1] rescue 2 end" - formats "x, y, z = <<-FOO, <<-BAR, <<-BAZ\n hello\n FOO\n world\n BAR\n qux\nBAZ" formats "x, y, z = <<-FOO, <<-BAR, <<-BAZ\n hello\n FOO\n world\n BAR\n qux\nBAZ" - formats "<<-FOO\nbarfoobar\nFOO" formats "<<-FOO\nbarfoobar\nFOO" - formats "alias Foo= Bar" formats "alias Foo= Bar" - formats "a.b &.[c]?\n1" formats "a.b &.[c]?\n1" - formats "begin\n / /\nend" formats "begin\n / /\nend" - formats "! 1" formats "! 1" - Unicode bi-directional control characters - formats "foo(\"\u202C\": 1)" formats "foo(\"\u202C\": 1)" - formats "%q(\u202E)" formats "%q(\u202E)" - formats "{\"\u202A\": 1}" formats "{\"\u202A\": 1}" - formats "\"\\c\u2067\"" formats "\"\\c\u2067\"" - formats "%Q(\u2067\#{1})" formats "%Q(\u2067\#{1})" - formats "%w(\u2068)" formats "%w(\u2068)" - formats "\"\\c\u2066\"" formats "\"\\c\u2066\"" - formats "%w(\u202C)" formats "%w(\u202C)" - formats "%(\u2067)" formats "%(\u2067)" - formats "%q(\u202A)" formats "%q(\u202A)" - formats "\"\u2066\#{1}\"" formats "\"\u2066\#{1}\"" - formats "%r(\u202B\#{1})" formats "%r(\u202B\#{1})" - formats "/\u2067\#{1}/" formats "/\u2067\#{1}/" - formats "\"\\c\u202D\"" formats "\"\\c\u202D\"" - formats "NamedTuple(\"\u2069\": Int32)" formats "NamedTuple(\"\u2069\": Int32)" - formats "\"\u202A\"" formats "\"\u202A\"" - formats "\"\u2067\"" formats "\"\u2067\"" - formats "\"\u202D\"" formats "\"\u202D\"" - formats "foo(\"\u202D\": 1)" formats "foo(\"\u202D\": 1)" - formats "NamedTuple(\"\u2068\": Int32)" formats "NamedTuple(\"\u2068\": Int32)" - formats "/\u2066\#{1}/" formats "/\u2066\#{1}/" - formats "%r(\u202E)" formats "%r(\u202E)" - formats "%r(\u202E\#{1})" formats "%r(\u202E\#{1})" - formats "<<-'EOS'\n\u202A\nEOS" formats "<<-'EOS'\n\u202A\nEOS" - formats "%Q(\u2066)" formats "%Q(\u2066)" - formats "\"\\c\u202A\#{1}\"" formats "\"\\c\u202A\#{1}\"" - formats "NamedTuple(\"\u202D\": Int32)" formats "NamedTuple(\"\u202D\": Int32)" - formats "%(\u2068)" formats "%(\u2068)" - formats "{\"\u2066\": 1}" formats "{\"\u2066\": 1}" - formats "\"\\c\u2068\#{1}\"" formats "\"\\c\u2068\#{1}\"" - formats "%r(\u2066)" formats "%r(\u2066)" - formats "<<-'EOS'\n\u2066\nEOS" formats "<<-'EOS'\n\u2066\nEOS" - formats "<<-EOS\n\u202B\nEOS" formats "<<-EOS\n\u202B\nEOS" - formats "/\u2067/" formats "/\u2067/" - formats "/\u202E/" formats "/\u202E/" - formats "def foo(\"\u202D\" x)\nend" formats "def foo(\"\u202D\" x)\nend" - formats "foo(\"\u202E\": 1)" formats "foo(\"\u202E\": 1)" - formats "<<-EOS\n\u2067\nEOS" formats "<<-EOS\n\u2067\nEOS" - formats "/\u202A\#{1}/" formats "/\u202A\#{1}/" - formats "/\u202B/" formats "/\u202B/" - formats "\"\\c\u202C\#{1}\"" formats "\"\\c\u202C\#{1}\"" - formats "<<-'EOS'\n\u202D\nEOS" formats "<<-'EOS'\n\u202D\nEOS" - formats "%i(\u202B)" formats "%i(\u202B)" - formats "{\"\u202E\": 1}" formats "{\"\u202E\": 1}" - formats "\"\\c\u202B\#{1}\"" formats "\"\\c\u202B\#{1}\"" - formats "\"\u202B\#{1}\"" formats "\"\u202B\#{1}\"" - formats "\"\u2068\"" formats "\"\u2068\"" - formats "<<-EOS\n\u202E\#{1}\nEOS" formats "<<-EOS\n\u202E\#{1}\nEOS" - formats "\"\\c\u202E\#{1}\"" formats "\"\\c\u202E\#{1}\"" - formats "%i(\u2066)" formats "%i(\u2066)" - formats "%r(\u2067)" formats "%r(\u2067)" - formats "%Q(\u2068\#{1})" formats "%Q(\u2068\#{1})" - formats "/\u202B\#{1}/" formats "/\u202B\#{1}/" - formats "%Q(\u2069\#{1})" formats "%Q(\u2069\#{1})" - formats "NamedTuple(\"\u202E\": Int32)" formats "NamedTuple(\"\u202E\": Int32)" - formats "/\u2069\#{1}/" formats "/\u2069\#{1}/" - formats "/\u2068/" formats "/\u2068/" - formats "{\"\u202D\": 1}" formats "{\"\u202D\": 1}" - formats "<<-'EOS'\n\u2068\nEOS" formats "<<-'EOS'\n\u2068\nEOS" - formats "%q(\u2067)" formats "%q(\u2067)" - formats "\"\\c\u2069\"" formats "\"\\c\u2069\"" - formats "%(\u202A)" formats "%(\u202A)" - formats "<<-EOS\n\u202D\#{1}\nEOS" formats "<<-EOS\n\u202D\#{1}\nEOS" - formats "foo(\"\u2068\": 1)" formats "foo(\"\u2068\": 1)" - formats "%Q(\u202A\#{1})" formats "%Q(\u202A\#{1})" - formats "<<-'EOS'\n\u2067\nEOS" formats "<<-'EOS'\n\u2067\nEOS" - formats "%Q(\u202D\#{1})" formats "%Q(\u202D\#{1})" - formats "%w(\u202E)" formats "%w(\u202E)" - formats "%q(\u2069)" formats "%q(\u2069)" - formats "\"\\c\u202A\"" formats "\"\\c\u202A\"" - formats "def foo(\"\u2067\" x)\nend" formats "def foo(\"\u2067\" x)\nend" - formats "<<-'EOS'\n\u202C\nEOS" formats "<<-'EOS'\n\u202C\nEOS" - formats "<<-'EOS'\n\u202E\nEOS" formats "<<-'EOS'\n\u202E\nEOS" - formats "<<-'EOS'\n\u2069\nEOS" formats "<<-'EOS'\n\u2069\nEOS" - formats "foo(\"\u2069\": 1)" formats "foo(\"\u2069\": 1)" - formats "%i(\u202A)" formats "%i(\u202A)" - formats "<<-EOS\n\u2068\#{1}\nEOS" formats "<<-EOS\n\u2068\#{1}\nEOS" - formats "\"\u202B\"" formats "\"\u202B\"" - formats "%r(\u202D\#{1})" formats "%r(\u202D\#{1})" - formats "<<-EOS\n\u2069\nEOS" formats "<<-EOS\n\u2069\nEOS" - formats "\"\\c\u202B\"" formats "\"\\c\u202B\"" - formats "def foo(\"\u2069\" x)\nend" formats "def foo(\"\u2069\" x)\nend" - formats "/\u202E\#{1}/" formats "/\u202E\#{1}/" - formats "%r(\u2066\#{1})" formats "%r(\u2066\#{1})" - formats "%i(\u202E)" formats "%i(\u202E)" - formats "%(\u2066)" formats "%(\u2066)" - formats "<<-EOS\n\u202C\#{1}\nEOS" formats "<<-EOS\n\u202C\#{1}\nEOS" - formats "/\u202C\#{1}/" formats "/\u202C\#{1}/" - formats "<<-'EOS'\n\u202B\nEOS" formats "<<-'EOS'\n\u202B\nEOS" - formats "<<-EOS\n\u202E\nEOS" formats "<<-EOS\n\u202E\nEOS" - formats "\"\u2069\#{1}\"" formats "\"\u2069\#{1}\"" - formats "foo(\"\u2066\": 1)" formats "foo(\"\u2066\": 1)" - formats "%r(\u2068)" formats "%r(\u2068)" - formats "<<-EOS\n\u2066\#{1}\nEOS" formats "<<-EOS\n\u2066\#{1}\nEOS" - formats "<<-EOS\n\u202C\nEOS" formats "<<-EOS\n\u202C\nEOS" - formats "%(\u2069)" formats "%(\u2069)" - formats "%Q(\u2067)" formats "%Q(\u2067)" - formats "%i(\u2069)" formats "%i(\u2069)" - formats "NamedTuple(\"\u202C\": Int32)" formats "NamedTuple(\"\u202C\": Int32)" - formats "%q(\u202B)" formats "%q(\u202B)" - formats "\"\u202E\"" formats "\"\u202E\"" - formats "{\"\u2068\": 1}" formats "{\"\u2068\": 1}" - formats "%r(\u202C\#{1})" formats "%r(\u202C\#{1})" - formats "%i(\u202C)" formats "%i(\u202C)" - formats "%q(\u2066)" formats "%q(\u2066)" - formats "\"\u2069\"" formats "\"\u2069\"" - formats "\"\\c\u2068\"" formats "\"\\c\u2068\"" - formats "\"\u202D\#{1}\"" formats "\"\u202D\#{1}\"" - formats "/\u2069/" formats "/\u2069/" - formats "%q(\u2068)" formats "%q(\u2068)" - formats "%Q(\u202D)" formats "%Q(\u202D)" - formats "NamedTuple(\"\u202B\": Int32)" formats "NamedTuple(\"\u202B\": Int32)" - formats "/\u202D/" formats "/\u202D/" - formats "%Q(\u2066\#{1})" formats "%Q(\u2066\#{1})" - formats "%r(\u2069)" formats "%r(\u2069)" - formats "NamedTuple(\"\u2067\": Int32)" formats "NamedTuple(\"\u2067\": Int32)" - formats "%(\u202D)" formats "%(\u202D)" - formats "\"\\c\u2066\#{1}\"" formats "\"\\c\u2066\#{1}\"" - formats "NamedTuple(\"\u2066\": Int32)" formats "NamedTuple(\"\u2066\": Int32)" - formats "%q(\u202C)" formats "%q(\u202C)" - formats "<<-EOS\n\u2066\nEOS" formats "<<-EOS\n\u2066\nEOS" - formats "%q(\u202D)" formats "%q(\u202D)" - formats "%(\u202B)" formats "%(\u202B)" - formats "\"\\c\u2067\#{1}\"" formats "\"\\c\u2067\#{1}\"" - formats "%Q(\u202B\#{1})" formats "%Q(\u202B\#{1})" - formats "%r(\u202B)" formats "%r(\u202B)" - formats "foo(\"\u202A\": 1)" formats "foo(\"\u202A\": 1)" - formats "%r(\u2068\#{1})" formats "%r(\u2068\#{1})" - formats "%Q(\u202C)" formats "%Q(\u202C)" - formats "%Q(\u2069)" formats "%Q(\u2069)" - formats "\"\\c\u202C\"" formats "\"\\c\u202C\"" - formats "/\u2066/" formats "/\u2066/" - formats "\"\u202A\#{1}\"" formats "\"\u202A\#{1}\"" - formats "%Q(\u2068)" formats "%Q(\u2068)" - formats "%r(\u202C)" formats "%r(\u202C)" - formats "def foo(\"\u2068\" x)\nend" formats "def foo(\"\u2068\" x)\nend" - formats "%i(\u2068)" formats "%i(\u2068)" - formats "<<-EOS\n\u202B\#{1}\nEOS" formats "<<-EOS\n\u202B\#{1}\nEOS" - formats "%r(\u202A)" formats "%r(\u202A)" - formats "{\"\u2067\": 1}" formats "{\"\u2067\": 1}" - formats "%r(\u2069\#{1})" formats "%r(\u2069\#{1})" - formats "%Q(\u202E\#{1})" formats "%Q(\u202E\#{1})" - formats "<<-EOS\n\u202A\nEOS" formats "<<-EOS\n\u202A\nEOS" - formats "\"\u2068\#{1}\"" formats "\"\u2068\#{1}\"" - formats "%i(\u202D)" formats "%i(\u202D)" - formats "%Q(\u202A)" formats "%Q(\u202A)" - formats "{\"\u202C\": 1}" formats "{\"\u202C\": 1}" - formats "\"\u202C\#{1}\"" formats "\"\u202C\#{1}\"" - formats "foo(\"\u2067\": 1)" formats "foo(\"\u2067\": 1)" - formats "%w(\u2069)" formats "%w(\u2069)" - formats "\"\u202C\"" formats "\"\u202C\"" - formats "%r(\u202D)" formats "%r(\u202D)" - formats "NamedTuple(\"\u202A\": Int32)" formats "NamedTuple(\"\u202A\": Int32)" - formats "<<-EOS\n\u202D\nEOS" formats "<<-EOS\n\u202D\nEOS" - formats "%Q(\u202E)" formats "%Q(\u202E)" - formats "<<-EOS\n\u2069\#{1}\nEOS" formats "<<-EOS\n\u2069\#{1}\nEOS" - formats "{\"\u202B\": 1}" formats "{\"\u202B\": 1}" - formats "def foo(\"\u202B\" x)\nend" formats "def foo(\"\u202B\" x)\nend" - formats "\"\\c\u202D\#{1}\"" formats "\"\\c\u202D\#{1}\"" - formats "%w(\u202A)" formats "%w(\u202A)" - formats "def foo(\"\u202E\" x)\nend" formats "def foo(\"\u202E\" x)\nend" - formats "<<-EOS\n\u2067\#{1}\nEOS" formats "<<-EOS\n\u2067\#{1}\nEOS" - formats "def foo(\"\u202A\" x)\nend" formats "def foo(\"\u202A\" x)\nend" - formats "\"\u202E\#{1}\"" formats "\"\u202E\#{1}\"" - formats "\"\\c\u2069\#{1}\"" formats "\"\\c\u2069\#{1}\"" - formats "/\u202C/" formats "/\u202C/" - formats "<<-EOS\n\u2068\nEOS" formats "<<-EOS\n\u2068\nEOS" - formats "{\"\u2069\": 1}" formats "{\"\u2069\": 1}" - formats "%w(\u202D)" formats "%w(\u202D)" - formats "%r(\u2067\#{1})" formats "%r(\u2067\#{1})" - formats "def foo(\"\u202C\" x)\nend" formats "def foo(\"\u202C\" x)\nend" - formats "def foo(\"\u2066\" x)\nend" formats "def foo(\"\u2066\" x)\nend" - formats "%w(\u2066)" formats "%w(\u2066)" - formats "%Q(\u202C\#{1})" formats "%Q(\u202C\#{1})" - formats "/\u202A/" formats "/\u202A/" - formats "%Q(\u202B)" formats "%Q(\u202B)" - formats "\"\\c\u202E\"" formats "\"\\c\u202E\"" - formats "%r(\u202A\#{1})" formats "%r(\u202A\#{1})" - formats "\"\u2067\#{1}\"" formats "\"\u2067\#{1}\"" - formats "%w(\u2067)" formats "%w(\u2067)" - formats "%w(\u202B)" formats "%w(\u202B)" - formats "%i(\u2067)" formats "%i(\u2067)" - formats "foo(\"\u202B\": 1)" formats "foo(\"\u202B\": 1)" - formats "\"\u2066\"" formats "\"\u2066\"" - formats "<<-EOS\n\u202A\#{1}\nEOS" formats "<<-EOS\n\u202A\#{1}\nEOS" - formats "/\u202D\#{1}/" formats "/\u202D\#{1}/" - formats "%(\u202C)" formats "%(\u202C)" - formats "/\u2068\#{1}/" formats "/\u2068\#{1}/" - formats "%(\u202E)" formats "%(\u202E)" - formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" - formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" - formats "{ } of A => B" formats "{ } of A => B" - formats "->@@foo.foo!" formats "->@@foo.foo!" - formats "lib Foo\n fun foo =\n\n\n bar : Void\nend" formats "lib Foo\n fun foo =\n\n\n bar : Void\nend" - formats "1 // 2" formats "1 // 2" - formats "foo(1, ) { }" formats "foo(1, ) { }" - formats "next *1" formats "next *1" - formats "while 1;\n2; end" formats "while 1;\n2; end" - formats "a = foo(bar(baz3 do\nend))" formats "a = foo(bar(baz3 do\nend))" - formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" - formats "/foo/" formats "/foo/" - formats "+ 1" formats "+ 1" - formats "def foo\n {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}\nend" formats "def foo\n {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}\nend" - formats "begin\n1\n2\n3\nend" formats "begin\n1\n2\n3\nend" - formats "foo\n .foo1(bar\n .bar1\n .bar2)" formats "foo\n .foo1(bar\n .bar1\n .bar2)" - formats "a = 1\ndef bar\nend" formats "a = 1\ndef bar\nend" - formats "\n# hello\n\n\n1" formats "\n# hello\n\n\n1" - formats "case 1\nwhen a; 2\nelse; ; b\nend" formats "case 1\nwhen a; 2\nelse; ; b\nend" - formats "foo : (A -> B)\nbar : C" formats "foo : (A -> B)\nbar : C" - formats "case 1 \n when 2 then 3 \n end" formats "case 1 \n when 2 then 3 \n end" - formats "{ {foo: 2} }" formats "{ {foo: 2} }" - formats "Set { 1 , 2 }" formats "Set { 1 , 2 }" - formats "foo()" formats "foo()" - formats "foo : ( A | B )" formats "foo : ( A | B )" - formats "def foo(\"bar baz\" qux)\nend" formats "def foo(\"bar baz\" qux)\nend" - formats "bar = foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n })" formats "bar = foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n })" - formats "begin\n1 ? 2 : 3\nend" formats "begin\n1 ? 2 : 3\nend" - formats "<<-HTML\n \#{1}x\n HTML" formats "<<-HTML\n \#{1}x\n HTML" - formats "-> : Int32? {}" formats "-> : Int32? {}" - formats "->{ x }" formats "->{ x }" - formats "foo bar # comment\n\n# doc\ndef baz; end" formats "foo bar # comment\n\n# doc\ndef baz; end" - formats "->( x , y ) { x }" formats "->( x , y ) { x }" - formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" - formats "foo(->{\n 1 + 2\n})" formats "foo(->{\n 1 + 2\n})" - formats "module Readline\n @@completion_proc : (String -> Array(String)?) | (String -> Array(String)) | Nil\nend" formats "module Readline\n @@completion_proc : (String -> Array(String)?) | (String -> Array(String)) | Nil\nend" - formats "class Foo ( *T, U )\nend" formats "class Foo ( *T, U )\nend" + formats "def foo(\n a,\n @[Ann]\n b\n)\nend" formats "def foo(\n a,\n @[Ann]\n b\n)\nend" + formats "def foo(a)\nend" formats "def foo(a)\nend" + formats "def foo(\n a, b,\n c, d\n)\nend" formats "def foo(\n a, b,\n c, d\n)\nend" + formats "def foo(a, **kwargs, &block)\nend" formats "def foo(a, **kwargs, &block)\nend" + formats "begin\n begin\n a\n # b\n end\nend" formats "begin\n begin\n a\n # b\n end\nend" + formats "page= <<-HTML\n \#{1}foo\nHTML" formats "page= <<-HTML\n \#{1}foo\nHTML" + formats "foo(1 &+ \n2)" formats "foo(1 &+ \n2)" + formats "fun foo(x : Int32) : Int32\n 1\nend" formats "fun foo(x : Int32) : Int32\n 1\nend" + formats "foo &.[](1, 2)" formats "foo &.[](1, 2)" + formats "a = 1;;; b = 2" formats "a = 1;;; b = 2" + formats "def foo ( @@select) \n end" formats "def foo ( @@select) \n end" formats "foo 1" formats "foo 1" - formats "$0.bar" formats "$0.bar" - formats "<<-HTML\n \#{\"foo\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n HTML" - formats "if 1\nif 2\n3 # foo\nend\nend" formats "if 1\nif 2\n3 # foo\nend\nend" - formats "foo &.as(T).bar" formats "foo &.as(T).bar" - formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" - formats "{\n \"a\" => 1, \"b\" => 2,\n \"foo\" => 3, \"bar\" => 4,\n \"coconio\" => 5, \"lala\" => 6,\n}\n" formats "{\n \"a\" => 1, \"b\" => 2,\n \"foo\" => 3, \"bar\" => 4,\n \"coconio\" => 5, \"lala\" => 6,\n}\n" - formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" - formats "[\n# foo\n] of String" formats "[\n# foo\n] of String" - formats "if a\n2\nelse\n3\nend" formats "if a\n2\nelse\n3\nend" - formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" - formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" - formats "foo[&.bar] ||= 1" formats "foo[&.bar] ||= 1" - formats "x: Int32" formats "x: Int32" - formats "foo.bar(&.baz)" formats "foo.bar(&.baz)" - formats "foo.as? ( Int32* )" formats "foo.as? ( Int32* )" - formats "return( 1 )" formats "return( 1 )" - formats "begin\n1\nrescue\n3\nensure\n2\nend" formats "begin\n1\nrescue\n3\nensure\n2\nend" - formats "def foo(a : T, b : U) forall T, U\n #\nend" formats "def foo(a : T, b : U) forall T, U\n #\nend" - formats "1\n\n\n2" formats "1\n\n\n2" - formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" - formats " <<-HTML\n foo\nHTML" formats " <<-HTML\n foo\nHTML" - formats "1 if nil?\na.b + c" formats "1 if nil?\na.b + c" - formats "if 1\n[\n a() # b\n]\nend" formats "if 1\n[\n a() # b\n]\nend" - formats "next 1, {2, 3}" formats "next 1, {2, 3}" - formats "-> : Int32 | String { 1 }" formats "-> : Int32 | String { 1 }" - formats "select\nwhen foo # foo\n # bar\nelse # foo\n # bar\nend" formats "select\nwhen foo # foo\n # bar\nelse # foo\n # bar\nend" - formats "until 1\n2\nend" formats "until 1\n2\nend" - formats "->@foo.foo!" formats "->@foo.foo!" - formats "foo.as Int32*" formats "foo.as Int32*" - formats "x : (A | B)" formats "x : (A | B)" - formats "foo x, self // 1" formats "foo x, self // 1" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n @[MyAnn]\n biz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n @[MyAnn]\n biz\n); end" - formats "foo &.bar.nil?" formats "foo &.bar.nil?" - formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" - formats "1 # foo\n2 # bar" formats "1 # foo\n2 # bar" - formats "foo({\nbar: 1,\n})" formats "foo({\nbar: 1,\n})" - formats "foo(1, ) do\nend" formats "foo(1, ) do\nend" - formats " * a = 1 " formats " * a = 1 " - formats "args.any? &.name.baz" formats "args.any? &.name.baz" - formats "[1, 2, 3]" formats "[1, 2, 3]" - formats "if a\n # hello\n 2\nend" formats "if a\n # hello\n 2\nend" - formats "class Foo\n1\n\n# foo\nend" formats "class Foo\n1\n\n# foo\nend" - formats "if 1\nbegin\n2\nensure\n3\nend\nend" formats "if 1\nbegin\n2\nensure\n3\nend\nend" - formats "foo &.@bar" formats "foo &.@bar" - formats "def foo (\nx ,\n y ) \n end" formats "def foo (\nx ,\n y ) \n end" - formats "1 ;\n 2" formats "1 ;\n 2" - formats "1.<=() { 3 }" formats "1.<=() { 3 }" - formats "if a\nif b\n3\nelse\n4\nend\nend" formats "if a\nif b\n3\nelse\n4\nend\nend" - formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" - formats "def foo(@[AnnOne] @[AnnTwo] & ); end" formats "def foo(@[AnnOne] @[AnnTwo] & ); end" + formats "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" formats "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" + formats "next { 1 , 2 }" formats "next { 1 , 2 }" + formats "class Foo < \n Bar \n\n 1 \n\nend" formats "class Foo < \n Bar \n\n 1 \n\nend" formats "foo(a: //)" formats "foo(a: //)" - formats "instance_sizeof( Int32 )" formats "instance_sizeof( Int32 )" - formats "def foo\nend\n\n\n\ndef bar\nend" formats "def foo\nend\n\n\n\ndef bar\nend" - formats "foo([\n 1, 2,\n 3, 4,\n])" formats "foo([\n 1, 2,\n 3, 4,\n])" - formats "sizeof( Int32 )" formats "sizeof( Int32 )" - formats "yield *1" formats "yield *1" - formats "yield 1 , \n2" formats "yield 1 , \n2" - formats "foo[]" formats "foo[]" - formats "macro foo\n %foo\nend" formats "macro foo\n %foo\nend" - formats "def +(x)\nend" formats "def +(x)\nend" - formats "def foo\n1\nend" formats "def foo\n1\nend" - formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" - formats "a &.b[c]?" formats "a &.b[c]?" - formats "[\n 1, 2, # foo\n 3, 4,\n]" formats "[\n 1, 2, # foo\n 3, 4,\n]" - formats "foo(a: 1 // 2)" formats "foo(a: 1 // 2)" + formats "def foo(x : (A | B)) \n end" formats "def foo(x : (A | B)) \n end" + formats "private FOO = 2\nprivate A = 1" formats "private FOO = 2\nprivate A = 1" + formats "select \n when foo then 2 \n end" formats "select \n when foo then 2 \n end" formats "foo(out x)" formats "foo(out x)" - formats "1.!=() { 3 }" formats "1.!=() { 3 }" - formats "1.== { 3 }" formats "1.== { 3 }" - formats " {%\na = 1 %}" formats " {%\na = 1 %}" - formats "foo(&.@bar)" formats "foo(&.@bar)" - formats "if 0\n1 &&\n2 &&\n3\nend" formats "if 0\n1 &&\n2 &&\n3\nend" - formats "a = [\n1,\n2]" formats "a = [\n1,\n2]" - formats "return 1, {2, 3}" formats "return 1, {2, 3}" - formats "select # some comment\nwhen bar\n break\nend" formats "select # some comment\nwhen bar\n break\nend" - formats "case 1\nwhen 1 then 1\nwhen 123 then 2\nwhen 1..123 then 3\nelse 4\nend" formats "case 1\nwhen 1 then 1\nwhen 123 then 2\nwhen 1..123 then 3\nelse 4\nend" - formats "macro foo\n {% if 1 %} 2 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" - formats "String?" formats "String?" - formats "unless a\n2\n3\nend" formats "unless a\n2\n3\nend" - formats "alignof( Int32 )" formats "alignof( Int32 )" - formats "return 1 , *2" formats "return 1 , *2" - formats "a = foo(baz1 do\nend)" formats "a = foo(baz1 do\nend)" - formats "def foo=(x)\nend" formats "def foo=(x)\nend" - formats "case\nend" formats "case\nend" - formats "typeof( 1, 2, 3 )" formats "typeof( 1, 2, 3 )" - formats "case 1 \n when 2 ; 3 \n end" formats "case 1 \n when 2 ; 3 \n end" - formats "case 1 # foo\nwhen 2 then 3 # bar\nwhen 4 then 5 # baz\nelse 6 # zzz\nend" formats "case 1 # foo\nwhen 2 then 3 # bar\nwhen 4 then 5 # baz\nelse 6 # zzz\nend" - formats "1 # foo\n1234 # bar\n\n10 # bar" formats "1 # foo\n1234 # bar\n\n10 # bar" - formats "if a\n2\nend" formats "if a\n2\nend" - formats " <<-HTML\n hello \n world \n HTML" formats " <<-HTML\n hello \n world \n HTML" - formats "a = begin\n1\n2\nend" formats "a = begin\n1\n2\nend" - formats "@x ||= 1" formats "@x ||= 1" - formats "__LINE__" formats "__LINE__" - formats "FOO = 2 + 3\nA = 1 - 10" formats "FOO = 2 + 3\nA = 1 - 10" - formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" - formats "Foo( * T, { * A ,*\n B } )" formats "Foo( * T, { * A ,*\n B } )" - formats "lib Foo\nunion Foo\nend\nend" formats "lib Foo\nunion Foo\nend\nend" - formats "alias A = (B)" formats "alias A = (B)" - formats "\"\#{\"foo\"}\"" formats "\"\#{\"foo\"}\"" + formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" + formats "/foo/" formats "/foo/" + formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" + formats "if 1\n[\n a() # b\n]\nend" formats "if 1\n[\n a() # b\n]\nend" + formats "foo &.bar.as(T)" formats "foo &.bar.as(T)" + formats "foo[1, &.bar]" formats "foo[1, &.bar]" + formats "[\n 1, 2, # foo\n 3,\n]" formats "[\n 1, 2, # foo\n 3,\n]" + formats "->foo?" formats "->foo?" + formats "foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n})" formats "foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n})" + formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" + formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" + formats "def foo\n {{@type}}\nend" formats "def foo\n {{@type}}\nend" + formats "def foo\n a = 1; # foo\n a = 2; # bar\nend\n" formats "def foo\n a = 1; # foo\n a = 2; # bar\nend\n" + formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" + formats "\"hello\"" formats "\"hello\"" + formats "if 1\n {% for x in y %} {% end %}\nend" formats "if 1\n {% for x in y %} {% end %}\nend" + formats "$~ = 1" formats "$~ = 1" + formats "::foo(1, 2)" formats "::foo(1, 2)" + formats "(())" formats "(())" + formats "def foo( x , & block : ->)\nend" formats "def foo( x , & block : ->)\nend" + formats "x : (A -> B)?" formats "x : (A -> B)?" + formats "$1.bar" formats "$1.bar" formats "def foo(x, **z)\nend" formats "def foo(x, **z)\nend" - formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" - formats "{x => self // 1}" formats "{x => self // 1}" - formats "-> : {x: Int32, y: String} {}" formats "-> : {x: Int32, y: String} {}" + formats "foo.foo1(\n bar\n .bar1\n .bar2)" formats "foo.foo1(\n bar\n .bar1\n .bar2)" + formats " <<-HTML\n \#{1}\n HTML" formats " <<-HTML\n \#{1}\n HTML" + formats "foo . responds_to? :bar" formats "foo . responds_to? :bar" + formats "(1)" formats "(1)" + formats "->Foo.foo?" formats "->Foo.foo?" + formats ":/" formats ":/" + formats "foo bar, \\\nbaz" formats "foo bar, \\\nbaz" + formats "def foo ( x ) \n end" formats "def foo ( x ) \n end" + formats "alias Foo =Bar" formats "alias Foo =Bar" + formats "->Foo.foo=" formats "->Foo.foo=" + formats "unless a\nelse\n2\nend" formats "unless a\nelse\n2\nend" + formats "nil" formats "nil" + formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" + formats "lib Bar\n enum Foo\n A = 1\n end\nend" formats "lib Bar\n enum Foo\n A = 1\n end\nend" + formats "Foo( A , 1 )" formats "Foo( A , 1 )" + formats "foo.[] =1" formats "foo.[] =1" + formats "1 # foo\n2 # bar" formats "1 # foo\n2 # bar" + formats "begin\n select\n when foo\n # foo\n # bar\n else\n # foo\n # bar\n end\nend" formats "begin\n select\n when foo\n # foo\n # bar\n else\n # foo\n # bar\n end\nend" + formats "lib Foo\n $foo : Int32 \nend" formats "lib Foo\n $foo : Int32 \nend" formats "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" + formats "enum Foo;end" formats "enum Foo;end" + formats "select \n when foo \n 2 \n else \n 3 \n end" formats "select \n when foo \n 2 \n else \n 3 \n end" formats "asm(\"a\" : : :: \"volatile\")" formats "asm(\"a\" : : :: \"volatile\")" - formats "1.<= do\nend" formats "1.<= do\nend" - formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" - formats "1.>= { 3 }" formats "1.>= { 3 }" - formats "あ.い, う.え.お = 1, 2" formats "あ.い, う.え.お = 1, 2" + formats "next { {1, 2}, {3, 4} }, 5" formats "next { {1, 2}, {3, 4} }, 5" + formats "10 ** a" formats "10 ** a" + formats "$?" formats "$?" + formats "\"foo\" \\\n \"bar\"" formats "\"foo\" \\\n \"bar\"" + formats "def foo ( x , y , ) \n end" formats "def foo ( x , y , ) \n end" + formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" + formats "@[::Foo::Bar]" formats "@[::Foo::Bar]" + formats "class Foo ( T )\nend" formats "class Foo ( T )\nend" + formats "a &.!.!" formats "a &.!.!" + formats "def foo : Int32 \n end" formats "def foo : Int32 \n end" + formats "__DIR__" formats "__DIR__" + formats "x, y, z = <<-FOO, <<-BAR, <<-BAZ\n hello\n FOO\n world\n BAR\n qux\nBAZ" formats "x, y, z = <<-FOO, <<-BAR, <<-BAZ\n hello\n FOO\n world\n BAR\n qux\nBAZ" + formats " macro foo\n end\n\n :+" formats " macro foo\n end\n\n :+" + formats "lib Foo\n fun bar = Bar\nend" formats "lib Foo\n fun bar = Bar\nend" + formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" + formats "def foo\n\n1\n\nend" formats "def foo\n\n1\n\nend" + formats "a &.b.as(C)" formats "a &.b.as(C)" + formats "next( 1 )" formats "next( 1 )" + formats "return { {1, 2}, {3, 4} }, 5" formats "return { {1, 2}, {3, 4} }, 5" + formats "yield 1" formats "yield 1" + formats "require \"foo\"" formats "require \"foo\"" + formats "def foo(**z : Foo)\nend" formats "def foo(**z : Foo)\nend" + formats "true" formats "true" + formats "case 1\nwhen a; 2\nelse; ; b\nend" formats "case 1\nwhen a; 2\nelse; ; b\nend" + formats "def foo(\n **a # comment\n)\n 1\nend" formats "def foo(\n **a # comment\n)\n 1\nend" + formats "class Foo\n macro foo\n 1\n end\nend" formats "class Foo\n macro foo\n 1\n end\nend" + formats "foo[bar.baz]\n .qux" formats "foo[bar.baz]\n .qux" + formats "->do\nx\nend" formats "->do\nx\nend" + formats "begin\n # Comment\n\n\nend" formats "begin\n # Comment\n\n\nend" + formats "bla.select(&.all?{ |x| x } )" formats "bla.select(&.all?{ |x| x } )" + formats "def foo(a,\n &block)\nend" formats "def foo(a,\n &block)\nend" + formats "(\n a = 1\n a\n)" formats "(\n a = 1\n a\n)" + formats "def foo(a : T, b : U) forall T, U #\n #\nend" formats "def foo(a : T, b : U) forall T, U #\n #\nend" + formats "#######" formats "#######" + formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" + formats "[\n <<-EOF,\n foo\n EOF\n <<-BAR,\n bar\n BAR\n]" formats "[\n <<-EOF,\n foo\n EOF\n <<-BAR,\n bar\n BAR\n]" + formats "instance_alignof( Int32 )" formats "instance_alignof( Int32 )" + formats "->{}" formats "->{}" + formats "1" formats "1" + formats "1 unless 2" formats "1 unless 2" + formats "&- 1" formats "&- 1" + formats "<<-HTML\n \#{1}x\n y\n HTML" formats "<<-HTML\n \#{1}x\n y\n HTML" + formats "class Bar\nprotected def foo(x)\na=b(c)\nend\nend" formats "class Bar\nprotected def foo(x)\na=b(c)\nend\nend" + formats "1#foo" formats "1#foo" + formats "b &.[c].d" formats "b &.[c].d" + formats "a || b" formats "a || b" + formats "1.[]=() { 3 }" formats "1.[]=() { 3 }" + formats "case 1 # foo\nwhen 2 then 3 # bar\nwhen 4 then 5 # baz\nelse 6 # zzz\nend" formats "case 1 # foo\nwhen 2 then 3 # bar\nwhen 4 then 5 # baz\nelse 6 # zzz\nend" + formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" + formats "(size - 1).downto(0) do |i|\n yield @buffer[i]\nend" formats "(size - 1).downto(0) do |i|\n yield @buffer[i]\nend" + formats "def foo( x , & block : Int32 ->)\nend" formats "def foo( x , & block : Int32 ->)\nend" + formats "ary.size = (1).to_i" formats "ary.size = (1).to_i" + formats "yield *1 ,2" formats "yield *1 ,2" + formats "%w{one( two( three)}" formats "%w{one( two( three)}" + formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" + formats "if 1\n node.is_a?(T)\nend" formats "if 1\n node.is_a?(T)\nend" + formats "# Hello\n#\n# ```\n# puts 1+2 # bye\n# 1+2 # hello\n#\n# 1+2\n# ```\n\n# ```\n# puts 1+2\n\n# ```\n# puts 1+2\n\n# Hola\n#\n# 1+2\n# foo do\n# 3+4\n# end\n\n# Hey\n#\n# 1+2\n# foo do\n# 3+4\n# end\n#\n# ```\n# 1+2\n# ```\n#\n# 1+2\n#\n# Bye\n" formats "# Hello\n#\n# ```\n# puts 1+2 # bye\n# 1+2 # hello\n#\n# 1+2\n# ```\n\n# ```\n# puts 1+2\n\n# ```\n# puts 1+2\n\n# Hola\n#\n# 1+2\n# foo do\n# 3+4\n# end\n\n# Hey\n#\n# 1+2\n# foo do\n# 3+4\n# end\n#\n# ```\n# 1+2\n# ```\n#\n# 1+2\n#\n# Bye\n" + formats "return { {1, 2}, {3, 4} }" formats "return { {1, 2}, {3, 4} }" + formats "def foo(\n **a\n\n # comment\n)\n 1\nend" formats "def foo(\n **a\n\n # comment\n)\n 1\nend" + formats "def foo(x : A(B), y)\nend" formats "def foo(x : A(B), y)\nend" + formats "1 if 2\n# foo\n3" formats "1 if 2\n# foo\n3" + formats "case\nend" formats "case\nend" + formats "foo &.as?(T)" formats "foo &.as?(T)" + formats "case 1\nwhen a; 2\nelse; b\nend" formats "case 1\nwhen a; 2\nelse; b\nend" + formats "x : {A, B}" formats "x : {A, B}" + formats "macro bar\n 1\nend\n\ncase 1\nwhen 2 then 3\nwhen 45 then 6\nend" formats "macro bar\n 1\nend\n\ncase 1\nwhen 2 then 3\nwhen 45 then 6\nend" + formats "{1 => foo <<-X\nbar\nX\n}" formats "{1 => foo <<-X\nbar\nX\n}" + formats "def foo\n {% for x in y %}\n foo + bar\n {% end %}\nend" formats "def foo\n {% for x in y %}\n foo + bar\n {% end %}\nend" + formats "{ # foo\n 1 => 2,\n}" formats "{ # foo\n 1 => 2,\n}" + formats "lib Foo\n fun foo =\n bar : Void\nend" formats "lib Foo\n fun foo =\n bar : Void\nend" + formats "break( 1 )" formats "break( 1 )" + formats "foo &.as(T).bar" formats "foo &.as(T).bar" + formats "<<-HTML\n \#{1}x\n y\n z\n HTML" formats "<<-HTML\n \#{1}x\n y\n z\n HTML" + formats "responds_to? :foo" formats "responds_to? :foo" + formats "" formats "" + formats "x\n# foo\n\n# bar" formats "x\n# foo\n\n# bar" + formats "#!shebang\n1 + 2" formats "#!shebang\n1 + 2" + formats "{ # foo\n 1,\n}" formats "{ # foo\n 1,\n}" + formats "macro foo\n {%1 + 2%}\\\nend" formats "macro foo\n {%1 + 2%}\\\nend" + formats "begin\n array[\n 0 # Zero\n ]\nend" formats "begin\n array[\n 0 # Zero\n ]\nend" + formats "def foo ( @x, @y) \n end" formats "def foo ( @x, @y) \n end" + formats "def a\n b(\n 1, # x\n # y\n 2\n )\nend" formats "def a\n b(\n 1, # x\n # y\n 2\n )\nend" + formats "case 1 \n when 2 \n 3 \n else \n 4 \n end" formats "case 1 \n when 2 \n 3 \n else \n 4 \n end" formats "def foo(x : X) forall X , Y; end" formats "def foo(x : X) forall X , Y; end" - formats "class Foo < \n Bar \n\n 1 \n\nend" formats "class Foo < \n Bar \n\n 1 \n\nend" - formats "foo { |x, *y| }" formats "foo { |x, *y| }" - formats "macro foo( x , y )\nend" formats "macro foo( x , y )\nend" - formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" - formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" - formats "a = if 1\n2\n3\nend" formats "a = if 1\n2\n3\nend" - formats "a = 1 if 1 == 2 ||\n 3 == 4\n" formats "a = 1 if 1 == 2 ||\n 3 == 4\n" - formats "def foo\n1\nensure\n2\nend" formats "def foo\n1\nensure\n2\nend" + formats "foo{}" formats "foo{}" + formats "foo[1, &.bar] ||= 1" formats "foo[1, &.bar] ||= 1" + formats "{ * 1 * 2,\n*\n3, 4 }" formats "{ * 1 * 2,\n*\n3, 4 }" + formats "foo self // 1" formats "foo self // 1" + formats "join io, &.inspect" formats "join io, &.inspect" + formats " <<-HTML\n hello \n world \n HTML" formats " <<-HTML\n hello \n world \n HTML" formats "enum Foo\n {% begin %}\n A\n B\n C\n {% end %}\nend" formats "enum Foo\n {% begin %}\n A\n B\n C\n {% end %}\nend" - formats "if 1\n# nothing\nend" formats "if 1\n# nothing\nend" - formats "foo(1, 2,)" formats "foo(1, 2,)" - formats "lib Foo\ntype Foo = Bar\nend" formats "lib Foo\ntype Foo = Bar\nend" - formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" - formats "\"foo \#{ __DIR__ }\"" formats "\"foo \#{ __DIR__ }\"" - formats "foo = 1\n->foo.bar(Int32*)" formats "foo = 1\n->foo.bar(Int32*)" - formats "{ {% begin %}1{% end %}, nil }" formats "{ {% begin %}1{% end %}, nil }" - formats "def foo( x , & block : ->)\nend" formats "def foo( x , & block : ->)\nend" - formats "lib Foo\n {% if 1 %}\n fun foo\n {% end %}\nend\n\nmacro bar\n 1\nend" formats "lib Foo\n {% if 1 %}\n fun foo\n {% end %}\nend\n\nmacro bar\n 1\nend" - formats "with foo yield bar" formats "with foo yield bar" - formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" - formats "{% begin %}\n \"\n foo\"\n{% end %}" formats "{% begin %}\n \"\n foo\"\n{% end %}" - formats "case 1 \n when 2 ; 3 \n when 4 ; 5\nend" formats "case 1 \n when 2 ; 3 \n when 4 ; 5\nend" - formats "break 1, {2, 3}" formats "break 1, {2, 3}" - formats "%w(one two three)" formats "%w(one two three)" - formats "def foo(x)\n case //\n when //\n 3\n end\nend" formats "def foo(x)\n case //\n when //\n 3\n end\nend" - formats "if 1\n {{1 + 2}}\nend" formats "if 1\n {{1 + 2}}\nend" - formats "...\n2" formats "...\n2" - formats "lib Foo\n fun Bar\nend" formats "lib Foo\n fun Bar\nend" - formats "%(hello)" formats "%(hello)" - formats "def foo ( @select) \n end" formats "def foo ( @select) \n end" - formats "is_a? Foo" formats "is_a? Foo" - formats "foo( )" formats "foo( )" + formats "foo.bar\n.baz" formats "foo.bar\n.baz" + formats "alias Foo = Bar" formats "alias Foo = Bar" + formats "foo(/ /)" formats "foo(/ /)" + formats "macro foo(\n a,\n *b,\n)\nend" formats "macro foo(\n a,\n *b,\n)\nend" + formats "foo &.bar" formats "foo &.bar" + formats "-> do\nend" formats "-> do\nend" + formats "class Foo\n macro foo\n 1 + 2 \n end\n end" formats "class Foo\n macro foo\n 1 + 2 \n end\n end" + formats "foo.bar(&.%(baz))" formats "foo.bar(&.%(baz))" + formats "10 / a" formats "10 / a" + formats "{\n1 => 2 ,\n 3 => 4 }" formats "{\n1 => 2 ,\n 3 => 4 }" + formats "#### ###" formats "#### ###" + formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" + formats "1 // 2" formats "1 // 2" + formats "asm(\"a\" ::: \"f\"\n)" formats "asm(\"a\" ::: \"f\"\n)" + formats "->@foo.foo?" formats "->@foo.foo?" + formats "if 1;\n2;\nelse;\n3;\nend" formats "if 1;\n2;\nelse;\n3;\nend" + formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" + formats "def foo\n 1\n #\nrescue\nend" formats "def foo\n 1\n #\nrescue\nend" + formats "enum Foo\nend" formats "enum Foo\nend" + formats "alias A = (B(C, (C | D)) | E)" formats "alias A = (B(C, (C | D)) | E)" + formats "[\n # foo\n] of String" formats "[\n # foo\n] of String" + formats "return 1 , *2" formats "return 1 , *2" + formats "1.== { 3 }" formats "1.== { 3 }" + formats "begin; 1; end" formats "begin; 1; end" + formats "1\n.." formats "1\n.." + formats "@[ Foo(foo: 1) ]\ndef foo\nend" formats "@[ Foo(foo: 1) ]\ndef foo\nend" + formats "[1,\n2,\n3]" formats "[1,\n2,\n3]" + formats " <<-EOF\n 1\n 2\n EOF" formats " <<-EOF\n 1\n 2\n EOF" + formats "1.=== { 3 }" formats "1.=== { 3 }" + formats "a = case 1\nwhen 2\n3\nelse\n4\nend" formats "a = case 1\nwhen 2\n3\nelse\n4\nend" + formats "def foo(a, **b : Int32)\nend" formats "def foo(a, **b : Int32)\nend" + formats "asm(\"nop\"\n: \"a\"(0) )" formats "asm(\"nop\"\n: \"a\"(0) )" + formats "long_variable_name = [\n {\n :foo => 1,\n },\n {\n :bar => 2,\n },\n]" formats "long_variable_name = [\n {\n :foo => 1,\n },\n {\n :bar => 2,\n },\n]" + formats "foo.as ( Int32* )" formats "foo.as ( Int32* )" + formats "{\n <<-KEY => 1,\n key\n KEY\n}" formats "{\n <<-KEY => 1,\n key\n KEY\n}" + formats "foo(A |\nB |\nC)" formats "foo(A |\nB |\nC)" formats "begin\n 1\nend\n\n1\n" formats "begin\n 1\nend\n\n1\n" - formats "if 1\n1\n\n# foo\nend" formats "if 1\n1\n\n# foo\nend" - formats "macro foo\n \\{\nend" formats "macro foo\n \\{\nend" - formats "macro foo\n {%1 + 2%}\\\nend" formats "macro foo\n {%1 + 2%}\\\nend" - formats "1\nyield\n2" formats "1\nyield\n2" - formats "x : { {A, B}, {C, D} }" formats "x : { {A, B}, {C, D} }" - formats "foo.[] =1" formats "foo.[] =1" - formats "{% if true %}\n # x\n # y\n{% end %}" formats "{% if true %}\n # x\n # y\n{% end %}" - formats "()" formats "()" - formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" - formats "def foo : (A | B(C))\n nil\nend" formats "def foo : (A | B(C))\n nil\nend" - formats "\" \" * 2" formats "\" \" * 2" - formats "break *1 , *2" formats "break *1 , *2" - formats "$~ = 1" formats "$~ = 1" - formats "foo(\"b\#{1}\" \\\n\"baz\")" formats "foo(\"b\#{1}\" \\\n\"baz\")" - formats "[\n1,\n2,\n3]" formats "[\n1,\n2,\n3]" - formats ":&" formats ":&" - formats "%(\n1\n)\n\n{\n 1 => 2,\n 234 => 5,\n}" formats "%(\n1\n)\n\n{\n 1 => 2,\n 234 => 5,\n}" - formats "{ 1 => 2 ,\n 3 => 4 }" formats "{ 1 => 2 ,\n 3 => 4 }" - formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" - formats "select \n when foo \n 2 \n else \n 3 \n end" formats "select \n when foo \n 2 \n else \n 3 \n end" - formats "module Foo\n 1 # bar\nend\n\nmodule Foo\n 1\n # bar\nend\n\nmodule Foo\n 1\n\n # bar\nend\n\nmodule Foo\n 1\n 2\n # bar\nend\n\nmodule Foo\n 1\n 2\n\n # bar\nend\n\nif 1\n 1\n # bar\nend\n\nif 1\n 1\n\n # bar\nend\n\n1\n2\n# foo\n\n1\n2\n\n# foo\n" formats "module Foo\n 1 # bar\nend\n\nmodule Foo\n 1\n # bar\nend\n\nmodule Foo\n 1\n\n # bar\nend\n\nmodule Foo\n 1\n 2\n # bar\nend\n\nmodule Foo\n 1\n 2\n\n # bar\nend\n\nif 1\n 1\n # bar\nend\n\nif 1\n 1\n\n # bar\nend\n\n1\n2\n# foo\n\n1\n2\n\n# foo\n" - formats "<<-HTML\n hello \n world \n HTML" formats "<<-HTML\n hello \n world \n HTML" - formats "foo((1..3))" formats "foo((1..3))" - formats "->( ){ x }" formats "->( ){ x }" - formats "NamedTuple(\n a: Int32,)" formats "NamedTuple(\n a: Int32,)" - formats "def foo(x : (A | B)) \n end" formats "def foo(x : (A | B)) \n end" - formats "foo.as? Int32*" formats "foo.as? Int32*" - adds `&` to yielding methods that don't have a block parameter (#8764) - formats "def foo # bar\n yield\nend" formats "def foo # bar\n yield\nend" - formats "def foo(x ,)\n yield\nend" formats "def foo(x ,)\n yield\nend" - formats "def foo\n yield\nend" formats "def foo\n yield\nend" - formats "def foo(x,\ny)\n yield\nend" formats "def foo(x,\ny)\n yield\nend" - formats "def foo(x)\n yield\nend" formats "def foo(x)\n yield\nend" - formats "def foo(\nx,\n)\n yield\nend" formats "def foo(\nx,\n)\n yield\nend" - formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" - formats "def foo(x,\n)\n yield\nend" formats "def foo(x,\n)\n yield\nend" - formats "def foo()\n yield\nend" formats "def foo()\n yield\nend" - formats "def foo(\nx)\n yield\nend" formats "def foo(\nx)\n yield\nend" - formats "def foo(x,\ny,)\n yield\nend" formats "def foo(x,\ny,)\n yield\nend" - formats "macro f\n yield\n {{ yield }}\nend" formats "macro f\n yield\n {{ yield }}\nend" - formats "def foo(\nx, y)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" - formats "def foo(\n)\n yield\nend" formats "def foo(\n)\n yield\nend" - formats "def foo(a, **b)\n yield\nend" formats "def foo(a, **b)\n yield\nend" - formats "def foo(x\n)\n yield\nend" formats "def foo(x\n)\n yield\nend" - formats "<<-HTML\n \#{1}x\n y\n z\n HTML" formats "<<-HTML\n \#{1}x\n y\n z\n HTML" - formats "# Here is the doc of a method, and contains an example:\n#\n# ```\n# result = foo\n#\n# puts result\n# ```\ndef foo\n # ...\nend\n" formats "# Here is the doc of a method, and contains an example:\n#\n# ```\n# result = foo\n#\n# puts result\n# ```\ndef foo\n # ...\nend\n" - formats "if 1\n foo(\n 1,\n 2 # lala\n )\nend\n" formats "if 1\n foo(\n 1,\n 2 # lala\n )\nend\n" - formats "def foo(\nx, #foo\nz #bar\n)\nend" formats "def foo(\nx, #foo\nz #bar\n)\nend" - formats "1.==(2) { 3 }" formats "1.==(2) { 3 }" - formats "foo(\n1,\n 2 \n)" formats "foo(\n1,\n 2 \n)" - formats "if 1 &&\n2 &&\n3\n4\nend" formats "if 1 &&\n2 &&\n3\n4\nend" - formats "foo.bar(&.% baz)" formats "foo.bar(&.% baz)" - formats "foo(\n 1, 2,\n&block)" formats "foo(\n 1, 2,\n&block)" - formats "foo 1,\n2" formats "foo 1,\n2" - formats "asm(\"a\" :: : : \"volatile\")" formats "asm(\"a\" :: : : \"volatile\")" - formats "->{}" formats "->{}" - formats "-> : Array(Int32) {}" formats "-> : Array(Int32) {}" - formats "foo[ 1 , 2 ] =3" formats "foo[ 1 , 2 ] =3" + formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" + formats "enum Foo; A = 1; end" formats "enum Foo; A = 1; end" + formats "x : Int32 |\nString" formats "x : Int32 |\nString" + formats "alias X = ((Y, Z) ->)" formats "alias X = ((Y, Z) ->)" + formats "->Foo.foo" formats "->Foo.foo" + formats "SomeLib.UppercasedFunCall 1, 2" formats "SomeLib.UppercasedFunCall 1, 2" formats "{%\n unless true\n 1\n else\n 2\n end\n%}" formats "{%\n unless true\n 1\n else\n 2\n end\n%}" - formats "a = 1 + # foo\n2" formats "a = 1 + # foo\n2" - formats "[\n <<-EOF,\n foo\n EOF\n <<-BAR,\n bar\n BAR\n]" formats "[\n <<-EOF,\n foo\n EOF\n <<-BAR,\n bar\n BAR\n]" - formats "1 && (\n 2 || 3\n)" formats "1 && (\n 2 || 3\n)" - formats "asm(\"nop\" : \"a\"(0),\n\"b\"(1)\n: \"c\"(2), \"d\"(3) )" formats "asm(\"nop\" : \"a\"(0),\n\"b\"(1)\n: \"c\"(2), \"d\"(3) )" - formats "def foo(x, **z, &block)\nend" formats "def foo(x, **z, &block)\nend" - formats "`foo`" formats "`foo`" - formats ":^" formats ":^" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" - formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" - formats "alias A = ((B(C | D) | E) | F)" formats "alias A = ((B(C | D) | E) | F)" - formats "case 1 \n when 2 ;\n 3 \n end" formats "case 1 \n when 2 ;\n 3 \n end" - formats "foo : (A) | D" formats "foo : (A) | D" - formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" - formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" - formats "[\n1,\n\n2]" formats "[\n1,\n\n2]" - formats "\n# hello\n\n1" formats "\n# hello\n\n1" - formats "def foo\n# hello\n1\nend" formats "def foo\n# hello\n1\nend" - formats "Foo::Bar?" formats "Foo::Bar?" - formats "->foo?" formats "->foo?" + formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" + formats "def foo(**a,)\n 1\nend" formats "def foo(**a,)\n 1\nend" + formats "def foo(\n a,\n b\n)\nend" formats "def foo(\n a,\n b\n)\nend" + formats "select\nwhen foo\n # foo\n # bar\nelse\n # foo\n # bar\nend" formats "select\nwhen foo\n # foo\n # bar\nelse\n # foo\n # bar\nend" + formats "::Tuple()" formats "::Tuple()" + formats "->(x : Int32) { }" formats "->(x : Int32) { }" + formats "# Here is the doc of a method, and contains an example:\n#\n# ```\n# result = foo\n#\n# puts result\n# ```\ndef foo\n # ...\nend\n" formats "# Here is the doc of a method, and contains an example:\n#\n# ```\n# result = foo\n#\n# puts result\n# ```\ndef foo\n # ...\nend\n" + formats "yield 1 , *2" formats "yield 1 , *2" + formats "1 .. 2" formats "1 .. 2" + formats "case 1 \n when 2 \n 3 \n else 4 \n end" formats "case 1 \n when 2 \n 3 \n else 4 \n end" + formats "[ # foo\n 1,\n]" formats "[ # foo\n 1,\n]" + formats "->@@foo.foo?" formats "->@@foo.foo?" formats "/foo/imx" formats "/foo/imx" - formats "->foo=" formats "->foo=" - formats "::Pointer(T)" formats "::Pointer(T)" - formats "return {1, 2}, 3" formats "return {1, 2}, 3" - formats "asm(\"a\" : :: : \"volatile\")" formats "asm(\"a\" : :: : \"volatile\")" - formats "1\n..2" formats "1\n..2" + formats "if 0\n1 &&\n2 &&\n3\nend" formats "if 0\n1 &&\n2 &&\n3\nend" + formats "foo = 1\n->foo.foo!" formats "foo = 1\n->foo.foo!" + formats "{ 1 => 2 , 3 => 4 }" formats "{ 1 => 2 , 3 => 4 }" + formats "macro foo\n %foo{x,y}\nend" formats "macro foo\n %foo{x,y}\nend" + formats "foo &.nil?()" formats "foo &.nil?()" + formats "asm(\"nop\" : \"a\"(0),\n\"b\"(1)\n: \"c\"(2), \"d\"(3) )" formats "asm(\"nop\" : \"a\"(0),\n\"b\"(1)\n: \"c\"(2), \"d\"(3) )" + formats "foo.[ 1 , 2 ] =3" formats "foo.[ 1 , 2 ] =3" + formats "macro flags\n {% if 1 %}\\\n 1 {% else %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n 1 {% else %}\\\n {% end %}\\\nend" + formats "def foo(&: Int32)\nend" formats "def foo(&: Int32)\nend" formats "foo(\n 1, 2, &block)" formats "foo(\n 1, 2, &block)" - formats "NamedTuple()" formats "NamedTuple()" - formats "a &.!" formats "a &.!" - formats "def foo(\n foo,\n\n @[MyAnn]\n @[MyAnn]\n & : Nil -> Nil\n); end" formats "def foo(\n foo,\n\n @[MyAnn]\n @[MyAnn]\n & : Nil -> Nil\n); end" - formats "x, y = <<-FOO, <<-BAR\n hello\n FOO\n world\n BAR" formats "x, y = <<-FOO, <<-BAR\n hello\n FOO\n world\n BAR" - formats "->{1}" formats "->{1}" - formats "def foo\n ((((((((((((((((0_u64\n ) | ptr[0]) << 8\n ) | ptr[1]) << 8\n ) | ptr[2]) << 8\n ) | ptr[3]) << 8\n ) | ptr[4]) << 8\n ) | ptr[5]) << 8\n ) | ptr[6]) << 8\n ) | ptr[7])\nend" formats "def foo\n ((((((((((((((((0_u64\n ) | ptr[0]) << 8\n ) | ptr[1]) << 8\n ) | ptr[2]) << 8\n ) | ptr[3]) << 8\n ) | ptr[4]) << 8\n ) | ptr[5]) << 8\n ) | ptr[6]) << 8\n ) | ptr[7])\nend" - formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" - formats "@[Foo()]" formats "@[Foo()]" - formats "def foo(@[MyAnn] &block); end" formats "def foo(@[MyAnn] &block); end" - formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" - formats "def foo : A(B)\n nil\nend" formats "def foo : A(B)\n nil\nend" - formats "foo.bar\n .baz(\n 1\n )" formats "foo.bar\n .baz(\n 1\n )" - formats "'\\n'" formats "'\\n'" - formats "while 1\n# nothing\nend" formats "while 1\n# nothing\nend" - formats "1\n2 \n # foo" formats "1\n2 \n # foo" - formats "macro foo\n {{ 1 + 2 }}\nend" formats "macro foo\n {{ 1 + 2 }}\nend" - formats "class Foo \n\n 1 \n\nend" formats "class Foo \n\n 1 \n\nend" - formats "yield( 1 , 2 )" formats "yield( 1 , 2 )" - formats "1.==() { 3 }" formats "1.==() { 3 }" - formats "{ # foo\n 1,\n}" formats "{ # foo\n 1,\n}" - formats "foo(1 &+ \n2)" formats "foo(1 &+ \n2)" - formats "{ %w() }" formats "{ %w() }" - formats "@[Foo(\n 1,\n)]" formats "@[Foo(\n 1,\n)]" - formats "foo do\n [foo <<-X\n bar\n X\n ]\nend" formats "foo do\n [foo <<-X\n bar\n X\n ]\nend" + formats "foo bar # comment\n\n# doc\ndef baz; end" formats "foo bar # comment\n\n# doc\ndef baz; end" + formats "1 + 2" formats "1 + 2" + formats "-> : Int32 {}" formats "-> : Int32 {}" + formats "\"\" + <<-END\n bar\n END" formats "\"\" + <<-END\n bar\n END" + formats "-> :: Foo . foo=" formats "-> :: Foo . foo=" + formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" + formats "def foo(*y, **z)\nend" formats "def foo(*y, **z)\nend" + formats "foo(\n <<-HERE,\n hello\n HERE\n foo: 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n foo: 1,\n)" + formats ":\"foo bar\"" formats ":\"foo bar\"" + formats "break( *1 , *2 )" formats "break( *1 , *2 )" + formats "x : A | B" formats "x : A | B" + formats "module Foo;end" formats "module Foo;end" + formats "include Foo" formats "include Foo" + formats "def foo( & block )\nend" formats "def foo( & block )\nend" + formats "alias Foo=Bar" formats "alias Foo=Bar" + formats "foo(\n [\n 1,\n 2,\n ],\n [\n 3,\n 4,\n ]\n)" formats "foo(\n [\n 1,\n 2,\n ],\n [\n 3,\n 4,\n ]\n)" + formats "@[Foo]" formats "@[Foo]" + formats "foo.[]" formats "foo.[]" + formats "1.[]= { 3 }" formats "1.[]= { 3 }" + formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" + formats "macro foo(\n a,\n **b,\n)\nend" formats "macro foo(\n a,\n **b,\n)\nend" + formats "if 1\n2\nelsif\n3\n4\nend" formats "if 1\n2\nelsif\n3\n4\nend" + formats "alias Foo=\nBar" formats "alias Foo=\nBar" + formats "def foo(@[AnnOne] @[AnnTwo] & ); end" formats "def foo(@[AnnOne] @[AnnTwo] & ); end" + formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" + formats "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" formats "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" + formats "def self . foo\nend" formats "def self . foo\nend" + formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" + formats "macro foo\n 1 + 2\nend" formats "macro foo\n 1 + 2\nend" + formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n\n @[MyAnn]\n\n biz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n\n @[MyAnn]\n\n biz\n); end" + formats "def foo(x)\n case //\n when //\n 3\n end\nend" formats "def foo(x)\n case //\n when //\n 3\n end\nend" + formats "->Foo.foo!" formats "->Foo.foo!" + formats "def a\n b(\n a: 1, # x\n # y\n b: 2\n )\nend" formats "def a\n b(\n a: 1, # x\n # y\n b: 2\n )\nend" + formats "lib LibFoo\n {% begin %}\n fun x = y(Int32)\n {% end %}\nend" formats "lib LibFoo\n {% begin %}\n fun x = y(Int32)\n {% end %}\nend" + formats "asm(\"a\" : : : : \"volatile\")" formats "asm(\"a\" : : : : \"volatile\")" + formats "class Actor\n macro inherited\n\nend\nend\n" formats "class Actor\n macro inherited\n\nend\nend\n" + formats "a.b &.[c]\n1" formats "a.b &.[c]\n1" + formats "return *1 , *2" formats "return *1 , *2" + formats "x : A?" formats "x : A?" + formats "@x : A(B | C)?" formats "@x : A(B | C)?" + formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" + formats "1 ... 2" formats "1 ... 2" + formats "foo bar:baz, qux:other" formats "foo bar:baz, qux:other" + formats "foo(\n <<-HERE,\n hello\n HERE\n # foo\n foo: 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n # foo\n foo: 1,\n)" + formats " <<-HTML\n \#{1} \#{2}\n HTML" formats " <<-HTML\n \#{1} \#{2}\n HTML" + formats "asm(\"nop\" : \"a\"(0), \"b\"(1)\n: \"c\"(2), \"d\"(3) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(1)\n: \"c\"(2), \"d\"(3) )" + formats "foo : A(B)\nbar : C" formats "foo : A(B)\nbar : C" + formats "def foo # bar\n # baz\nend" formats "def foo # bar\n # baz\nend" + formats "if 1;\n2;\nelsif 3;\n4;\nend" formats "if 1;\n2;\nelsif 3;\n4;\nend" formats "1.!= do\nend" formats "1.!= do\nend" - formats "<<-HTML\n hello \n HTML" formats "<<-HTML\n hello \n HTML" - formats "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" formats "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" - formats "lib Foo\n fun Foo = Bar\nend" formats "lib Foo\n fun Foo = Bar\nend" - formats "{/ / => / /, / / => / /}" formats "{/ / => / /, / / => / /}" - formats "case 1 \n when 2 \n 3 \n else \n 4 \n end" formats "case 1 \n when 2 \n 3 \n else \n 4 \n end" - formats "foo 1 , &bar" formats "foo 1 , &bar" - formats "foo &.[a] = 1" formats "foo &.[a] = 1" - formats "select\nwhen foo\n # foo\n # bar\nelse\n # foo\n # bar\nend" formats "select\nwhen foo\n # foo\n # bar\nelse\n # foo\n # bar\nend" - formats "1.as Int32" formats "1.as Int32" - formats "foo{|x|\n x}" formats "foo{|x|\n x}" + formats "yield *1 , *2" formats "yield *1 , *2" + formats "module Moo ( T )\nend" formats "module Moo ( T )\nend" + formats "[c.x]\n .foo" formats "[c.x]\n .foo" + formats "page= <<-HTML\n foo\nHTML" formats "page= <<-HTML\n foo\nHTML" + formats "1 + \\\n2\n3" formats "1 + \\\n2\n3" + formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" + formats "foo(1, 2,)" formats "foo(1, 2,)" + formats "foo\n.bar\n.baz" formats "foo\n.bar\n.baz" + formats "asm(\"nop\" : \"a\"(0) )" formats "asm(\"nop\" : \"a\"(0) )" + formats "@x[ 1 ] &&= 2" formats "@x[ 1 ] &&= 2" + formats "if 1\n {% if 2 %} {% end %}\nend" formats "if 1\n {% if 2 %} {% end %}\nend" + formats "{ \"foo\" => 1 }" formats "{ \"foo\" => 1 }" + formats "foo([\n 1, 2,\n 3, 4,\n])" formats "foo([\n 1, 2,\n 3, 4,\n])" + formats "foo[x: 1, &.bar]?" formats "foo[x: 1, &.bar]?" + formats "case 1\nwhen \"foo\" ; 3\nwhen \"lalalala\"; 4\nelse 5\nend" formats "case 1\nwhen \"foo\" ; 3\nwhen \"lalalala\"; 4\nelse 5\nend" + formats "[\n 1, 2, # foo\n 3, 4,\n]" formats "[\n 1, 2, # foo\n 3, 4,\n]" + formats "enum Foo\n A; B; C\nend\n" formats "enum Foo\n A; B; C\nend\n" + formats "%(hello)" formats "%(hello)" + formats " <<-EOF\n 1\n EOF" formats " <<-EOF\n 1\n EOF" + formats "A = 1\nFOO = 2\n\nEX = 3" formats "A = 1\nFOO = 2\n\nEX = 3" + formats "alias A = ({A, (B)})" formats "alias A = ({A, (B)})" + formats "a = \\\n # foo\n bar(1)" formats "a = \\\n # foo\n bar(1)" + formats "->{ x }" formats "->{ x }" + formats "1+2*3" formats "1+2*3" + formats "def foo\n {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}\nend" formats "def foo\n {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}\nend" + formats "case 1\nwhen 1 then 1\nwhen 123 then 2\nwhen 1..123 then 3\nelse 4\nend" formats "case 1\nwhen 1 then 1\nwhen 123 then 2\nwhen 1..123 then 3\nelse 4\nend" + formats "foo(1, 2,\n)" formats "foo(1, 2,\n)" + formats "enum Foo\nA = 1\nend" formats "enum Foo\nA = 1\nend" + formats "enum Foo\n A = 10\n FOO = 123\n BARBAZ = 1234\nend\n" formats "enum Foo\n A = 10\n FOO = 123\n BARBAZ = 1234\nend\n" + formats "foo(a: 1 // 2)" formats "foo(a: 1 // 2)" + formats "def foo(@x)\n\nrescue\nend" formats "def foo(@x)\n\nrescue\nend" + formats "NamedTuple(a: Int32,)" formats "NamedTuple(a: Int32,)" + formats "<<-HTML\n \#{1}x\n HTML" formats "<<-HTML\n \#{1}x\n HTML" + formats "::StaticArray(T)" formats "::StaticArray(T)" + formats "$?.bar" formats "$?.bar" + formats "macro foo=(x)\nend" formats "macro foo=(x)\nend" + formats "foo &.[]?" formats "foo &.[]?" + formats "return *1" formats "return *1" + formats "lib Foo\n fun foo =\n bar(Int32,\n Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32,\n Int32) : Int32\nend" + formats "[/ /, / /]" formats "[/ /, / /]" + formats "case 1\nend" formats "case 1\nend" + formats "struct Foo\n # bar\n # baz\n1\nend" formats "struct Foo\n # bar\n # baz\n1\nend" + formats "macro foo\n \\{\nend" formats "macro foo\n \\{\nend" + formats " {{ 1 + 2 }}" formats " {{ 1 + 2 }}" + formats "foo . is_a? Bar" formats "foo . is_a? Bar" + formats "lib Foo\n fun foo =\n\n\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n\n\n bar(Int32) : Int32\nend" + formats "begin\n ()\nend" formats "begin\n ()\nend" + formats "case 1 \n when 2 ;\n 3 \n end" formats "case 1 \n when 2 ;\n 3 \n end" + formats "next { {1, 2}, {3, 4} }" formats "next { {1, 2}, {3, 4} }" + formats "foo.bar / 2\n" formats "foo.bar / 2\n" + formats "foo(->{\n 1 + 2\n})" formats "foo(->{\n 1 + 2\n})" + formats "foo = 1\n->foo.[]=(Int32)" formats "foo = 1\n->foo.[]=(Int32)" + formats "foo(&.bar)" formats "foo(&.bar)" + formats "unless a\n2\n3\nelse\n4\n5\nend" formats "unless a\n2\n3\nelse\n4\n5\nend" + formats "foo 1,\n2" formats "foo 1,\n2" + formats "return( 1 , 2 )" formats "return( 1 , 2 )" + formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" + formats "lib Bar\n enum Foo\n A\n end\nend" formats "lib Bar\n enum Foo\n A\n end\nend" formats "def foo\n # Comment\n\n\nend" formats "def foo\n # Comment\n\n\nend" - formats "page= <<-HTML\n \#{1}foo\nHTML" formats "page= <<-HTML\n \#{1}foo\nHTML" - formats "if 1\n2\nend\nif 3\nend" formats "if 1\n2\nend\nif 3\nend" - formats "foo.bar do\n baz\n .b\nend" formats "foo.bar do\n baz\n .b\nend" - formats "macro foo\n {% 1 + 2 %}\nend" formats "macro foo\n {% 1 + 2 %}\nend" + formats "bar = foo([\n 1,\n 2,\n 3,\n])" formats "bar = foo([\n 1,\n 2,\n 3,\n])" + formats "foo(&.@bar)" formats "foo(&.@bar)" + formats "foo &.bar( 1 , 2 )" formats "foo &.bar( 1 , 2 )" + formats "def foo\n ((((((((((((((((0_u64\n ) | ptr[0]) << 8\n ) | ptr[1]) << 8\n ) | ptr[2]) << 8\n ) | ptr[3]) << 8\n ) | ptr[4]) << 8\n ) | ptr[5]) << 8\n ) | ptr[6]) << 8\n ) | ptr[7])\nend" formats "def foo\n ((((((((((((((((0_u64\n ) | ptr[0]) << 8\n ) | ptr[1]) << 8\n ) | ptr[2]) << 8\n ) | ptr[3]) << 8\n ) | ptr[4]) << 8\n ) | ptr[5]) << 8\n ) | ptr[6]) << 8\n ) | ptr[7])\nend" + formats "foo.bar += 2" formats "foo.bar += 2" + formats "{%\n unless true\n 1\n end\n%}" formats "{%\n unless true\n 1\n end\n%}" + formats "foo ((1) ? 2 : 3)" formats "foo ((1) ? 2 : 3)" formats "class Foo\n# nothing\nend" formats "class Foo\n# nothing\nend" - formats "1.===() { 3 }" formats "1.===() { 3 }" - formats "def execute\n begin\n 1\n ensure\n 2\n end\n 3\nend" formats "def execute\n begin\n 1\n ensure\n 2\n end\n 3\nend" - formats "case nil\nelse nil; nil\n# comment\nend" formats "case nil\nelse nil; nil\n# comment\nend" + formats "def foo(a, # comment\n *b)\nend" formats "def foo(a, # comment\n *b)\nend" + formats "...\n2" formats "...\n2" + formats "foo x: 1, y: 2" formats "foo x: 1, y: 2" + formats "->\n:\nInt32\n{\n}" formats "->\n:\nInt32\n{\n}" + formats "macro foo\n 1 \n {{ \n 42 \n }} \n 2 \nend" formats "macro foo\n 1 \n {{ \n 42 \n }} \n 2 \nend" + formats "case 1\nelse\n 2\nend" formats "case 1\nelse\n 2\nend" + formats "yield(\n1 , \n2)" formats "yield(\n1 , \n2)" + formats "Foo( x: Int32 )" formats "Foo( x: Int32 )" + formats "[foo <<-X\nbar\nX\n]" formats "[foo <<-X\nbar\nX\n]" + formats "{ %w() }" formats "{ %w() }" + formats "{% if z %}\n 1\n{% end %}\n\ndef foo\n z =\n 123 + # foo\n 4 # bar\n\n 1\nend" formats "{% if z %}\n 1\n{% end %}\n\ndef foo\n z =\n 123 + # foo\n 4 # bar\n\n 1\nend" + formats "macro foo\n def bar \n end \n end" formats "macro foo\n def bar \n end \n end" + formats "-> :: Foo . foo?" formats "-> :: Foo . foo?" + formats "foo &.[]?( 1, 2 )" formats "foo &.[]?( 1, 2 )" + formats "1\n..\n2" formats "1\n..\n2" + formats "case 1 # foo\nwhen 2\nend" formats "case 1 # foo\nwhen 2\nend" + formats "def foo(x : self ?) \n end" formats "def foo(x : self ?) \n end" + formats "return {1, 2}, {3, 4}" formats "return {1, 2}, {3, 4}" + formats "foo (1), 2" formats "foo (1), 2" + formats " {{\n1 + 2 }}" formats " {{\n1 + 2 }}" + formats "foo.@bar" formats "foo.@bar" + formats "1.===(2) { 3 }" formats "1.===(2) { 3 }" + formats "[\n a(), # b\n]" formats "[\n a(), # b\n]" + formats "def foo ( @x) \n end" formats "def foo ( @x) \n end" + formats "a = begin\n1\n2\nend" formats "a = begin\n1\n2\nend" + formats "macro foo(x, *, z)\nend" formats "macro foo(x, *, z)\nend" + formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" + formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] baz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] baz\n); end" + formats "1.==(2) { 3 }" formats "1.==(2) { 3 }" + formats "@[Foo( 1, 2, foo: 3 )]" formats "@[Foo( 1, 2, foo: 3 )]" + formats "def foo(x, *, z)\nend" formats "def foo(x, *, z)\nend" + formats "foo()" formats "foo()" + formats "begin\nend\n\n# a\n" formats "begin\nend\n\n# a\n" formats "lib Foo\nfun foo(x : Int32, y : Float64) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, y : Float64) : Int32\nend" - formats "[1, 2, 3, ]" formats "[1, 2, 3, ]" - formats "@[Foo( 1, 2 )]" formats "@[Foo( 1, 2 )]" - formats "Tuple()" formats "Tuple()" - formats " Array( {x: Int32, y: String } )" formats " Array( {x: Int32, y: String } )" - formats "require \"foo\"" formats "require \"foo\"" - formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" - formats "lib Foo\n fun foo =\n bar : Void\nend" formats "lib Foo\n fun foo =\n bar : Void\nend" - formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" - formats "def foo\nselect \n when foo \n 2 \n else \n 3 \nend\nend" formats "def foo\nselect \n when foo \n 2 \n else \n 3 \nend\nend" - formats "foo . responds_to?( :bar )" formats "foo . responds_to?( :bar )" - formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" - formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" - formats "a = 1;;; b = 2" formats "a = 1;;; b = 2" - formats "<<-HTML\n foo\n \#{\"foo\"}\n HTML" formats "<<-HTML\n foo\n \#{\"foo\"}\n HTML" - formats "x : A?" formats "x : A?" - formats "foo . bar()" formats "foo . bar()" - formats "macro foo\n {{1 + 2}}\nend" formats "macro foo\n {{1 + 2}}\nend" - formats "[1,\n2,\n3]" formats "[1,\n2,\n3]" - formats "->{\nx\n}" formats "->{\nx\n}" - formats "{\n 1 => 2,\n 10 => 30,\n 30 => 40,\n \"foobar\" => 50,\n \"coco\" => 60,\n}" formats "{\n 1 => 2,\n 10 => 30,\n 30 => 40,\n \"foobar\" => 50,\n \"coco\" => 60,\n}" - formats "def foo : (A, B) ->\n nil\nend" formats "def foo : (A, B) ->\n nil\nend" - formats "macro foo\nend" formats "macro foo\nend" - formats "asm(\"a\" : \"b\"(c)\n)" formats "asm(\"a\" : \"b\"(c)\n)" - formats "x : {\"foo bar\": Int32}" formats "x : {\"foo bar\": Int32}" + formats "def foo(x, *, y, **z)\nend" formats "def foo(x, *, y, **z)\nend" formats "a = / /" formats "a = / /" - formats "lib Bar\n enum Foo\n A = 1\n end\nend" formats "lib Bar\n enum Foo\n A = 1\n end\nend" - formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" - formats "{\n1 => 2 ,\n 3 => 4 }" formats "{\n1 => 2 ,\n 3 => 4 }" - formats "def foo ( x : Int32 ) \n end" formats "def foo ( x : Int32 ) \n end" - formats "{ {1, 2, 3} => 4 }" formats "{ {1, 2, 3} => 4 }" - formats "foo &.nil?" formats "foo &.nil?" - formats "\n# hello\n1" formats "\n# hello\n1" + formats "def foo ( &@block) \n end" formats "def foo ( &@block) \n end" + formats "1 ? 2 : 3" formats "1 ? 2 : 3" + formats "break 1 , 2" formats "break 1 , 2" + formats "foo[] =1" formats "foo[] =1" + formats "foo &.[a] = 1" formats "foo &.[a] = 1" + formats "foo do\n {{ foo <<-X\n bar\n X\n }}\nend" formats "foo do\n {{ foo <<-X\n bar\n X\n }}\nend" + formats "@[Foo(\n 1,\n)]" formats "@[Foo(\n 1,\n)]" + formats "1\n# hello\n\n\n" formats "1\n# hello\n\n\n" + formats "yield( 1 , 2 )" formats "yield( 1 , 2 )" + formats "begin\n1\nrescue ex\n3\nend" formats "begin\n1\nrescue ex\n3\nend" + formats "yield (1).foo" formats "yield (1).foo" + formats "foo.[]" formats "foo.[]" + formats "class Foo \n\n 1 \n\nend" formats "class Foo \n\n 1 \n\nend" + formats "[\n a(),\n]" formats "[\n a(),\n]" + formats "return 1, {2, 3}" formats "return 1, {2, 3}" + formats "def foo : self | Nil\n nil\nend" formats "def foo : self | Nil\n nil\nend" + formats "foo \\\n 1,\n 2\n\nbar \\\n foo: 1,\n bar: 2" formats "foo \\\n 1,\n 2\n\nbar \\\n foo: 1,\n bar: 2" + formats "asm(\"nop\" ::: \"eax\" )" formats "asm(\"nop\" ::: \"eax\" )" + formats "asm(\"a\" :::: \"volatile\"\n)" formats "asm(\"a\" :::: \"volatile\"\n)" + formats "case 1\nwhen 1, # 1\n 2, # 2\n 3 # 3\n 1\nend" formats "case 1\nwhen 1, # 1\n 2, # 2\n 3 # 3\n 1\nend" + formats "Foo( Bar( ) )" formats "Foo( Bar( ) )" formats "foo a , *b" formats "foo a , *b" - formats "join io, &.inspect" formats "join io, &.inspect" - formats "select\n# when foo\nwhen bar\n break\nend" formats "select\n# when foo\nwhen bar\n break\nend" - formats "-> :: foo=" formats "-> :: foo=" - formats "getter foo : Int32 # comment\n\ndef foo\nend" formats "getter foo : Int32 # comment\n\ndef foo\nend" - formats "break( 1 , 2 )" formats "break( 1 , 2 )" - formats "def foo(a : T, b : U) forall T, U #\n #\nend" formats "def foo(a : T, b : U) forall T, U #\n #\nend" - formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" - formats "1.== do\nend" formats "1.== do\nend" - formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" - formats "def foo ( x : Int32 = 1 ) \n end" formats "def foo ( x : Int32 = 1 ) \n end" - formats "yield 1" formats "yield 1" - formats "return 1\n# end" formats "return 1\n# end" + formats "lib Foo\n {% if 1 %}\n fun foo\n {% end %}\nend\n\nmacro bar\n 1\nend" formats "lib Foo\n {% if 1 %}\n fun foo\n {% end %}\nend\n\nmacro bar\n 1\nend" + formats "{ } of A => B" formats "{ } of A => B" + formats "%{hello}" formats "%{hello}" + formats "::Foo:: Bar" formats "::Foo:: Bar" + formats "foo(<<-X,\na\nX\n 1)" formats "foo(<<-X,\na\nX\n 1)" + formats "alias Foo::Bar =Baz" formats "alias Foo::Bar =Baz" + formats "Foo( * T, { * A ,*\n B } )" formats "Foo( * T, { * A ,*\n B } )" + formats "->( x , y ) { x }" formats "->( x , y ) { x }" + formats "x.try &.[] 123" formats "x.try &.[] 123" + formats "args.any? &.name.baz" formats "args.any? &.name.baz" + formats "alias A = ( A | B )" formats "alias A = ( A | B )" + formats "foo[ 1 , 2 ]" formats "foo[ 1 , 2 ]" + formats "case / /\nwhen / /, /x/\n / /\nend" formats "case / /\nwhen / /, /x/\n / /\nend" + formats "def foo : (A | B(C))\n nil\nend" formats "def foo : (A | B(C))\n nil\nend" + formats "foo\n .bar\n .baz(\n 1\n )" formats "foo\n .bar\n .baz(\n 1\n )" + formats "[1, 2, 3] of Foo" formats "[1, 2, 3] of Foo" + formats "def foo(a, **b, # comment\n &block)\nend" formats "def foo(a, **b, # comment\n &block)\nend" + formats "a=1" formats "a=1" + formats "def `(x)\n 1\nend" formats "def `(x)\n 1\nend" + formats "a(&.b.c.as C)" formats "a(&.b.c.as C)" + formats "[] of Foo" formats "[] of Foo" + formats "{ 1 => 2 }" formats "{ 1 => 2 }" + formats "x : {\"foo bar\": Int32}" formats "x : {\"foo bar\": Int32}" + formats " Array( {x: Int32, y: String } )" formats " Array( {x: Int32, y: String } )" + formats "1 # foo" formats "1 # foo" + formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" + formats "x[ y ] += 1" formats "x[ y ] += 1" + formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" + formats "foo 1, do\n2\nend" formats "foo 1, do\n2\nend" + formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" + formats "{% begin %}\n \"\n foo\"\n{% end %}" formats "{% begin %}\n \"\n foo\"\n{% end %}" + formats "%w(one two three)" formats "%w(one two three)" + formats "foo &.[]=(1, 2)" formats "foo &.[]=(1, 2)" + formats "class Foo;end" formats "class Foo;end" + formats "enum Foo : Int32\nA = 1\nend" formats "enum Foo : Int32\nA = 1\nend" + formats "()" formats "()" + formats "def foo\na = bar do\n1\nend\nend" formats "def foo\na = bar do\n1\nend\nend" + formats "macro foo # bar\n baz\nend" formats "macro foo # bar\n baz\nend" + formats "1.>= { 3 }" formats "1.>= { 3 }" + formats "private getter foo" formats "private getter foo" + formats "def foo(x : (self)?)\nend" formats "def foo(x : (self)?)\nend" + formats "$1?" formats "$1?" + formats "def foo\nend\n\n\n\ndef bar\nend" formats "def foo\nend\n\n\n\ndef bar\nend" + formats "foo do\n [foo <<-X\n bar\n X\n ]\nend" formats "foo do\n [foo <<-X\n bar\n X\n ]\nend" + formats " ((1) + 2)" formats " ((1) + 2)" + formats "begin\n1\nrescue ex\n3\nelse\n4\nend" formats "begin\n1\nrescue ex\n3\nelse\n4\nend" + formats "select \n when foo ; 2 \n end" formats "select \n when foo ; 2 \n end" + formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" + formats "def foo(x @@y)\nend" formats "def foo(x @@y)\nend" + formats "begin\n1\n2\n3\nend" formats "begin\n1\n2\n3\nend" + formats "module Foo\n 1 # bar\nend\n\nmodule Foo\n 1\n # bar\nend\n\nmodule Foo\n 1\n\n # bar\nend\n\nmodule Foo\n 1\n 2\n # bar\nend\n\nmodule Foo\n 1\n 2\n\n # bar\nend\n\nif 1\n 1\n # bar\nend\n\nif 1\n 1\n\n # bar\nend\n\n1\n2\n# foo\n\n1\n2\n\n# foo\n" formats "module Foo\n 1 # bar\nend\n\nmodule Foo\n 1\n # bar\nend\n\nmodule Foo\n 1\n\n # bar\nend\n\nmodule Foo\n 1\n 2\n # bar\nend\n\nmodule Foo\n 1\n 2\n\n # bar\nend\n\nif 1\n 1\n # bar\nend\n\nif 1\n 1\n\n # bar\nend\n\n1\n2\n# foo\n\n1\n2\n\n# foo\n" + formats "def foo(a, &@b)\nend" formats "def foo(a, &@b)\nend" + formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" + formats "def foo()\n1\nend" formats "def foo()\n1\nend" + formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" formats "a = \"\n\"\n1 # 1\n12 # 2\n" formats "a = \"\n\"\n1 # 1\n12 # 2\n" - formats " {% begin %} 2 {% end %}" formats " {% begin %} 2 {% end %}" - formats "call(foo <<-X\nbar\nX\n)" formats "call(foo <<-X\nbar\nX\n)" - formats "1.<=(2) { 3 }" formats "1.<=(2) { 3 }" - formats "1 \\\nrescue 2" formats "1 \\\nrescue 2" - formats "->( x : Int32 , y ) { x }" formats "->( x : Int32 , y ) { x }" - formats "foo &.bar.nil?()" formats "foo &.bar.nil?()" - formats ":+" formats ":+" - formats "unless a\n2\nelse\nend" formats "unless a\n2\nelse\nend" - formats "foo[&.bar]?" formats "foo[&.bar]?" - formats "\"foo \#{ 1 } \#{ __DIR__ }\"" formats "\"foo \#{ 1 } \#{ __DIR__ }\"" - formats "begin\n1\nensure\n2\nend" formats "begin\n1\nensure\n2\nend" - formats "next {1, 2}, 3" formats "next {1, 2}, 3" - formats "foo.bar / 2\n" formats "foo.bar / 2\n" - formats "{%\n if 1\n 2\n end\n%}" formats "{%\n if 1\n 2\n end\n%}" - formats "module Foo # foo\nend" formats "module Foo # foo\nend" - formats "{% if true %}\n # x\n{% end %}" formats "{% if true %}\n # x\n{% end %}" - formats "foo = 1\n->foo.foo" formats "foo = 1\n->foo.foo" - formats "next { {1, 2}, {3, 4} }" formats "next { {1, 2}, {3, 4} }" - formats "while 1 # foo\nend" formats "while 1 # foo\nend" - formats "begin\n a\nend.b { }\nc" formats "begin\n a\nend.b { }\nc" - formats "1 && # foo\n 2 &&\n 3" formats "1 && # foo\n 2 &&\n 3" - formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" - formats "foo &.[]?" formats "foo &.[]?" - formats "X(typeof(begin\n e.is_a?(Y) ? 1 : 2\nend))" formats "X(typeof(begin\n e.is_a?(Y) ? 1 : 2\nend))" + formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" + formats "1.>=() { 3 }" formats "1.>=() { 3 }" + formats "break" formats "break" + formats "1.<=() { 3 }" formats "1.<=() { 3 }" + formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" + formats "foo &.as?(T).bar" formats "foo &.as?(T).bar" + formats "def foo\n1\nend" formats "def foo\n1\nend" + formats "case 1 \n when 2 , 3 \n 4 \n end" formats "case 1 \n when 2 , 3 \n 4 \n end" + formats "-> : {Int32, String} {}" formats "-> : {Int32, String} {}" + formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" + formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" + formats "1 * 2" formats "1 * 2" + formats "def foo\n 1\n 2\nrescue IO\n 1\nend" formats "def foo\n 1\n 2\nrescue IO\n 1\nend" + formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" + formats "def foo(x)\n case 1\n when self // 2\n 3\n end\nend" formats "def foo(x)\n case 1\n when self // 2\n 3\n end\nend" + formats "class Foo\n enum Bar\n A; B; C;\n D; E; F\nend\nend\n" formats "class Foo\n enum Bar\n A; B; C;\n D; E; F\nend\nend\n" + formats "%(\n1\n)\n\n{\n 1 => 2,\n 234 => 5,\n}" formats "%(\n1\n)\n\n{\n 1 => 2,\n 234 => 5,\n}" + formats "a = \\\n # foo\n nil" formats "a = \\\n # foo\n nil" + formats "def foo(a : T, b : U) forall T, U\n #\nend" formats "def foo(a : T, b : U) forall T, U\n #\nend" + formats "yield( 1 )" formats "yield( 1 )" + formats "def foo\nselect \n when foo \n 2 \n else \n 3 \nend\nend" formats "def foo\nselect \n when foo \n 2 \n else \n 3 \nend\nend" + formats "\"\#{\"foo\"}\"" formats "\"\#{\"foo\"}\"" + formats "case 1\nwhen 2\n\n#comment\nend" formats "case 1\nwhen 2\n\n#comment\nend" + formats "foo do\n {% foo <<-X\n bar\n X\n %}\nend" formats "foo do\n {% foo <<-X\n bar\n X\n %}\nend" + formats "/foo \#{ bar }/" formats "/foo \#{ bar }/" formats "10 // a" formats "10 // a" - formats "def foo(@[MyAnn] v); end" formats "def foo(@[MyAnn] v); end" - formats "->(){}" formats "->(){}" - formats "a = 1\na ||= begin\n 1\nend" formats "a = 1\na ||= begin\n 1\nend" - formats "foo &.[]?(1, 2)" formats "foo &.[]?(1, 2)" - formats "case 1\nwhen 2\n 3\n # foo\nelse\n 4\n # bar\nend" formats "case 1\nwhen 2\n 3\n # foo\nelse\n 4\n # bar\nend" - formats "offsetof( String, @length )" formats "offsetof( String, @length )" - formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" - formats "def foo(x) forall T # bar\n # baz\nend" formats "def foo(x) forall T # bar\n # baz\nend" - formats "begin\n call\n # comment\nrescue\n call\n # comment\nelse\n call\n # comment\nensure\n call\n # comment\nend" formats "begin\n call\n # comment\nrescue\n call\n # comment\nelse\n call\n # comment\nensure\n call\n # comment\nend" - formats "if 1\nfoo do | x , y | \n x \n end\nend" formats "if 1\nfoo do | x , y | \n x \n end\nend" - formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" - formats "__DIR__" formats "__DIR__" - formats "foo 1, # comment\n # bar\n do\n end" formats "foo 1, # comment\n # bar\n do\n end" - formats "lib LibFoo\n struct Bar\n {% begin %}\n x : Int32\n {% end %}\n end\nend" formats "lib LibFoo\n struct Bar\n {% begin %}\n x : Int32\n {% end %}\n end\nend" - formats "{ {1 => 2} }" formats "{ {1 => 2} }" - formats "struct Foo\n # bar\n # baz\n1\nend" formats "struct Foo\n # bar\n # baz\n1\nend" + formats "foo.bar(&.% baz)" formats "foo.bar(&.% baz)" + formats "`foo \#{ bar }`" formats "`foo \#{ bar }`" + formats "1 ensure 2" formats "1 ensure 2" + formats ":\"foo\"" formats ":\"foo\"" formats "lib Foo::Bar\nend" formats "lib Foo::Bar\nend" - formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" - formats "1.>= do\nend" formats "1.>= do\nend" - formats "foo \\\n 1,\n 2\n\nbar \\\n foo: 1,\n bar: 2" formats "foo \\\n 1,\n 2\n\nbar \\\n foo: 1,\n bar: 2" - formats "foo . is_a? Bar" formats "foo . is_a? Bar" + formats "def foo(\n foo,\n @[MyAnn] &block\n); end" formats "def foo(\n foo,\n @[MyAnn] &block\n); end" + formats "a(&.b.c.as(C))" formats "a(&.b.c.as(C))" + formats "foo(1 ||\n # foo\n 2)" formats "foo(1 ||\n # foo\n 2)" + formats "macro [](x)\nend" formats "macro [](x)\nend" + formats "foo do # hello\nend" formats "foo do # hello\nend" + formats "def foo\n 1\n #\n\n\nrescue\nend" formats "def foo\n 1\n #\n\n\nrescue\nend" + formats "1 &&\n2" formats "1 &&\n2" + formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" + formats "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" formats "lib Foo\n fun foo(Int32) : Int32\nend" formats "lib Foo\n fun foo(Int32) : Int32\nend" - formats "foo do\n {1 => foo <<-X\n bar\n X\n }\nend" formats "foo do\n {1 => foo <<-X\n bar\n X\n }\nend" - formats "case nil\nelse nil; nil # comment\nend" formats "case nil\nelse nil; nil # comment\nend" - formats "macro foo\n macro bar\n \\{% begin %}\n \\\\{% puts %}\n \\{% end %}\n end\nend" formats "macro foo\n macro bar\n \\{% begin %}\n \\\\{% puts %}\n \\{% end %}\n end\nend" - formats " 1" formats " 1" - formats "foo (1; 2)" formats "foo (1; 2)" - formats "begin\n1\nrescue ex\n3\nelse\n4\nend" formats "begin\n1\nrescue ex\n3\nelse\n4\nend" - formats "asm(\"nop\" :: \"r\"(0))" formats "asm(\"nop\" :: \"r\"(0))" + formats "alias Foo::Bar = Baz" formats "alias Foo::Bar = Baz" + formats "foo : Foo*****" formats "foo : Foo*****" + formats "1 &+ 2" formats "1 &+ 2" + formats "foo do | x , y | \n x \n end" formats "foo do | x , y | \n x \n end" + formats "self.as(Int32)" formats "self.as(Int32)" formats "foo\n .bar(\n 1\n )" formats "foo\n .bar(\n 1\n )" - formats "asm(\"nop\"\n: \"a\"(0) )" formats "asm(\"nop\"\n: \"a\"(0) )" - formats "def foo\n@x : Int32\nend" formats "def foo\n@x : Int32\nend" - formats "yield 1 , 2" formats "yield 1 , 2" - formats "foo do | x | \n x \n end" formats "foo do | x | \n x \n end" - formats "foo.bar += 2" formats "foo.bar += 2" - formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" - formats "@[ Foo(foo: 1) ]\ndef foo\nend" formats "@[ Foo(foo: 1) ]\ndef foo\nend" - formats "lib Foo\n $foo : Int32 \nend" formats "lib Foo\n $foo : Int32 \nend" - formats "1.===(2) { 3 }" formats "1.===(2) { 3 }" + formats "if 1\ncase 1\nwhen 2\n3\nend\nend" formats "if 1\ncase 1\nwhen 2\n3\nend\nend" + formats "unless a\n2\nend" formats "unless a\n2\nend" + formats "lib Foo\nfun foo () : Int32\nend" formats "lib Foo\nfun foo () : Int32\nend" + formats "def foo(x)\n case self // x\n when 2\n 3\n end\nend" formats "def foo(x)\n case self // x\n when 2\n 3\n end\nend" + formats " {%\na = 1 %}" formats " {%\na = 1 %}" + formats ":foo" formats ":foo" + formats "class Actor\n macro inherited\nend\nend\n" formats "class Actor\n macro inherited\nend\nend\n" + formats "def foo(x, **z, &block)\nend" formats "def foo(x, **z, &block)\nend" + formats "def foo(x) forall T # bar\n # baz\nend" formats "def foo(x) forall T # bar\n # baz\nend" + formats "def foo(\n **a\n)\n 1\nend" formats "def foo(\n **a\n)\n 1\nend" + formats "foo[]" formats "foo[]" + formats "def foo(\n **a\n # comment\n)\n 1\nend" formats "def foo(\n **a\n # comment\n)\n 1\nend" + formats "$~" formats "$~" formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" - formats "def foo ( @@select) \n end" formats "def foo ( @@select) \n end" - formats "bar = foo([\n 1,\n 2,\n 3,\n])" formats "bar = foo([\n 1,\n 2,\n 3,\n])" - formats "begin\n begin\n a\n # b\n end\nend" formats "begin\n begin\n a\n # b\n end\nend" - formats "1*2" formats "1*2" - formats "foo &.==(2)" formats "foo &.==(2)" - formats "[ * [ * [ 1 ] ], * \n[ 2] ]" formats "[ * [ * [ 1 ] ], * \n[ 2] ]" - formats "class X; annotation FooAnnotation ; end ; end" formats "class X; annotation FooAnnotation ; end ; end" - formats "foo &.>=(2)" formats "foo &.>=(2)" - formats "$?" formats "$?" - formats "class Foo\n # ```\n # 1\n # ```\nend\n" formats "class Foo\n # ```\n # 1\n # ```\nend\n" - formats "foo([\n 1,\n 2,\n 3,\n])" formats "foo([\n 1,\n 2,\n 3,\n])" - formats "next *1 ,2" formats "next *1 ,2" - formats "lib Foo\n $foo = hello : Int32 \nend" formats "lib Foo\n $foo = hello : Int32 \nend" - formats "def foo(x : self ?) \n end" formats "def foo(x : self ?) \n end" - formats "foo.bar\n.baz" formats "foo.bar\n.baz" - formats "[] of (((Array(T))))" formats "[] of (((Array(T))))" - formats "def foo\n case x\n # z\n when 1\n end\nend" formats "def foo\n case x\n # z\n when 1\n end\nend" - formats "lib Foo\nstruct Foo\nend\nend" formats "lib Foo\nstruct Foo\nend\nend" - formats "<<-HTML\n \#{1}x\n y\n HTML" formats "<<-HTML\n \#{1}x\n y\n HTML" - formats "@x &&= 1" formats "@x &&= 1" - formats "->do\nend" formats "->do\nend" - formats "foo.bar &.baz( 1 , 2 )" formats "foo.bar &.baz( 1 , 2 )" - formats "def foo # bar\n # baz\nend" formats "def foo # bar\n # baz\nend" - formats "1 if 2\n# foo\n3" formats "1 if 2\n# foo\n3" - formats "def foo(**z)\nend" formats "def foo(**z)\nend" - formats "macro foo\n <<-FOO\n hello \n FOO\nend" formats "macro foo\n <<-FOO\n hello \n FOO\nend" - formats "macro foo\n {% if 1 %} 2 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% end %}\nend" - formats "private def foo\nend\nprivate def bar\nend" formats "private def foo\nend\nprivate def bar\nend" - formats " <<-HTML\n \#{1} \#{2}\n HTML" formats " <<-HTML\n \#{1} \#{2}\n HTML" - formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" - formats "_ = 1" formats "_ = 1" - formats "%i{one( two( three)}" formats "%i{one( two( three)}" - formats "->@@foo.foo?" formats "->@@foo.foo?" - formats "def foo( @[MyAnn] v ); end" formats "def foo( @[MyAnn] v ); end" - formats "struct Foo(T)\n# bar\n1\nend" formats "struct Foo(T)\n# bar\n1\nend" - formats "x : (A -> )" formats "x : (A -> )" - formats "if a\n2; 3\nelse\n3\nend" formats "if a\n2; 3\nelse\n3\nend" - formats "::StaticArray(T)" formats "::StaticArray(T)" - formats "1 &&\n2" formats "1 &&\n2" - formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" - formats "def foo(**a,)\n 1\nend" formats "def foo(**a,)\n 1\nend" - formats "NamedTuple(a: Int32,)" formats "NamedTuple(a: Int32,)" - formats "begin\n array[\n 0 # Zero\n ]\nend" formats "begin\n array[\n 0 # Zero\n ]\nend" - formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" - formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" - formats "[\n {\n 1 => 2,\n }, {\n 3 => 4,\n }, {\n 5 => 6,\n },\n]" formats "[\n {\n 1 => 2,\n }, {\n 3 => 4,\n }, {\n 5 => 6,\n },\n]" - formats "foo.[]" formats "foo.[]" - formats "1 ; 2" formats "1 ; 2" - formats "1 \\\n+ 2" formats "1 \\\n+ 2" - formats "def a\n [\n 1, # x\n # y\n ]\nend" formats "def a\n [\n 1, # x\n # y\n ]\nend" - formats "Foo::Bar(T, U?)?" formats "Foo::Bar(T, U?)?" - formats "break 1" formats "break 1" - formats "[] of (Array(T))" formats "[] of (Array(T))" - formats "1 &+ 2" formats "1 &+ 2" - formats "foo \\\n 1,\n 2" formats "foo \\\n 1,\n 2" - formats "alias X = (A, B) ->\nbar : C" formats "alias X = (A, B) ->\nbar : C" - formats " <<-EOF\n 1\n 2\n EOF" formats " <<-EOF\n 1\n 2\n EOF" - formats ":&-" formats ":&-" - formats "{ * 1 * 2,\n*\n3, 4 }" formats "{ * 1 * 2,\n*\n3, 4 }" - formats "def foo(x @@y)\nend" formats "def foo(x @@y)\nend" - formats "if 1\nelse\n2 # foo\nend" formats "if 1\nelse\n2 # foo\nend" - formats "select \n when foo \n 2 \n when bar \n 3 \n end" formats "select \n when foo \n 2 \n when bar \n 3 \n end" + formats "'\\n'" formats "'\\n'" + formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" + formats "0i64" formats "0i64" + formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] baz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] baz\n); end" + formats "def a\n b(\n 1, # x\n # y\n a: 1, # x\n # y\n b: 2 # z\n )\nend" formats "def a\n b(\n 1, # x\n # y\n a: 1, # x\n # y\n b: 2 # z\n )\nend" + formats "1.!=() { 3 }" formats "1.!=() { 3 }" formats "foo &.[]=( 1, 2 )" formats "foo &.[]=( 1, 2 )" - formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" - formats "->: Int32 do\nx\nend" formats "->: Int32 do\nx\nend" - formats "foo 1,\na: 1,\nb: 2,\nc: 3" formats "foo 1,\na: 1,\nb: 2,\nc: 3" - formats "x.try &.[]= 123, 456" formats "x.try &.[]= 123, 456" - formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" - formats "-> : {Int32, String} {}" formats "-> : {Int32, String} {}" - formats "\"\#{\n foo = 1}\"" formats "\"\#{\n foo = 1}\"" - formats "@foo : Int32 # comment\n\ndef foo\nend" formats "@foo : Int32 # comment\n\ndef foo\nend" - formats "def foo(&block: Int32)\nend" formats "def foo(&block: Int32)\nend" - formats "foo &.responds_to?(:foo).bar" formats "foo &.responds_to?(:foo).bar" - formats "alias Foo=Bar" formats "alias Foo=Bar" - formats "x : Int32[ 8 ]" formats "x : Int32[ 8 ]" - formats "[\n a(),\n]" formats "[\n a(),\n]" - formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" - formats "(\n a = 1\n a\n)" formats "(\n a = 1\n a\n)" - formats "return *1 ,2" formats "return *1 ,2" - formats "0_u64" formats "0_u64" - formats "1 if 2\n# foo" formats "1 if 2\n# foo" - formats "\n # hello\n\n1" formats "\n # hello\n\n1" - formats "foo do\n # bar\nend" formats "foo do\n # bar\nend" + formats "1 \\\n+ 2" formats "1 \\\n+ 2" + formats "def +(x)\nend" formats "def +(x)\nend" + formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" + formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" + formats "macro foo\n {{ 1 + 2 }}\nend" formats "macro foo\n {{ 1 + 2 }}\nend" formats "next" formats "next" - formats ":\"foo bar\"" formats ":\"foo bar\"" - formats "[\n 1, # foo\n 3,\n]" formats "[\n 1, # foo\n 3,\n]" - formats "foo[] =1" formats "foo[] =1" - formats "foo(\n <<-HERE,\n hello\n HERE\n foo: 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n foo: 1,\n)" - formats "while 1 &&\n2 &&\n3\n4\nend" formats "while 1 &&\n2 &&\n3\n4\nend" - formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" - formats "\"hello\"" formats "\"hello\"" - formats "foo(bar(\n 1,\n 2,\n))" formats "foo(bar(\n 1,\n 2,\n))" - formats "&- 1" formats "&- 1" - formats "if a\n2\n3\nend" formats "if a\n2\n3\nend" - formats "foo(\n 1, 2)" formats "foo(\n 1, 2)" - formats "foo : (self)?" formats "foo : (self)?" - formats "def foo ( x ) \n end" formats "def foo ( x ) \n end" - formats "bar do\n call(foo <<-X\n bar\n X\n )\nend" formats "bar do\n call(foo <<-X\n bar\n X\n )\nend" - formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" - formats "Union(Int32, String)?" formats "Union(Int32, String)?" - formats "def func # comment\n (1 + 2) / 3\nend" formats "def func # comment\n (1 + 2) / 3\nend" - formats "10//a" formats "10//a" - formats "def foo\nend\ndef bar\nend" formats "def foo\nend\ndef bar\nend" - formats ":&*" formats ":&*" - formats "lib Foo\nfun foo( ... ) : Int32\nend" formats "lib Foo\nfun foo( ... ) : Int32\nend" - formats "def foo(\n a,\n b,\n)\nend" formats "def foo(\n a,\n b,\n)\nend" - formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" - formats "loop do\n 1\nrescue\n 2\nend" formats "loop do\n 1\nrescue\n 2\nend" - formats "[] of Foo" formats "[] of Foo" - formats "yield" formats "yield" - formats "{1 => foo <<-X\nbar\nX\n}" formats "{1 => foo <<-X\nbar\nX\n}" - formats "def foo(x)\n self // x\nend" formats "def foo(x)\n self // x\nend" - formats "X(typeof(begin\n e.is_a?(Y)\nend))" formats "X(typeof(begin\n e.is_a?(Y)\nend))" - formats "def foo ( x = 1 ) \n end" formats "def foo ( x = 1 ) \n end" - formats "foo &.is_a?(T)" formats "foo &.is_a?(T)" - formats "next *1 , *2" formats "next *1 , *2" - formats "foo { | a, ( b , c, ), | a + b + c }" formats "foo { | a, ( b , c, ), | a + b + c }" - formats "a = foo(bar(\n 1,\n 2,\n))" formats "a = foo(bar(\n 1,\n 2,\n))" - formats "-> :: foo" formats "-> :: foo" - formats "responds_to? :foo" formats "responds_to? :foo" - formats "1 \\\nensure 2" formats "1 \\\nensure 2" - formats "if 1 # foo\nend" formats "if 1 # foo\nend" + formats "foo[&.bar]" formats "foo[&.bar]" + formats "if 1\nelse\n2\nend\n3" formats "if 1\nelse\n2\nend\n3" + formats "foo { |x, *y| }" formats "foo { |x, *y| }" + formats "def foo (\nx ,\n y ) \n end" formats "def foo (\nx ,\n y ) \n end" + formats "case\nend" formats "case\nend" + formats "def foo\n1\nensure\n2\nend" formats "def foo\n1\nensure\n2\nend" + formats "case 0\nwhen 0 then 1; 2\n# Comments\nend" formats "case 0\nwhen 0 then 1; 2\n# Comments\nend" + formats "def foo(x = __FILE__ )\nend" formats "def foo(x = __FILE__ )\nend" + formats "begin\n 0[1] rescue 2 end" formats "begin\n 0[1] rescue 2 end" + formats "a = foo(bar([\n 1,\n]))" formats "a = foo(bar([\n 1,\n]))" + formats "0u64" formats "0u64" + formats "getter foo : Int32 # comment\n\ndef foo\nend" formats "getter foo : Int32 # comment\n\ndef foo\nend" + formats "asm(\n# foo\n\"nop\"\n# bar\n)" formats "asm(\n# foo\n\"nop\"\n# bar\n)" + formats "x : (A | B)" formats "x : (A | B)" + formats "foo : (F(A)) | D" formats "foo : (F(A)) | D" + formats "foo.[ 1, 2 ]?" formats "foo.[ 1, 2 ]?" + formats "yield(1 , \n2)" formats "yield(1 , \n2)" + formats "foo(\n 1,\n a: 1,\n b: 2,\n)" formats "foo(\n 1,\n a: 1,\n b: 2,\n)" + formats "->(){}" formats "->(){}" formats "def foo(x : ( A | B )) : ( A | B )\nend" formats "def foo(x : ( A | B )) : ( A | B )\nend" - formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" - formats "case / /\nwhen / /, /x/\n / /\nend" formats "case / /\nwhen / /, /x/\n / /\nend" - formats "foo . bar" formats "foo . bar" - formats "1234 # foo\n1 # bar" formats "1234 # foo\n1 # bar" - formats "lib Foo\nend" formats "lib Foo\nend" - formats "extend Foo" formats "extend Foo" - formats "def foo(x) : Int32 # bar\n # baz\nend" formats "def foo(x) : Int32 # bar\n # baz\nend" - formats "-> { }" formats "-> { }" - formats "def a\n b(\n 1, # x\n # y\n a: 1, # x\n # y\n b: 2 # z\n )\nend" formats "def a\n b(\n 1, # x\n # y\n a: 1, # x\n # y\n b: 2 # z\n )\nend" - formats "a[1] , b[2] = 1 , 2" formats "a[1] , b[2] = 1 , 2" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" - formats "\"\#{ # foo\n foo = 1\n}\"" formats "\"\#{ # foo\n foo = 1\n}\"" - formats "def foo( x , & block )\nend" formats "def foo( x , & block )\nend" - formats "" formats "" - formats "foo x: 1" formats "foo x: 1" - formats "x = <<-EOF\n 1\nEOF" formats "x = <<-EOF\n 1\nEOF" - formats "{% for a in %w() %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% for a in %w() %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "enum Foo\n A; B; C\nend\n" formats "enum Foo\n A; B; C\nend\n" - formats "next {1, 2}, {3, 4}" formats "next {1, 2}, {3, 4}" - formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" - formats "1 ?\n 2 : \n 3" formats "1 ?\n 2 : \n 3" - formats "foo[1, &.bar]?" formats "foo[1, &.bar]?" - formats "%w(\n one two\n three four\n)" formats "%w(\n one two\n three four\n)" - formats "macro foo # bar\n baz\nend" formats "macro foo # bar\n baz\nend" - formats "select \n when foo \n 2 \n end" formats "select \n when foo \n 2 \n end" - formats "foo &.[]" formats "foo &.[]" - formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" - formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" - formats "def foo ( @@x) \n end" formats "def foo ( @@x) \n end" - formats "Set{ # foo\n 1,\n}" formats "Set{ # foo\n 1,\n}" - formats "case 1\nwhen 2 # a\n # b\nend" formats "case 1\nwhen 2 # a\n # b\nend" + formats "-> :: foo" formats "-> :: foo" + formats "->( x )\n:\nInt32 { }" formats "->( x )\n:\nInt32 { }" + formats "\"hel\nlo\"" formats "\"hel\nlo\"" + formats "macro []=(x, y)\nend" formats "macro []=(x, y)\nend" + formats "x, y = <<-FOO, <<-BAR\n hello\n FOO\n world\n BAR" formats "x, y = <<-FOO, <<-BAR\n hello\n FOO\n world\n BAR" + formats "->foo=" formats "->foo=" + formats "false" formats "false" + formats "case 1 \n when 2 then \n 3 \n end" formats "case 1 \n when 2 then \n 3 \n end" formats "x.is_a? T\n3\n" formats "x.is_a? T\n3\n" - formats "alias Foo =Bar" formats "alias Foo =Bar" - formats "a = \nif 1\n2\nend" formats "a = \nif 1\n2\nend" - formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" - formats "def foo(\n **a\n\n # comment\n)\n 1\nend" formats "def foo(\n **a\n\n # comment\n)\n 1\nend" - formats "1 &&\n2 &&\n3" formats "1 &&\n2 &&\n3" -Crystal::Command - clear_cache - clears any cached compiler files clears any cached compiler files + formats "a = 1 if 1 == 2 ||\n 3 == 4\n" formats "a = 1 if 1 == 2 ||\n 3 == 4\n" + formats "\"foo \#{ 1 + 2 }\"" formats "\"foo \#{ 1 + 2 }\"" + formats "a = if 1\n2\n3\nend" formats "a = if 1\n2\n3\nend" + formats "def func # comment\n (1 + 2) / 3\nend" formats "def func # comment\n (1 + 2) / 3\nend" + formats "foo : (A) | D" formats "foo : (A) | D" Crystal::Doc::Macro args_to_s + shows simple args shows simple args + shows simple arg and block arg shows simple arg and block arg shows block arg shows block arg - shows default value with highlighting shows default value with highlighting shows simple arg and double splat arg shows simple arg and double splat arg - shows simple arg and block arg shows simple arg and block arg - shows external name of arg shows external name of arg shows double splat arg shows double splat arg - shows double splat arg shows double splat arg - shows simple args shows simple args + shows simple arg and splat arg shows simple arg and splat arg shows splat arg shows splat arg + shows double splat arg shows double splat arg + shows external name of arg shows external name of arg + shows default value with highlighting shows default value with highlighting shows external name of arg with quotes and escaping shows external name of arg with quotes and escaping - shows simple arg and splat arg shows simple arg and splat arg -Semantic: previous_def - types previous def in generic class types previous def in generic class - types previous def with forwarded arguments, different internal names (#8895) types previous def with forwarded arguments, different internal names (#8895) - types previous def types previous def - types previous def with forwarded arguments, def has bare splat parameter (#8895) types previous def with forwarded arguments, def has bare splat parameter (#8895) - errors if there's no previous def errors if there's no previous def - types previous def with named arguments, def has double splat parameter (#8895) types previous def with named arguments, def has double splat parameter (#8895) - says wrong number of arguments for previous_def (#1223) says wrong number of arguments for previous_def (#1223) - types previous def when inside fun types previous def when inside fun - types previous def with named arguments, def has bare splat parameter (#8895) types previous def with named arguments, def has bare splat parameter (#8895) - types previous def when inside fun and forwards args types previous def when inside fun and forwards args - types previous def with named arguments, def has bare splat parameter (2) (#8895) types previous def with named arguments, def has bare splat parameter (2) (#8895) - types previous def with explicit arguments types previous def with explicit arguments - types previous def with restrictions types previous def with restrictions - types previous def with forwarded arguments, def has parameters types previous def with forwarded arguments, def has parameters -Code gen: c union - automatically converts numeric union type in field assignment automatically converts numeric union type in field assignment - codegens struct inside union codegens struct inside union - codegens union property setter 1 via pointer codegens union property setter 1 via pointer - moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) moves unions around correctly (#12550) - codegens union property default value codegens union property default value - codegens union property setter 2 codegens union property setter 2 - reads union instance var reads union instance var - builds union setter with fun type builds union setter with fun type - automatically converts by invoking to_unsafe automatically converts by invoking to_unsafe - does to_s does to_s does to_s does to_s does to_s does to_s does to_s does to_s does to_s does to_s - automatically converts numeric type in field assignment automatically converts numeric type in field assignment - fills union type to the max size fills union type to the max size - codegens union property setter 2 via pointer codegens union property setter 2 via pointer - codegens union property default value 2 codegens union property default value 2 - codegens union property setter 1 codegens union property setter 1 - codegens assign c union to union codegens assign c union to union - aligns to the member with biggest align requirements aligns to the member with biggest align requirements -Code gen: union type - codegens union type when obj is not union but arg is codegens union type when obj is not union but arg is - codegens union type when no obj and restrictions codegens union type when no obj and restrictions - provides T as a tuple literal provides T as a tuple literal - assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 - codegens union type when no obj codegens union type when no obj - codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s - codegens union type when obj union but arg is not codegens union type when obj union but arg is not - assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 - sorts restrictions when there are unions sorts restrictions when there are unions - codegens union type when obj is union and no args codegens union type when obj is union and no args - codegens union type for instance var codegens union type for instance var - codegens union type as return value codegens union type as return value - assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union - codegens if with same nested union codegens if with same nested union - codegens union type when obj is union and arg is union codegens union type when obj is union and arg is union - assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union - dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable - respects union payload alignment when upcasting Bool (#14898) respects union payload alignment when upcasting Bool (#14898) -Normalize: range literal - normalizes not exclusive normalizes not exclusive - normalizes exclusive normalizes exclusive -Semantic: instance var - instance variable inherited from multiple parents - with compatible type - module and class, with definitions module and class, with definitions - module and class, with declarations (3) module and class, with declarations (3) - accepts module and module, with declarations accepts module and module, with declarations - module and class, with declarations (2) module and class, with declarations (2) - module and class, with declarations module and class, with declarations - accepts module and module, with definitions accepts module and module, with definitions - with incompatible type - errors module and module, with definitions errors module and module, with definitions - module and class, with definitions module and class, with definitions - errors module and module, with declarations errors module and module, with declarations - module and class, with declarations module and class, with declarations - errors if adds instance variable to Object via guess errors if adds instance variable to Object via guess - types generic instance as virtual type if generic type has subclasses (#3805) types generic instance as virtual type if generic type has subclasses (#3805) - errors if not initializing super variables errors if not initializing super variables - infers type for generic class, with begin infers type for generic class, with begin - looks up self restriction in instantiated type, not defined type looks up self restriction in instantiated type, not defined type - infers from class method that invokes new infers from class method that invokes new - declares instance var of generic type declares instance var of generic type - can't infer type of generic method that returns self (#5383) can't infer type of generic method that returns self (#5383) - declares instance var of generic type, with union declares instance var of generic type, with union - infers type from custom array literal infers type from custom array literal - infers from class method that refers to constant infers from class method that refers to constant - declares as named tuple declares as named tuple - doesn't error if not initializes in all initialize because declared as nilable doesn't error if not initializes in all initialize because declared as nilable - is more permissive with macro def initialize, other initialize is more permissive with macro def initialize, other initialize - doesn't error when redeclaring subclass variable with the same type doesn't error when redeclaring subclass variable with the same type - infers type from custom hash literal in generic infers type from custom hash literal in generic - inferrs Proc(Void) to Proc(Nil) inferrs Proc(Void) to Proc(Nil) - infers from generic class method that has type annotation infers from generic class method that has type annotation - errors if declaring var in StaticArray(T, N) errors if declaring var in StaticArray(T, N) - infers from Pointer.malloc in generic type infers from Pointer.malloc in generic type - infers type from included module infers type from included module - errors if declaring var in Number errors if declaring var in Number - doesn't error if not initializing variables but calling super in parent parent doesn't error if not initializing variables but calling super in parent parent - doesn't error when using generic because guessed elsewhere doesn't error when using generic because guessed elsewhere - infers nilable instance var of generic type infers nilable instance var of generic type - doesn't infer type to be nilable if using self.class doesn't infer type to be nilable if using self.class - errors if declaring var in Enum errors if declaring var in Enum - declares instance var with initial value, with subclass declares instance var with initial value, with subclass - uses virtual types in self uses virtual types in self - declares instance var multiple times, last one wins declares instance var multiple times, last one wins - infers type for non-generic class, with assign infers type for non-generic class, with assign - declares instance var of generic type, with splat inside Proc declares instance var of generic type, with splat inside Proc - errors if declaring var in Object errors if declaring var in Object - infers type from begin infers type from begin - doesn't consider var as nilable if conditionally assigned inside initialize, but has initializer (#3669) doesn't consider var as nilable if conditionally assigned inside initialize, but has initializer (#3669) - infers from generic class method that has type annotation, without instantiating infers from generic class method that has type annotation, without instantiating - can declare type even if included module has a guessed var can declare type even if included module has a guessed var - guesses virtual hash type (1) (#5342) guesses virtual hash type (1) (#5342) - doesn't error if uses typeof(@var) doesn't error if uses typeof(@var) - declares instance var with union type with a virtual member declares instance var with union type with a virtual member - infers type from case infers type from case - instance variables initializers are used in class variables initialized objects (#3988) instance variables initializers are used in class variables initialized objects (#3988) - infers type from lib variable infers type from lib variable - is more permissive with macro def initialize, multiple is more permissive with macro def initialize, multiple - errors when typing an instance variable inside a method errors when typing an instance variable inside a method - guesses inside macro for guesses inside macro for - infers type to be nilable if self is used before assigning to a variable infers type to be nilable if self is used before assigning to a variable - declares with `self` declares with `self` - infers type from ! infers type from ! - doesn't error if declaring instance var and doesn't out to be nilable, in generic module type doesn't error if declaring instance var and doesn't out to be nilable, in generic module type - can type ivar from class inherited by generic class (#5281) can type ivar from class inherited by generic class (#5281) - infers from restriction using virtual type infers from restriction using virtual type - is more permissive with macro def initialize is more permissive with macro def initialize - infers type from lib fun call infers type from lib fun call - infers from another instance var in generic type with type declaration infers from another instance var in generic type with type declaration - doesn't error if not initializing variables but calling super for module doesn't error if not initializing variables but calling super for module - infers type from lib out (2) infers type from lib out (2) - infers type from hash literal from elements infers type from hash literal from elements - infers type from assign (2) infers type from assign (2) - infers from Pointer.malloc with two arguments in generic type infers from Pointer.malloc with two arguments in generic type - says can't infer (#2536) says can't infer (#2536) - uses T.new (#4291) uses T.new (#4291) - declares instance var of generic type through module declares instance var of generic type through module - declares instance var with self, on generic declares instance var with self, on generic - doesn't complain if declared type is recursive alias that's nilable doesn't complain if declared type is recursive alias that's nilable - infers from another instance var infers from another instance var - infers type from block argument infers type from block argument - doesn't infer from class method with multiple statements and return, on non-easy return doesn't infer from class method with multiple statements and return, on non-easy return - infers type from custom hash literal infers type from custom hash literal - errors when overriding inherited instance variable with incompatible type errors when overriding inherited instance variable with incompatible type - errors if declaring var in Float errors if declaring var in Float - infers type from as? infers type from as? - doesn't error when using Class but specifying type doesn't error when using Class but specifying type - errors if declaring instance var and turns out to be nilable errors if declaring instance var and turns out to be nilable - errors when assigning instance variable inside nested expression errors when assigning instance variable inside nested expression - guesses virtual array type (1) (#5342) guesses virtual array type (1) (#5342) - can't infer type from initializer in non-generic module can't infer type from initializer in non-generic module - errors if not initializing super variables (3) errors if not initializing super variables (3) - errors if declaring generic type without type vars errors if declaring generic type without type vars - doesn't crash on #3580 doesn't crash on #3580 - infers type from regex literal infers type from regex literal - doesn't error if not initializing variables but calling previous_def (#3210) doesn't error if not initializing variables but calling previous_def (#3210) - obeys super module initialize (#456) obeys super module initialize (#456) - doesn't infer unbound generic type on generic method called from generic's subclass doesn't infer unbound generic type on generic method called from generic's subclass - infers type from argument default value infers type from argument default value - guesses inside macro expression guesses inside macro expression - infers type from array literal with literals in generic type infers type from array literal with literals in generic type - doesn't find T in generic type that's not the current type (#4460) doesn't find T in generic type that's not the current type (#4460) - doesn't error if calling initialize from another initialize (1) doesn't error if calling initialize from another initialize (1) - infers from assign to local var in generic type (#2467) infers from assign to local var in generic type (#2467) - errors if declaring variable with number errors if declaring variable with number - infers type from instance_sizeof infers type from instance_sizeof - can type ivar from module included by generic class (#5281) can type ivar from module included by generic class (#5281) - infers type from && infers type from && - declares instance var of generic module (2) declares instance var of generic module (2) - doesn't crash on missing var on subclass, with superclass not specifying a type doesn't crash on missing var on subclass, with superclass not specifying a type - infers type from enum member infers type from enum member - doesn't if declaring nilable instance var and turns out to be nilable doesn't if declaring nilable instance var and turns out to be nilable - doesn't infer unbound generic type on generic method called from generic's subclass, metaclass context doesn't infer unbound generic type on generic method called from generic's subclass, metaclass context - infers type from named tuple literal infers type from named tuple literal - doesn't consider self.initialize as initializer (#3239) doesn't consider self.initialize as initializer (#3239) - declares instance var of generic type subclass declares instance var of generic type subclass - infers type from custom generic hash literal infers type from custom generic hash literal - declares instance var of generic type, with metaclass declares instance var of generic type, with metaclass - declares instance var of generic module declares instance var of generic module - infers type from hash literal with literals in generic type infers type from hash literal with literals in generic type - doesn't error if initializing var in superclass, and then empty initialize doesn't error if initializing var in superclass, and then empty initialize - guesses virtual hash type (2) (#5342) guesses virtual hash type (2) (#5342) - ignores super module initialize (#456) ignores super module initialize (#456) - doesn't error if initializes via super in macro def doesn't error if initializes via super in macro def - doesn't error when using generic in generic type because guessed elsewhere doesn't error when using generic in generic type because guessed elsewhere - declares instance var in module, inherits to type declares instance var in module, inherits to type - infers from Pointer.null in generic type infers from Pointer.null in generic type - doesn't combine union of Number and Number subclass (#5073) doesn't combine union of Number and Number subclass (#5073) - infers type from number literal infers type from number literal - infers from method in generic type, with type annotation infers from method in generic type, with type annotation - infers type from array literal with of infers type from array literal with of - infers type from new expression infers type from new expression - errors if declaring instance variable in module included in Object errors if declaring instance variable in module included in Object - infers type from bool literal infers type from bool literal - doesn't error if calling initialize from another initialize (2) doesn't error if calling initialize from another initialize (2) - infers from class method that has type annotation, in generic class infers from class method that has type annotation, in generic class - uses virtual types in union uses virtual types in union - considers var as assigned in multi-assign considers var as assigned in multi-assign - declares instance var of generic type, with proc declares instance var of generic type, with proc - infers type from two literals infers type from two literals - can guess the type from double-splat argument with double-splatted type variable can guess the type from double-splat argument with double-splatted type variable - infers type for generic class, with assign (2) infers type for generic class, with assign (2) - errors on undefined constant errors on undefined constant - can't infer type when using operation on const (#4054) can't infer type when using operation on const (#4054) - can't infer type from initializer in generic module type can't infer type from initializer in generic module type - errors if declaring var in Int errors if declaring var in Int - accepts overriding inherited instance variable with compatible type accepts overriding inherited instance variable with compatible type - errors if declaring var in Int32 errors if declaring var in Int32 - infers type from proc literal with return type infers type from proc literal with return type - guesses from array literal with of, with subclass guesses from array literal with of, with subclass - infers type for generic class, with && infers type for generic class, with && - says can't infer type if only nil was assigned says can't infer type if only nil was assigned - gives correct error when trying to use Int as an instance variable type gives correct error when trying to use Int as an instance variable type - infers type from literal outside def infers type from literal outside def - errors if not initialized in all initialize errors if not initialized in all initialize - infers from another instance var with type declaration infers from another instance var with type declaration - infers type from block argument without restriction infers type from block argument without restriction - doesn't crash on recursive method call doesn't crash on recursive method call - declares instance var with initial value declares instance var with initial value - solves instance var initializer in metaclass context (#5876) solves instance var initializer in metaclass context (#5876) - doesn't crash when inferring from new without matches (#2538) doesn't crash when inferring from new without matches (#2538) - infers type from offsetof infers type from offsetof - errors if declaring instance var and turns out to be nilable, in generic type errors if declaring instance var and turns out to be nilable, in generic type - errors when using Class in generic type errors when using Class in generic type - infers type from lib out (3) infers type from lib out (3) - is more permissive with macro def initialize, bug with named args is more permissive with macro def initialize, bug with named args - guesses virtual array type (2) (#5342) guesses virtual array type (2) (#5342) - transfers initializer from generic module to class transfers initializer from generic module to class - infers type for generic class, with lib call infers type for generic class, with lib call - infers type from path that is a constant infers type from path that is a constant - can't infer type from initializer can't infer type from initializer - says can't infer type if only nil was assigned, in generic type says can't infer type if only nil was assigned, in generic type - doesn't error if not calling super but initializing all variables doesn't error if not calling super but initializing all variables - errors with macro def but another def doesn't initialize all errors with macro def but another def doesn't initialize all - guesses from as.(typeof(...)) guesses from as.(typeof(...)) - uses virtual types in fun uses virtual types in fun - infers type from self as virtual type (#2575) infers type from self as virtual type (#2575) - doesn't infer type from redefined method doesn't infer type from redefined method - infers type from redefined method if calls previous_def infers type from redefined method if calls previous_def - declares instance var of generic class after reopen declares instance var of generic class after reopen - errors if declaring var in Union(*T) errors if declaring var in Union(*T) - infers type in multi assign infers type in multi assign - infer from class method with multiple statements and return infer from class method with multiple statements and return - doesn't infer type to be nilable if using self.class in call in assign doesn't infer type to be nilable if using self.class in call in assign - infers from assign to local var (#2467) infers from assign to local var (#2467) - errors on undefined instance var and subclass calling super errors on undefined instance var and subclass calling super - infers from new with return type infers from new with return type - doesn't complain in second part of #2575 doesn't complain in second part of #2575 - infers type from included module recursively infers type from included module recursively - declares instance var of generic type, with splat declares instance var of generic type, with splat - declares instance var of generic type, with splat inside Tuple declares instance var of generic type, with splat inside Tuple - infers type for generic module infers type for generic module - errors if unknown ivar through macro (#4050) errors if unknown ivar through macro (#4050) - declares instance var of generic type, with generic type declares instance var of generic type, with generic type - allow usage of instance variable initializer from instance variable initializer allow usage of instance variable initializer from instance variable initializer - infers type from hash literal in generic type infers type from hash literal in generic type - infers type from symbol literal infers type from symbol literal - infers type from hash literal with of infers type from hash literal with of - errors if declaring var in Tuple(*T) errors if declaring var in Tuple(*T) - doesn't infer unbound generic type on non-generic call (#6390) doesn't infer unbound generic type on non-generic call (#6390) - infers type from custom array literal in generic infers type from custom array literal in generic - says undefined instance variable on read says undefined instance variable on read - infers type from responds_to? infers type from responds_to? - doesn't error if not initializing variables but calling previous_def (2) (#3210) doesn't error if not initializing variables but calling previous_def (2) (#3210) - infers type for generic class, with T.new and literal infers type for generic class, with T.new and literal - doesn't solve instance var initializer in instance context (3) (#5876) doesn't solve instance var initializer in instance context (3) (#5876) - infers type from range literal infers type from range literal - infers type from ||= infers type from ||= - infers type to be nilable if not initialized infers type to be nilable if not initialized - errors when assigning instance variable at top level control block errors when assigning instance variable at top level control block - infers type from unless infers type from unless - declares instance var of generic type, with static array declares instance var of generic type, with static array - doesn't consider instance var as nilable if assigned before self access (#4981) doesn't consider instance var as nilable if assigned before self access (#4981) - infers type from array literal with of metaclass infers type from array literal with of metaclass - infers type from included module, outside def infers type from included module, outside def - doesn't error if not initializing variables but calling super for generic module doesn't error if not initializing variables but calling super for generic module - infers from class method that has type annotation, with overload infers from class method that has type annotation, with overload - errors if not initializing super variables (2) errors if not initializing super variables (2) - infers type from literal outside def with initialize and type restriction infers type from literal outside def with initialize and type restriction - infers type from as infers type from as - infers type for generic class, with assign (1) infers type for generic class, with assign (1) - doesn't error if not initialized in macro def but outside it doesn't error if not initialized in macro def but outside it - infers type from sizeof infers type from sizeof - infers from new with return type returning generic infers from new with return type returning generic - infers nilable instance var of generic module infers nilable instance var of generic module - guesses from as.(typeof(...)) in generic type guesses from as.(typeof(...)) in generic type - infers from method on integer literal, with type annotation infers from method on integer literal, with type annotation - infers type from all call matches infers type from all call matches - errors if declaring var in Pointer(T) errors if declaring var in Pointer(T) - guesses virtual array type (3) (#5342) guesses virtual array type (3) (#5342) - guesses from new on abstract class guesses from new on abstract class - infers type from uninitialized infers type from uninitialized - infers in multiple assign for tuple type (1) infers in multiple assign for tuple type (1) - infers type from string literal infers type from string literal - guesses from hash literal with of, with subclass guesses from hash literal with of, with subclass - errors if declaring var in Value errors if declaring var in Value - guesses from splat (#3149) guesses from splat (#3149) - guesses virtual array type (3) (#5342) guesses virtual array type (3) (#5342) - errors if declaring var in Proc(*T, R) errors if declaring var in Proc(*T, R) - infers type to be nilable if self is used in same assign infers type to be nilable if self is used in same assign - cannot guess the type from splat argument with not splatted type cannot guess the type from splat argument with not splatted type - infers type from || infers type from || - infers from Pointer.null infers from Pointer.null - infers type by removing nil from || left side infers type by removing nil from || left side - infers type for generic class, with literal infers type for generic class, with literal - infers type from lib out (1) infers type from lib out (1) - doesn't error if not initializing nilable var in subclass doesn't error if not initializing nilable var in subclass - infers type for generic class, with T.new infers type for generic class, with T.new - errors if adds instance variable to Object via guess via included module errors if adds instance variable to Object via guess via included module - doesn't solve instance var initializer in instance context (2) (#5876) doesn't solve instance var initializer in instance context (2) (#5876) - infers type from regex literal with interpolation infers type from regex literal with interpolation - infers type from char literal infers type from char literal - doesn't solve instance var initializer in instance context (1) (#5876) doesn't solve instance var initializer in instance context (1) (#5876) - can't infer type from initializer in generic class type can't infer type from initializer in generic class type - declares instance var of generic type, with no type parameter declares instance var of generic type, with no type parameter - doesn't duplicate instance var in subclass doesn't duplicate instance var in subclass - cannot guess the type from double-splat argument with not double-splatted type cannot guess the type from double-splat argument with not double-splatted type - guesses from splat (2) (#3149) guesses from splat (2) (#3149) - infers type for generic class, with if infers type for generic class, with if - declares instance var of generic class declares instance var of generic class - doesn't infer generic type without type argument inside generic doesn't infer generic type without type argument inside generic - declares instance var of generic type, with virtual metaclass declares instance var of generic type, with virtual metaclass - doesn't infer from class method with multiple statements and return, on non-easy return (2) doesn't infer from class method with multiple statements and return, on non-easy return (2) - doesn't error if inheriting generic instance (#3635) doesn't error if inheriting generic instance (#3635) - allows nil instance var because it's a generic type allows nil instance var because it's a generic type - errors when redeclaring subclass variable with a different type errors when redeclaring subclass variable with a different type - infers from new with return type in generic type infers from new with return type in generic type - errors if not initializing super variable in generic errors if not initializing super variable in generic - declares instance var which appears in initialize declares instance var which appears in initialize - errors if declaring var in NamedTuple(T) errors if declaring var in NamedTuple(T) - infers from Pointer.malloc infers from Pointer.malloc - guesses inside macro if guesses inside macro if - declares instance var in module, inherits to type recursively declares instance var in module, inherits to type recursively - doesn't check call of non-self instance (#4830) doesn't check call of non-self instance (#4830) - errors if can't find lib call, before erroring on instance var (#2579) errors if can't find lib call, before erroring on instance var (#2579) - errors when using Class (#2605) errors when using Class (#2605) - doesn't infer for subclass if assigns another type (1) doesn't infer for subclass if assigns another type (1) - infers from class method that has number literal infers from class method that has number literal - errors if declaring var in Class errors if declaring var in Class - infers type from tuple literal infers type from tuple literal - shouldn't error when accessing instance var in initialized that's always initialized (#2953) shouldn't error when accessing instance var in initialized that's always initialized (#2953) - infers type from if infers type from if - errors if declaring instance var and turns out to be nilable, in generic module type errors if declaring instance var and turns out to be nilable, in generic module type - infers type from custom generic array literal infers type from custom generic array literal - cannot guess type from argument assigned in body cannot guess type from argument assigned in body - infers type from assign (1) infers type from assign (1) - infers type from ||= inside another assignment infers type from ||= inside another assignment - infers type from string interpolation infers type from string interpolation - errors if declaring var in Reference errors if declaring var in Reference - infers type for generic class, with case infers type for generic class, with case - can guess the type from splat argument with splatted type can guess the type from splat argument with splatted type - infers from Pointer.malloc with two arguments infers from Pointer.malloc with two arguments - doesn't complain if not initialized in one initialize, but has initializer (#2465) doesn't complain if not initialized in one initialize, but has initializer (#2465) - errors when assigning instance variable at top level block errors when assigning instance variable at top level block - infers type from array literal from its literals infers type from array literal from its literals - infers type from argument restriction infers type from argument restriction - infers type from argument with restriction, in generic infers type from argument with restriction, in generic - declares instance var of generic type, with tuple declares instance var of generic type, with tuple - looks up return type restriction in defining type, not instantiated type (#11961) looks up return type restriction in defining type, not instantiated type (#11961) - errors if declaring instance var and turns out to be nilable, in generic module type in generic type errors if declaring instance var and turns out to be nilable, in generic module type in generic type - can guess the type from double-splat argument with double-splatted type can guess the type from double-splat argument with double-splatted type - infers type to be non-nilable if initialized in all initialize infers type to be non-nilable if initialized in all initialize - infers type from path that is a type infers type from path that is a type - infers from class method that has type annotation infers from class method that has type annotation - infers from class method that has type annotation, with multiple overloads matching, all with the same type infers from class method that has type annotation, with multiple overloads matching, all with the same type - declares instance var of generic module from non-generic module declares instance var of generic module from non-generic module - can guess the type from splat argument with splatted type variable can guess the type from splat argument with splatted type variable - doesn't infer for subclass if assigns another type (2) doesn't infer for subclass if assigns another type (2) - says undefined instance variable on assign says undefined instance variable on assign - doesn't error if not initializing variables but calling super doesn't error if not initializing variables but calling super - infer from class method where new is redefined infer from class method where new is redefined - ignores redefined initialize (#456) ignores redefined initialize (#456) - infers type from array literal in generic type infers type from array literal in generic type - infers from another instance var in generic type infers from another instance var in generic type - errors if finally not initialized in macro def errors if finally not initialized in macro def - infers type from is_a? infers type from is_a? - infers type from self (#2575) infers type from self (#2575) - declares instance var declares instance var - doesn't error if not initializing variables but calling super and previous_def doesn't error if not initializing variables but calling super and previous_def - transfers initializer from module to generic class transfers initializer from module to generic class +Code gen: op assign + evaluates exps once, [] (#3398) evaluates exps once, [] (#3398) + evaluates exps once (#3398) evaluates exps once (#3398) +Code gen: automatic cast + casts integer variable to larger type (#9565) casts integer variable to larger type (#9565) + casts literal integer (Int64 -> Int32, ok) casts literal integer (Int64 -> Int32, ok) + casts literal float (Float32 -> Float64) casts literal float (Float32 -> Float64) + casts Symbol to Enum in ivar assignment casts Symbol to Enum in ivar assignment + casts Int32 to Int64 in cvar assignment casts Int32 to Int64 in cvar assignment + doesn't autocast number on union (#8655) doesn't autocast number on union (#8655) + casts Int32 to Int64 in lvar assignment casts Int32 to Int64 in lvar assignment + casts Int32 to Int64 in ivar type declaration in generic casts Int32 to Int64 in ivar type declaration in generic + casts literal integer (Int32 -> Int64) casts literal integer (Int32 -> Int64) + casts literal integer (Int32 -> Float32) casts literal integer (Int32 -> Float32) + does multidispatch with automatic casting (1) (#8217) does multidispatch with automatic casting (1) (#8217) + casts symbol literal to enum casts symbol literal to enum + casts literal integer (Int32 -> Float64) casts literal integer (Int32 -> Float64) + casts literal float (Float64 -> Float32) casts literal float (Float64 -> Float32) + casts Int32 -> Int64 in arg restriction casts Int32 -> Int64 in arg restriction + does multidispatch with automatic casting (3) does multidispatch with automatic casting (3) + casts Int32 to Int64 in ivar type declaration casts Int32 to Int64 in ivar type declaration + casts Int32 to Int64 in cvar type declaration casts Int32 to Int64 in cvar type declaration + does multidispatch with automatic casting (2) (#8217) does multidispatch with automatic casting (2) (#8217) + casts Int32 to Int64 in ivar assignment casts Int32 to Int64 in ivar assignment + casts Symbol to Enum in ivar type declaration casts Symbol to Enum in ivar type declaration +Crystal::Repl::Interpreter + tuple + interprets tuple range indexer interprets tuple range indexer + interprets tuple range indexer (2) interprets tuple range indexer (2) + interprets tuple self interprets tuple self + interprets tuple literal of different types (2) interprets tuple literal of different types (2) + does tuple indexer on union does tuple indexer on union + interprets tuple literal and access by known index interprets tuple literal and access by known index + extends sign when doing to_i32 extends sign when doing to_i32 + interprets tuple literal of different types (1) interprets tuple literal of different types (1) + interprets tuple metaclass indexer interprets tuple metaclass indexer + discards tuple (#12383) discards tuple (#12383) + unpacks tuple in block arguments unpacks tuple in block arguments + interprets tuple metaclass range indexer interprets tuple metaclass range indexer + discards tuple access discards tuple access +Crystal::Doc::MarkdDocRenderer + renders code spans + renders "`