Diff of the two buildlogs: -- --- b1/build.log 2025-01-23 21:53:54.748167344 +0000 +++ b2/build.log 2025-01-23 23:21:57.558815849 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Wed Jan 22 23:21:28 -12 2025 -I: pbuilder-time-stamp: 1737631288 +I: Current time: Thu Feb 26 18:16:57 +14 2026 +I: pbuilder-time-stamp: 1772079417 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -26,52 +26,84 @@ 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/3244927/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/1483501/tmp/hooks/D01_modify_environment starting +debug: Running on ionos15-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 Feb 26 04:17 /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/1483501/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/1483501/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' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=20 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='amd64' + 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=42 ' + 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='f9c6dc1437254dc996df504d49b58579' - 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='3244927' - PS1='# ' - PS2='> ' + INVOCATION_ID=86986baeff1f4355a358e1ee34a8abcb + 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=1483501 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.I8nhg9Qv/pbuilderrc_BtqX --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.I8nhg9Qv/b1 --logfile b1/build.log crystal_1.14.0+dfsg-1.dsc' - SUDO_GID='110' - SUDO_UID='105' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://46.16.76.132:3128' + 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.I8nhg9Qv/pbuilderrc_rHYH --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.I8nhg9Qv/b2 --logfile b2/build.log crystal_1.14.0+dfsg-1.dsc' + SUDO_GID=111 + SUDO_UID=106 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://213.165.73.152:3128 I: uname -a - Linux ionos1-amd64 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.12.9+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.9-1~bpo12+1 (2025-01-19) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/3244927/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Nov 22 2024 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/1483501/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -259,7 +291,7 @@ Get: 118 http://deb.debian.org/debian trixie/main amd64 llvm-19-tools amd64 1:19.1.6-1+b1 [511 kB] Get: 119 http://deb.debian.org/debian trixie/main amd64 llvm-19-dev amd64 1:19.1.6-1+b1 [43.3 MB] Get: 120 http://deb.debian.org/debian trixie/main amd64 zlib1g-dev amd64 1:1.3.dfsg+really1.3.1-1+b1 [920 kB] -Fetched 181 MB in 4s (44.0 MB/s) +Fetched 181 MB in 6s (29.2 MB/s) Preconfiguring packages ... Selecting previously unselected package libpython3.12-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 ... 19856 files and directories currently installed.) @@ -660,8 +692,8 @@ Setting up tzdata (2024b-6) ... Current default time zone: 'Etc/UTC' -Local time is now: Thu Jan 23 11:22:43 UTC 2025. -Universal Time is now: Thu Jan 23 11:22:43 UTC 2025. +Local time is now: Thu Feb 26 04:17:35 UTC 2026. +Universal Time is now: Thu Feb 26 04:17:35 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up liberror-perl (0.17029-2) ... @@ -768,7 +800,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/1483501/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/1483501/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 @@ -778,7 +814,7 @@ debian/rules clean dh clean dh_auto_clean - make -j20 clean + make -j42 clean make[1]: Entering directory '/build/reproducible-path/crystal-1.14.0+dfsg' rm -rf .build rm -rf ./docs @@ -797,19 +833,19 @@ dh_auto_configure debian/rules override_dh_auto_build make[1]: Entering directory '/build/reproducible-path/crystal-1.14.0+dfsg' -dh_auto_build -- release=1 verbose=1 progress=1 threads=20 CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal/lib" CRYSTAL_CACHE_DIR="/tmp/crystal" interpreter=1 - make -j20 "INSTALL=install --strip-program=true" release=1 verbose=1 progress=1 threads=20 CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib CRYSTAL_CACHE_DIR=/tmp/crystal interpreter=1 +dh_auto_build -- release=1 verbose=1 progress=1 threads=42 CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal/lib" CRYSTAL_CACHE_DIR="/tmp/crystal" interpreter=1 + make -j42 "INSTALL=install --strip-program=true" release=1 verbose=1 progress=1 threads=42 CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib CRYSTAL_CACHE_DIR=/tmp/crystal interpreter=1 make[2]: Entering directory '/build/reproducible-path/crystal-1.14.0+dfsg' Using /usr/bin/llvm-config-19 [version=19.1.6] -CRYSTAL_CONFIG_BUILD_COMMIT="" CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib SOURCE_DATE_EPOCH="1734712509" CRYSTAL_CONFIG_LIBRARY_PATH='$ORIGIN/../lib/crystal' ./bin/crystal build -D strict_multi_assign -D preview_overload_order --release --progress --threads 20 --link-flags="-Wl,-z,relro" -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2 +CRYSTAL_CONFIG_BUILD_COMMIT="" CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib SOURCE_DATE_EPOCH="1734712509" CRYSTAL_CONFIG_LIBRARY_PATH='$ORIGIN/../lib/crystal' ./bin/crystal build -D strict_multi_assign -D preview_overload_order --release --progress --threads 42 --link-flags="-Wl,-z,relro" -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2 [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) make[2]: Leaving directory '/build/reproducible-path/crystal-1.14.0+dfsg' make[1]: Leaving directory '/build/reproducible-path/crystal-1.14.0+dfsg' debian/rules override_dh_auto_test make[1]: Entering directory '/build/reproducible-path/crystal-1.14.0+dfsg' -make release=1 verbose=1 progress=1 threads=20 CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal/lib" CRYSTAL_CACHE_DIR="/tmp/crystal" interpreter=1 compiler_spec +make release=1 verbose=1 progress=1 threads=42 CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal/lib" CRYSTAL_CACHE_DIR="/tmp/crystal" interpreter=1 compiler_spec make[2]: Entering directory '/build/reproducible-path/crystal-1.14.0+dfsg' Using /usr/bin/llvm-config-19 [version=19.1.6] -CRYSTAL_CONFIG_BUILD_COMMIT="" CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib SOURCE_DATE_EPOCH="1734712509" ./bin/crystal build -D strict_multi_assign -D preview_overload_order --release --progress --threads 20 --link-flags="-Wl,-z,relro" --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives -o .build/compiler_spec spec/compiler_spec.cr --release +CRYSTAL_CONFIG_BUILD_COMMIT="" CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib SOURCE_DATE_EPOCH="1734712509" ./bin/crystal build -D strict_multi_assign -D preview_overload_order --release --progress --threads 42 --link-flags="-Wl,-z,relro" --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives -o .build/compiler_spec spec/compiler_spec.cr --release Using compiled compiler at .build/crystal In lib/markd/src/markd/renderers/html_renderer.cr:238:7 @@ -818,7 +854,7 @@ Warning: expanding macro -There was a problem expanding macro 'macro_140464273056416' +There was a problem expanding macro 'macro_140356608985504' Called macro defined in lib/markd/src/markd/renderers/html_renderer.cr:238:7 @@ -834,6051 +870,4689 @@ 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: 73648 +Randomized with seed: 9588 +Semantic: not + types not as NoReturn if exp is NoReturn types not as NoReturn if exp is NoReturn + doesn't restrict and doesn't restrict and + filters types inside if/else filters types inside if/else + filters types inside if filters types inside if + filters types with !is_a? filters types with !is_a? + doesn't restrict and in while (#4243) doesn't restrict and in while (#4243) + types not types not +Code gen: union type + sorts restrictions when there are unions sorts restrictions when there are unions + 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 if with same nested union codegens if with same nested 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 assigns union to larger 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 + 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 union type when obj is not union but arg is codegens union type when obj is not union but arg is + 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 + 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 type as return value codegens union type as return value + 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 union but arg is not codegens union type when obj union but arg is not + provides T as a tuple literal provides T as a tuple literal + codegens union type when obj is union and no args codegens union type when obj is union and no args + codegens union type when obj is union and arg is union codegens union type when obj is union and arg is union + codegens union type for instance var codegens union type for instance var +Code gen: experimental + errors if too many arguments errors if too many arguments + errors if missing link arguments errors if missing link arguments + compiles with no argument compiles with no argument + errors if invalid argument type errors if invalid argument type + compiles with single string argument compiles with single string argument +Lexer comments + lexes with comments enabled (2) lexes with comments enabled (2) + lexes without comments enabled lexes without comments enabled + lexes with comments enabled lexes with comments enabled + lexes correct number of spaces lexes correct number of spaces +Crystal::Repl::Interpreter + tuple + interprets tuple range indexer (2) interprets tuple range indexer (2) + 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 + interprets tuple literal of different types (2) interprets tuple literal of different types (2) + interprets tuple literal of different types (1) interprets tuple literal of different types (1) + interprets tuple metaclass indexer interprets tuple metaclass indexer + interprets tuple range indexer interprets tuple range indexer + discards tuple access discards tuple access + extends sign when doing to_i32 extends sign when doing to_i32 + interprets tuple self interprets tuple self + interprets tuple literal and access by known index interprets tuple literal and access by known index + does tuple indexer on union does tuple indexer on union +Code gen: var + codegens bug with var, while, if, break and ssa codegens bug with var, while, if, break and ssa + codegens ivar assignment when not-nil type filter applies codegens ivar assignment when not-nil type filter applies + works with typeof with assignment (#828) works with typeof with assignment (#828) + assigns to underscore assigns to underscore + codegens bug with union of int, nil and string (1): assigning nil to union must fill all zeros codegens bug with union of int, nil and string (1): assigning nil to union must fill all zeros + codegens assignment that can never be reached codegens assignment that can never be reached + codegens var codegens var + codegens var with type declaration codegens var with type declaration + codegens bug with instance vars and ssa codegens bug with instance vars and ssa + codegens bug with union of int, nil and string (2): assigning nil to union must fill all zeros codegens bug with union of int, nil and string (2): assigning nil to union must fill all zeros +Crystal::Playground::Session + assert assert +Semantic: yield with 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 it invokes global method inside block of yield scope + uses instance variable of enclosing scope uses instance variable 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 + uses method of enclosing scope uses method of enclosing scope + yields with dispatch (#2171) (1) yields with dispatch (#2171) (1) + 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 + yields virtual type (#2171) (2) yields virtual type (#2171) (2) + 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 + 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 +Semantic: concrete_types + VirtualType with concrete base VirtualType with concrete base + VirtualMetaclassType with abstract base VirtualMetaclassType with abstract base + VirtualMetaclassType with concrete base VirtualMetaclassType with concrete base + VirtualType with abstract base VirtualType with abstract base + GenericModuleInstanceType GenericModuleInstanceType + UnionType of structs UnionType of structs + ModuleType ModuleType +Semantic: sizeof + types alignof types alignof + 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_alignof types instance_alignof + types sizeof types sizeof + types instance_sizeof types instance_sizeof + gives error if using instance_sizeof on a module gives error if using instance_sizeof on a module + gives error if using instance_sizeof on a metaclass gives error if using instance_sizeof on a metaclass + errors on sizeof uninstantiated generic type (#6415) errors on sizeof uninstantiated generic type (#6415) + types sizeof NoReturn (missing type) (#5717) types sizeof NoReturn (missing type) (#5717) + gives error if using instance_sizeof on a struct gives error if using instance_sizeof on a struct + gives error if using instance_sizeof on an abstract struct (#11855) gives error if using instance_sizeof on an abstract struct (#11855) + types instance_alignof NoReturn (missing type) (#5717) types instance_alignof NoReturn (missing type) (#5717) + 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 union type (#8349) gives error if using instance_sizeof on a union type (#8349) + 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 + types alignof NoReturn (missing type) (#5717) types alignof NoReturn (missing type) (#5717) + types instance_sizeof NoReturn (missing type) (#5717) types instance_sizeof NoReturn (missing type) (#5717) +Semantic: ReferenceStorage + errors if T is a nilable type errors if T is a nilable type + errors if T is a struct type errors if T is a struct type + allows a different name allows a different name + errors if T is a union type errors if T is a union type + errors if T is a value type errors if T is a value type +Normalize: until + normalizes until normalizes until +Semantic: new + evaluates initialize default value at the instance scope (5) (#731) evaluates initialize default value at the instance scope (5) (#731) + 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) + inherits initialize and new methods if doesn't define new (#3238) inherits initialize and new methods if doesn't define new (#3238) + evaluates initialize default value at the instance scope (4) (#731) evaluates initialize default value at the instance scope (4) (#731) + evaluates initialize default value at the instance scope (2) (#731) evaluates initialize default value at the instance scope (2) (#731) + doesn't have default new for inherited class from generic type doesn't have default new for inherited class from generic type + errors if using self call in default argument (1) errors if using self call in default argument (1) + errors if using self call in default argument (2) errors if using self call in default argument (2) + evaluates initialize default value at the instance scope (6) (#731) evaluates initialize default value at the instance scope (6) (#731) + uses correct receiver for `initialize` in namespaced generic classes (#4086) uses correct receiver for `initialize` in namespaced generic classes (#4086) + doesn't incorrectly redefines new for generic class doesn't incorrectly redefines new for generic class + errors if using self call in default argument (3) errors if using self call in default argument (3) +expand + expands macro expression inside def of module expands macro expression inside def of module + expands macro expression inside class expands macro expression inside class + expands macro of module with cursor at module name expands macro of module with cursor at module name + expands macro expression inside enum expands macro expression inside enum + doesn't expand macro expression doesn't expand macro expression + expands macro of module inside module expands macro of module inside module + expands macro expression inside def of private class expands macro expression inside def of private class + expands macro of module expands macro of module + expands macro expression inside fun expands macro expression inside fun + expands macro expression inside C union of private lib expands macro expression inside C union of private lib + expands macro expression {{ ... }} expands macro expression {{ ... }} + expands macro expression inside def of private module expands macro expression inside def of private module + expands macro control {% for %} with indent expands macro control {% for %} with indent + expands macro expression inside lib expands macro expression inside lib + doesn't expand normal call doesn't expand normal call + doesn't expand macro expression with cursor out of end doesn't expand macro expression with cursor out of end + expands macro with doc expands macro with doc + expands macro control {% for %} expands macro control {% for %} + expands macro expression inside private def expands macro expression inside private def + expands macro expression inside private module expands macro expression inside private module + expands macro expression inside def of private struct expands macro expression inside def of private struct + doesn't expand macro expression doesn't expand macro expression + expands macro expression {% ... %} with cursor at end of it expands macro expression {% ... %} with cursor at end of it + expands macro control {% if %} with indent expands macro control {% if %} with indent + expands macro control {% if %} with cursor inside it expands macro control {% if %} with cursor inside it + expands macro expression {% ... %} expands macro expression {% ... %} + expands macro expression inside module expands macro expression inside module + expands macros with 2 level expands macros with 2 level + expands macro expression inside private struct expands macro expression inside private struct + expands macro expression {{ ... }} with cursor inside it expands macro expression {{ ... }} with cursor inside it + expands macro expression inside private lib expands macro expression inside private lib + expands macro expression inside def of private module expands macro expression inside def of private module + expands macro of module with cursor at dot expands macro of module with cursor at dot + expands simple macro expands simple macro + expands macro expression inside C union expands macro expression inside C union + expands simple macro with cursor at end of it expands simple macro with cursor at end of it + expands macro expression inside private enum expands macro expression inside private enum + expands macro expression inside def of private enum expands macro expression inside def of private enum + expands macro control {% if %} with cursor at end of it expands macro control {% if %} with cursor at end of it + expands macros with 3 level expands macros with 3 level + expands macro expression inside def of nested module expands macro expression inside def of nested module + expands macro control {% if %} expands macro control {% if %} + expands macro expression {{ ... }} with cursor end of it expands macro expression {{ ... }} with cursor end of it + expands macro control {% for %} with cursor at end of it expands macro control {% for %} with cursor at end of it + expands macro expression inside struct expands macro expression inside struct + expands macro expression inside C struct of private lib expands macro expression inside C struct of private lib + expands macro expression inside C struct expands macro expression inside C struct + expands simple macro with cursor inside it expands simple macro with cursor inside it + expands macro expression inside def of nested private module expands macro expression inside def of nested private module + expands macro expression inside def expands macro expression inside def + expands macro control {% for %} with cursor inside it expands macro control {% for %} with cursor inside it + expands complex macro expands complex macro + expands macro expression inside private class expands macro expression inside private class +Semantic: warnings + deprecated annotations + detects deprecated namespaced annotations detects deprecated namespaced annotations + detects deprecated annotations detects deprecated annotations + exposes syntax warnings exposes syntax warnings + deprecated methods + detects deprecated initialize with named arguments detects deprecated initialize with named arguments + detects deprecated generic class methods detects deprecated generic class methods + detects deprecated instance methods detects deprecated instance methods + informs warnings once per call site location (a) informs warnings once per call site location (a) + detects deprecated generic instance methods detects deprecated generic instance methods + detects deprecated initialize detects deprecated initialize + detects top-level deprecated methods detects top-level deprecated methods + informs warnings once per target type informs warnings once per target type + errors if invalid argument type errors if invalid argument type + detects deprecated module methods detects deprecated module methods + informs warnings once per call site location (b) informs warnings once per call site location (b) + ignores nested calls to deprecated methods ignores nested calls to deprecated methods + errors if too many arguments errors if too many arguments + detects deprecated methods with named arguments detects deprecated methods with named arguments + errors if invalid named arguments errors if invalid named arguments + ignore deprecation excluded locations ignore deprecation excluded locations + deprecation reason is optional deprecation reason is optional + informs warnings once per yield informs warnings once per yield + detects deprecated class methods detects deprecated class methods + deprecated constants + detects deprecated constants detects deprecated constants + detects deprecated constants inside macros detects deprecated constants inside macros + detects deprecated constants in type declarations (2) detects deprecated constants in type declarations (2) + detects deprecated constants in type declarations (3) detects deprecated constants in type declarations (3) + detects deprecated constants in type declarations (1) detects deprecated constants in type declarations (1) + deprecated macros + errors if invalid named argument errors if invalid named argument + ignore deprecation excluded locations ignore deprecation excluded locations + errors if invalid argument type errors if invalid argument type + detects top-level deprecated macros detects top-level deprecated macros + errors if too many arguments errors if too many arguments + detects deprecated class macros detects deprecated class macros + detects deprecated generic class macros detects deprecated generic class macros + informs warnings once per call site location (b) informs warnings once per call site location (b) + detects deprecated macros with named arguments detects deprecated macros with named arguments + detects deprecated module macros detects deprecated module macros + informs warnings once per call site location (a) informs warnings once per call site location (a) + deprecation reason is optional deprecation reason is optional + abstract def positional parameter name mismatch + respects external names of positional parameters (2) respects external names of positional parameters (2) + detects mismatch with single parameter detects mismatch with single parameter + doesn't warn if current type is a module (#12266) doesn't warn if current type is a module (#12266) + informs warnings once per matching overload (1) informs warnings once per matching overload (1) + doesn't warn if current type is abstract (#12266) doesn't warn if current type is abstract (#12266) + detects multiple mismatches detects multiple mismatches + doesn't compare positional parameters to single splat doesn't compare positional parameters to single splat + continues warning if implementation with matching parameters is not found (#12150) + double splat double splat + not a full implementation not a full implementation + single splat single splat + respects external names of positional parameters (1) respects external names of positional parameters (1) + doesn't warn if external parameter name matches (1) doesn't warn if external parameter name matches (1) + detects mismatch within many parameters detects mismatch within many parameters + stops warning after implementation with matching parameters is found (#12150) + exact match exact match + contravariant restrictions contravariant restrictions + reordered named parameters reordered named parameters + different single splats different single splats + informs warnings once per matching overload (2) informs warnings once per matching overload (2) + doesn't warn if external parameter name matches (2) doesn't warn if external parameter name matches (2) + doesn't compare single splats doesn't compare single splats + exposes syntax warnings after macro interpolation exposes syntax warnings after macro interpolation Semantic: static array - 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) - doesn't crash on instance_sizeof (#8858) doesn't crash on instance_sizeof (#8858) - types static array with var declaration types static array with var declaration + doesn't crash on sizeof (#8858) doesn't crash on sizeof (#8858) + types static array new with size being a constant types static array new with size being a constant + 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) can match N type argument of static array (#1203) can match N type argument of static array (#1203) + types static array with type as size types static array with type as size errors on negative static array size errors on negative static array size + 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) types static array new types static array new doesn't match other number type argument of static array (#1203) doesn't match other number type argument of static array (#1203) - can match number type argument of static array (#1203) can match number type argument of static array (#1203) - doesn't crash on offsetof (#8858) doesn't crash on offsetof (#8858) - types static array new with size being a constant types static array new with size being a constant - types static array with type as size types static array with type as size - doesn't crash on restriction (#584) doesn't crash on restriction (#584) - types static array new with size being a computed constant types static array new with size being a computed constant - 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 crash on sizeof (#8858) doesn't crash on 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 -Semantic: named tuples - matches in type restriction matches in type restriction - can assign to union of compatible named tuple can assign to union of compatible named tuple - types named tuple access (1) types named tuple access (1) - gives error when using positional args with NamedTuple gives error when using positional args with NamedTuple - doesn't match in type restriction doesn't match in type restriction - types nilable named tuple access (6) types nilable named tuple access (6) - gets type at compile time gets type at compile time - types nilable named tuple access (1) types nilable named tuple access (1) - doesn't unify named tuple metaclasses (#5384) doesn't unify named tuple metaclasses (#5384) - merges two named tuple with same keys but different types merges two named tuple with same keys but different types - types named tuple access (2) types named tuple access (2) - types nilable named tuple access (5) types nilable named tuple access (5) - gives error when indexing with an unknown name gives error when indexing with an unknown name - types named tuple access (3) types named tuple access (3) - doesn't match type restriction with instance doesn't match type restriction with instance - types nilable named tuple access (4) types nilable named tuple access (4) - types nilable named tuple access (3) types nilable named tuple access (3) - 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 of one element types named tuple of one element - merges two named tuples with the same keys and types merges two named tuples with the same keys and types - matches in type restriction and gets free var matches in type restriction and gets free var - 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) - doesn't crash on named tuple type recursion (#7162) doesn't crash on named tuple type recursion (#7162) - matches in type restriction, different order (1) matches in type restriction, different order (1) - allows tuple covariance allows tuple covariance - accepts named tuple covariance in array accepts named tuple covariance in array - can write generic type for NamedTuple can write generic type for NamedTuple - types named tuple of two elements types named tuple of two elements - types T as a tuple of metaclasses types T as a tuple of metaclasses - doesn't error if NamedTuple has no args doesn't error if NamedTuple has no args - matches in type restriction, different order (2) matches in type restriction, different order (2) - accept named tuple in type restriction accept named tuple in type restriction - types nilable named tuple access (2) types nilable named tuple access (2) - types named tuple of two elements, follows names order types named tuple of two elements, follows names order -Semantic: nilable instance var - says self was used before instance var was initialized says self was used before instance var was initialized - says self was used before instance var was initialized (2) says self was used before instance var was initialized (2) - finds type that doesn't initialize instance var (#1222) finds type that doesn't initialize instance var (#1222) - says instance var was not initialized in all of the initialize methods says instance var was not initialized in all of the initialize methods - doesn't consider as nil if initialized with catch-all doesn't consider as nil if initialized with catch-all - marks instance var as nilable if assigned inside captured block (#1696) marks instance var as nilable if assigned inside captured block (#1696) - says self was used before instance var was initialized (3) says self was used before instance var was initialized (3) - says instance var was used before initialized says instance var was used before initialized - marks instance var as nilable if assigned inside proc literal marks instance var as nilable if assigned inside proc literal - says instance var was used before initialized (2) says instance var was used before initialized (2) - says instance var was not initialized in all of the initialize methods, with var declaration says instance var was not initialized in all of the initialize methods, with var declaration - says instance var was not initialized in all of the initialize methods (2) says instance var was not initialized in all of the initialize methods (2) -Semantic: responds_to? - restricts virtual generic module to including types (#8334) restricts virtual generic module to including types (#8334) - restricts type inside if scope 1 restricts type inside if scope 1 - is bool is bool - 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 in assignment restricts in assignment -Crystal::Doc::Macro - args_to_s - shows splat arg shows splat arg - shows external name of arg with quotes and escaping shows external name of arg with quotes and escaping - shows double splat arg shows double splat arg - shows default value with highlighting shows default value with highlighting - shows simple arg and block arg shows simple arg and block arg - shows simple arg and double splat arg shows simple arg and double splat arg - shows simple args shows simple args - shows block arg shows block arg - shows external name of arg shows external name of arg - shows double splat arg shows double splat arg - shows simple arg and splat arg shows simple arg and splat arg -Semantic: virtual metaclass - yields virtual type in block arg if class is abstract yields virtual type in block arg if class is abstract - allows allocating virtual type when base class is abstract allows allocating virtual type when base class is abstract - types virtual metaclass types virtual metaclass - allows passing metaclass to virtual metaclass restriction allows passing metaclass to virtual metaclass restriction - restricts virtual metaclass to Class (#11376) restricts virtual metaclass to Class (#11376) - merges metaclass types merges metaclass types - types metaclass node types metaclass node - types virtual metaclass method types virtual metaclass method - merges metaclass types with 3 types merges metaclass types with 3 types - allows passing metaclass to virtual metaclass restriction allows passing metaclass to virtual metaclass restriction -Crystal::Repl - can return static and runtime type information for - MixedUnionType MixedUnionType - Non Union Non Union - UnionType UnionType - VirtualType VirtualType - can parse and evaluate snippets can parse and evaluate snippets -Semantic: while - types endless while with break without value types endless while with break without value - finds all while cond assign targets in expressions (3) finds all while cond assign targets in expressions (3) - 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) - restricts type after while (#4242) restricts type after while (#4242) - finds all while cond assign targets in expressions (2) finds all while cond assign targets in expressions (2) - doesn't modify var's type before while doesn't modify var's type before while - finds while cond assign target in Not (#10345) finds while cond assign target in Not (#10345) - types while with assignment and && types while with assignment and && - types while with assignment types while with assignment - doesn't fail on Expressions condition (1) doesn't fail on Expressions condition (1) - types while with multiple breaks with value types while with multiple breaks with value - doesn't fail on nested conditionals inside typeof condition doesn't fail on nested conditionals inside typeof condition - 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 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 && (#1425) types while with && (#1425) - doesn't type var as nilable after break inside rescue doesn't type var as nilable after break inside rescue - restricts type after `while` with `not` and `and` (#4242) restricts type after `while` with `not` and `and` (#4242) - 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 - rebinds condition variable after while body (#6158) rebinds condition variable after while body (#6158) - types while with break without value types while with break without value - types while ((true)) as NoReturn types while ((true)) as NoReturn - finds all while cond assign targets in expressions (6) finds all while cond assign targets in expressions (6) - types variable as nilable if raise before assign types variable as nilable if raise before assign - uses var type inside while if endless loop uses var type inside while if endless loop - types endless while with multiple breaks with value types endless while with multiple breaks with value - finds all while cond assign targets in expressions (5) finds all while cond assign targets in expressions (5) - restricts type after while with not (#4242) restricts type after while with not (#4242) - types endless while with break with value types endless while with break with value - types while with assignment and call types while with assignment and call - types while (true) as NoReturn types while (true) as NoReturn - doesn't fail on Expressions condition (2) doesn't fail on Expressions condition (2) - 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) - finds all while cond assign targets in expressions (4) finds all while cond assign targets in expressions (4) - 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 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) - types while types while - 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 - reports break cannot be used outside a while reports break cannot be used outside a while - doesn't fail on new variables inside typeof condition doesn't fail on new variables inside typeof condition - reports next cannot be used outside a while reports next cannot be used outside a while - finds all while cond assign targets in expressions (#10350) finds all while cond assign targets in expressions (#10350) - types while with break with value types while with break with value - uses var type inside while if endless loop (2) uses var type inside while if endless loop (2) -read_file? - with absolute path - reads file (doesn't exist) reads file (doesn't exist) - with relative path - reads file (doesn't exist) reads file (doesn't exist) + allows instantiating static array instance var in initialize of generic type allows instantiating static array instance var in initialize of generic type + doesn't crash on instance_sizeof (#8858) doesn't crash on instance_sizeof (#8858) + doesn't crash on offsetof (#8858) doesn't crash on offsetof (#8858) + can match number type argument of static array (#1203) can match number type argument of static array (#1203) + types static array with var declaration types static array with var declaration + 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) +Crystal::Doc::Generator + .anchor_link + generates the correct anchor link generates the correct anchor link +Code gen: hash literal spec + creates custom non-generic hash in module creates custom non-generic hash in module + doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) + creates custom non-generic hash creates custom non-generic hash + creates custom generic hash via alias (2) creates custom generic hash via alias (2) + assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works + creates custom generic hash via alias (1) creates custom generic hash via alias (1) + creates custom generic hash with type vars creates custom generic hash with type vars + creates custom generic hash creates custom generic hash + creates custom generic hash in module (#5684) creates custom generic hash in module (#5684) + assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works +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) +Semantic: macro + can override macro (#2773) can override macro (#2773) + finds generic type argument of included module with self finds generic type argument of included module with self + finds metaclass instance of instance method (#4739) finds metaclass instance of instance method (#4739) + declares variable for macro with out declares variable for macro with out + errors if named arg already specified errors if named arg already specified + can specify tuple as return type can specify tuple as return type + looks up argument types in macro owner, not in subclass (#2395) looks up argument types in macro owner, not in subclass (#2395) + cannot lookup type defined in caller class cannot lookup type defined in caller class + finds free type vars finds free type vars + finds macro in module in Object finds macro in module in Object + types macro def that calls another method inside a class types macro def that calls another method inside a class + gives correct error when method is invoked but macro exists at the same scope gives correct error when method is invoked but macro exists at the same scope + unpacks to underscore within block parameters inside macros unpacks to underscore within block parameters inside macros + has correct location after expanding assignment after instance var has correct location after expanding assignment after instance var + finds type for global path shared with free var finds type for global path shared with free var + uses splat and double splat uses splat and double splat + uses bare *, doesn't let more args uses bare *, doesn't let more args + does macro verbatim outside macro does macro verbatim outside macro + shows correct error message in macro expansion (#7083) shows correct error message in macro expansion (#7083) + finds generic type argument of included module finds generic type argument of included module + allows declaring class with inline macro expression (#1333) allows declaring class with inline macro expression (#1333) + preserves correct self in restriction when macro def is to be instantiated in subtypes (#5044) preserves correct self in restriction when macro def is to be instantiated in subtypes (#5044) + allows specifying self as macro def return type (2) allows specifying self as macro def return type (2) + finds var in proc for macros finds var in proc for macros + allows union return types for macro def allows union return types for macro def + types macro types macro + allows generic return types for macro def allows generic return types for macro def + expands multiline macro expression in verbatim (#6643) expands multiline macro expression in verbatim (#6643) + clones default value before expanding clones default value before expanding + uses bare * uses bare * + double splat and regular args double splat and regular args + doesn't affect self restrictions outside the macro def being instantiated in subtypes doesn't affect self restrictions outside the macro def being instantiated in subtypes + errors if macro def type not found errors if macro def type not found + can lookup type parameter when macro is called inside class (#5343) can lookup type parameter when macro is called inside class (#5343) + expands macro with break inside while (#1852) expands macro with break inside while (#1852) + expands macro with block and argument to yield expands macro with block and argument to yield + errors if declares macro inside if errors if declares macro inside if + errors if requires inside if through macro expansion errors if requires inside if through macro expansion + doesn't crash on syntax error inside macro (regression, #8038) doesn't crash on syntax error inside macro (regression, #8038) + show macro trace in errors (2) show macro trace in errors (2) + solves macro expression arguments before macro expansion (type) solves macro expression arguments before macro expansion (type) + works inside proc literal (#2984) works inside proc literal (#2984) + types macro def types macro def + finds method before macro (#236) finds method before macro (#236) + executes OpAssign (#9356) executes OpAssign (#9356) + errors if find macros but missing argument errors if find macros but missing argument + can use macro in instance var initializer (just assignment) (#7666) can use macro in instance var initializer (just assignment) (#7666) + errors if macro uses undefined variable errors if macro uses undefined variable + doesn't error when adding macro call to constant (#2457) doesn't error when adding macro call to constant (#2457) + declares rescue variable inside for macro declares rescue variable inside for macro + errors if find macros but wrong arguments errors if find macros but wrong arguments + can define constant via macro included can define constant via macro included + finds macro in included generic module finds macro in included generic module + allows declaring class with macro if allows declaring class with macro if + errors if requires inside class through macro expansion errors if requires inside class through macro expansion + allows subclasses of return type for macro def allows subclasses of return type for macro def + can't define new variables (#466) can't define new variables (#466) + executes MultiAssign with ArrayLiteral value executes MultiAssign with ArrayLiteral value + assigns to underscore in MultiAssign assigns to underscore in MultiAssign + errors if named arg matches splat parameter errors if named arg matches splat parameter + matches with default value after splat matches with default value after splat + doesn't die on && inside if (bug) doesn't die on && inside if (bug) + uses uninitialized variable with macros uses uninitialized variable with macros + transforms with {{yield}} and call transforms with {{yield}} and call + executes MultiAssign executes MultiAssign + show macro trace in errors (1) show macro trace in errors (1) + solves named macro expression arguments before macro expansion (constant) (#2423) solves named macro expression arguments before macro expansion (constant) (#2423) + @caller + returns an array of each call returns an array of each call + returns nil if no stack is available returns nil if no stack is available + provides access to the `Call` information provides access to the `Call` information + skip_file macro directive + skips file inside an if macro expression skips file inside an if macro expression + skips expanding the rest of the current file skips expanding the rest of the current file + solves macro expression arguments before macro expansion (constant) solves macro expression arguments before macro expansion (constant) + types macro def that calls another method types macro def that calls another method + allows return values that include the return type of the macro def allows return values that include the return type of the macro def + finds metaclass instance of instance method (#4639) finds metaclass instance of instance method (#4639) + gives precise location info when doing yield inside macro gives precise location info when doing yield inside macro + declares multi-assign vars for macro declares multi-assign vars for macro + finds macro through alias (#2706) finds macro through alias (#2706) + finds macro in included module at class level (#4639) finds macro in included module at class level (#4639) + raise + inside method + without node + renders both frames (#7147) renders both frames (#7147) + inside macro + with node + points to caller when missing node location information (#7147) points to caller when missing node location information (#7147) + renders both frames (#7147) renders both frames (#7147) + pointing at the correct node in complex/nested macro (#7147) pointing at the correct node in complex/nested macro (#7147) + contains the message and not `expanding macro` (#5669) contains the message and not `expanding macro` (#5669) + without node + does not contain `expanding macro` does not contain `expanding macro` + renders both frames (#7147) renders both frames (#7147) + supports an empty message (#8631) supports an empty message (#8631) + errors if using macro that is defined later errors if using macro that is defined later + finds macro in inherited generic class finds macro in inherited generic class + evaluates yield expression (#2924) evaluates yield expression (#2924) + solves named macro expression arguments before macro expansion (type) (#2423) solves named macro expression arguments before macro expansion (type) (#2423) + finds macro and method at the same scope inside included module finds macro and method at the same scope inside included module + checks if macro expansion returns (#821) checks if macro expansion returns (#821) + errors if missing one argument errors if missing one argument + allows declaring class with macro for allows declaring class with macro for + can return class type in macro def can return class type in macro def + can use macro in instance var initializer (#7666) can use macro in instance var initializer (#7666) + can return virtual class type in macro def can return virtual class type in macro def + errors when trying to define def inside def with macro expansion errors when trying to define def inside def with macro expansion + errors if applying protected modifier to macro errors if applying protected modifier to macro + finds generic in macro code finds generic in macro code + errors if non-existent named arg errors if non-existent named arg + finds generic in macro code using free var finds generic in macro code using free var + unpacks block parameters inside macros (#13742) unpacks block parameters inside macros (#13742) + types macro def with argument types macro def with argument + assigns to underscore assigns to underscore + uses bare *, doesn't let more args uses bare *, doesn't let more args + allows named args after splat allows named args after splat + finds macro and method at the same scope finds macro and method at the same scope + types macro def that calls another method inside a class types macro def that calls another method inside a class + expands macro with block expands macro with block + errors if named arg matches single splat parameter errors if named arg matches single splat parameter + finds macro in included module finds macro in included module + errors if missing two arguments errors if missing two arguments + can access variable inside macro expansion (#2057) can access variable inside macro expansion (#2057) + gets named arguments in double splat gets named arguments in double splat + errors if macro def type doesn't match found errors if macro def type doesn't match found + allows specifying self as macro def return type allows specifying self as macro def return type + says missing argument because positional args don't match past splat says missing argument because positional args don't match past splat + does macro verbatim inside macro does macro verbatim inside macro + applies visibility modifier only to first level applies visibility modifier only to first level + doesn't include parameters with default values in missing arguments error doesn't include parameters with default values in missing arguments error +View#module_name + namespace is divided by hyphen namespace is divided by hyphen + hyphen followed by non-ascii letter is replaced by its character hyphen followed by non-ascii letter is replaced by its character + underscore is ignored underscore is ignored +Code gen: proc + can assign proc that returns anything to proc that returns nil, using union type (#3655) can assign proc that returns anything to proc that returns nil, using union type (#3655) + allows proc pointer where self is a class allows proc pointer where self is a class + saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` + makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference + can pass Proc(T) to Proc(Nil) in type restriction (#8964) can pass Proc(T) to Proc(Nil) in type restriction (#8964) + executes proc pointer on primitive executes proc pointer on primitive + codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) + allows invoking a function with a subtype when defined as block spec allows invoking a function with a subtype when defined as block spec + calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer + can assign proc that returns anything to proc that returns nil (#3655) can assign proc that returns anything to proc that returns nil (#3655) + codegens proc with union type that returns itself codegens proc with union type that returns itself + binds function pointer to associated call binds function pointer to associated call + codegens nilable proc type (1) codegens nilable proc type (1) + codegens proc that accepts a union and is called with a single type codegens proc that accepts a union and is called with a single type + accesses T in macros as a TupleLiteral accesses T in macros as a TupleLiteral + call proc pointer call proc pointer + doesn't crash when taking a proc pointer to a virtual type (#9823) doesn't crash when taking a proc pointer to a virtual type (#9823) + codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct + takes pointerof function pointer takes pointerof function pointer + codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) + allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically + builds nilable proc type from fun builds nilable proc type from fun + call proc pointer with args call proc pointer with args + codegens proc of generic type codegens proc of generic type + codegens nilable proc type dispatch (2) codegens nilable proc type dispatch (2) + assigns nil and proc to nilable proc type assigns nil and proc to nilable proc type + codegens captured block that returns tuple codegens captured block that returns tuple + codegens proc in instance var initialize (#3016) codegens proc in instance var initialize (#3016) + passes proc as &->expr to method that yields passes proc as &->expr to method that yields + call proc literal with arguments call proc literal with arguments + allows proc type of enum type with base type allows proc type of enum type with base type + codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type + call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises + call simple proc literal call simple proc literal + doesn't crash on #2196 doesn't crash on #2196 + allows proc type of enum type allows proc type of enum type + codegens proc with another var codegens proc with another var + saves receiver value of proc pointer `->var.foo` saves receiver value of proc pointer `->var.foo` + doesn't crash when taking a proc pointer that multidispatches on a module (#3822) doesn't crash when taking a proc pointer that multidispatches on a module (#3822) + casts from function pointer to proc casts from function pointer to proc + calls proc pointer with union (passed by value) arg calls proc pointer with union (passed by value) arg + codegens nilable proc type (2) codegens nilable proc type (2) + codegens nilable proc type dispatch (1) codegens nilable proc type dispatch (1) + saves receiver value of proc pointer `->@ivar.foo` saves receiver value of proc pointer `->@ivar.foo` + closures var on ->var.call (#8584) closures var on ->var.call (#8584) + doesn't crash when taking a proc pointer that multidispatches on the top-level (#3822) doesn't crash when taking a proc pointer that multidispatches on the top-level (#3822) + call simple proc literal with return call simple proc literal with return + passes block to another function (bug: mangling of both methods was the same) passes block to another function (bug: mangling of both methods was the same) + gets proc to lib fun (#504) gets proc to lib fun (#504) + allows redefining fun allows redefining fun + does new on proc type does new on proc type + returns proc as function pointer inside top-level fun (#14691) returns proc as function pointer inside top-level fun (#14691) + returns ProcPointer inside top-level fun (#14691) returns ProcPointer inside top-level fun (#14691) + raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) + call proc literal with return type call proc literal with return type + call proc pointer of instance method call proc pointer of instance method + mangles strings in such a way they don't conflict with funs (#1006) mangles strings in such a way they don't conflict with funs (#1006) + builds proc type from fun builds proc type from fun + codegens proc that returns a virtual type codegens proc that returns a virtual type + gets proc pointer using virtual type (#1337) gets proc pointer using virtual type (#1337) + uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) + automatically casts proc that returns something to proc that returns void automatically casts proc that returns something to proc that returns void + allows using proc arg name shadowing local variable allows using proc arg name shadowing local variable + codegens proc that references struct (bug) codegens proc that references struct (bug) + allows invoking a function with a subtype allows invoking a function with a subtype + allows invoking proc literal with smaller type allows invoking proc literal with smaller type +Semantic: union + merges types in the same hierarchy with Union merges types in the same hierarchy with Union + supports macro if inside union supports macro if inside union + types union when arg is union types union when arg is union + types union when obj is union types union when obj is union + doesn't virtualize union elements (#7814) doesn't virtualize union elements (#7814) + types union when both obj and arg are union types union when both obj and arg are union + errors if instantiates union errors if instantiates union + can use Union in type restriction (#2988) can use Union in type restriction (#2988) + can reopen Union and access T can reopen Union and access T + treats void as nil in union treats void as nil in union + finds method in Object finds method in Object + assigns to union and keeps new union type in call assigns to union and keeps new union type in call + types union of same type types union of same type + doesn't run virtual lookup on unbound unions (#9173) doesn't run virtual lookup on unbound unions (#9173) + types union types union + types union of classes types union of classes + looks up type in union type with free var looks up type in union type with free var + doesn't crash with union of no-types (#5805) doesn't crash with union of no-types (#5805) + commutativity + module v.s. including generic module instance module v.s. including generic module instance + virtual metaclass v.s. generic subclass instance metaclass virtual metaclass v.s. generic subclass instance metaclass + generic module instance v.s. including module generic module instance v.s. including module + module v.s. extending generic module instance metaclass module v.s. extending generic module instance metaclass + generic module instance v.s. including generic module instance generic module instance v.s. including generic module instance + superclass v.s. uninstantiated generic subclass superclass v.s. uninstantiated generic subclass + uninstantiated generic super-metaclass v.s. uninstantiated generic sub-metaclass uninstantiated generic super-metaclass v.s. uninstantiated generic sub-metaclass + generic module instance v.s. extending generic module instance metaclass generic module instance v.s. extending generic module instance metaclass + module v.s. including module module v.s. including module + can iterate T can iterate T + can reopen Union can reopen Union + finds method in Value finds method in Value +Code gen: primitives + sums two numbers out of an [] of Number sums two numbers out of an [] of Number + allows @[Primitive] on fun declarations allows @[Primitive] on fun declarations + codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 + codegens f64 codegens f64 + codegens bool codegens bool + passes issue #328 passes issue #328 + codegens pointer of int codegens pointer of int + codegens string codegens string + codegens char codegens char + codegens crystal_type_id for class codegens crystal_type_id for class + atomicrmw + codegens atomicrmw with symbols codegens atomicrmw with symbols + codegens atomicrmw with enums codegens atomicrmw with enums + codegens atomicrmw with enums codegens atomicrmw with enums + allows redefining a primitive method allows redefining a primitive method + codegens f32 codegens f32 + va_arg + uses llvm's va_arg instruction uses llvm's va_arg instruction + 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 + defined method that calls primitive (bug) defined method that calls primitive (bug) + can invoke binary on primitive typedef (#614) can invoke binary on primitive typedef (#614) + codegens int codegens int + can invoke cast on primitive typedef (#614) can invoke cast on primitive typedef (#614) + codegens char ord codegens char ord + 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 __LINE__ codegens __LINE__ + arithmetic primitives + codegens 1 &+ 2 codegens 1 &+ 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_f! codegens 1.to_f! + skips bounds checking when to_i produces same type skips bounds checking when to_i produces same type + codegens 16.unsafe_shr 2 codegens 16.unsafe_shr 2 + codegens 8.unsafe_div 3 codegens 8.unsafe_div 3 + 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 - 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 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 + codegens 2 &* 3 codegens 2 &* 3 + codegens 8.unsafe_mod 3 codegens 8.unsafe_mod 3 + codegens 16.unsafe_shl 2 codegens 16.unsafe_shl 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.to_i16 codegens 1.to_i16 + gets crystal class instance type id gets crystal class instance type id + codegens crystal_type_id with union type codegens crystal_type_id with union type + doesn't treat `(1 == 1) == true` as `1 == 1 == true` (#328) doesn't treat `(1 == 1) == true` as `1 == 1 == true` (#328) + codegens long codegens long + uses built-in llvm function that returns a tuple uses built-in llvm function that returns a tuple + codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 codegens uint128 + allows @[Primitive] on method that has body allows @[Primitive] on method that has body +Normalize: range literal + normalizes exclusive normalizes exclusive + normalizes not exclusive normalizes not exclusive +Code gen: return + doesn't crash when method returns nil and can be inlined doesn't crash when method returns nil and can be inlined + codegens assign with if with two returns codegens assign with if with two returns + return from function with union type return from function with union type + returns in var assignment (#3364) returns in var assignment (#3364) + forms a tuple from multiple return values forms a tuple from multiple return values + returns empty from function returns empty from function + return union return union + codegens bug with return if true codegens bug with return if true + codegens return followed by another expression codegens return followed by another expression + codegens return inside if codegens return inside if + flattens splats inside multiple return values flattens splats inside multiple return values + return from function with nilable type 2 return from function with nilable type 2 + codegens return codegens return + return from function with nilable type return from function with nilable type +Semantic: require + file not found + require require + wildcard wildcard + relative require relative require + relative wildcard relative wildcard +Semantic: metaclass + can't reopen as struct can't reopen as struct + types generic instance metaclass superclass types generic instance metaclass superclass + types generic class metaclass types generic class metaclass + types generic module metaclass types generic module metaclass + subtyping relations between metaclasses + generic modules (3) generic modules (3) + generic classes (2) generic classes (2) + non-generic modules non-generic modules + generic classes (1) generic classes (1) + generic classes (3) generic classes (3) + generic modules (1) generic modules (1) + generic modules (2) generic modules (2) + virtual metaclass type with virtual type (#12628) virtual metaclass type with virtual type (#12628) + non-generic classes non-generic classes + types Object and Class metaclasses types Object and Class metaclasses + types metaclass superclass types metaclass superclass + types Class class types Class class + can't reopen as module can't reopen as module + types Reference metaclass types Reference metaclass + types Object class types Object class + types generic metaclass superclass types generic metaclass superclass +Normalize: hash literal + hoists complex element expressions, hash-like generic hoists complex element expressions, hash-like generic + normalizes non-empty with of normalizes non-empty with of + hoists complex element expressions hoists complex element expressions + normalizes non-empty without of normalizes non-empty without of + normalizes empty with of normalizes empty with of + hoists complex element expressions, hash-like hoists complex element expressions, hash-like Crystal::Repl::Interpreter magic constants does line number does line number constants - interprets constant literal interprets constant literal returns nil in the assignment returns nil in the assignment - hoists constants hoists constants interprets self inside constant inside class interprets self inside constant inside class + hoists constants hoists constants interprets complex constant interprets complex constant -Crystal::Repl::Interpreter - integration - does CSV does CSV - does Int32#to_s does Int32#to_s - does JSON::Serializable does JSON::Serializable - does some Hash methods does some Hash methods - does YAML does YAML - does String#includes? does String#includes? - does YAML::Serializable does YAML::Serializable - does IO.pipe (checks that StaticArray is passed correctly to C calls) does IO.pipe (checks that StaticArray is passed correctly to C calls) - does caller does caller - does Float64#to_s (complex) does Float64#to_s (complex) - does Range#to_a, Array#to_s does Range#to_a, Array#to_s - does JSON does JSON - does Float64#to_s (simple) does Float64#to_s (simple) - does XML does XML -types to_s of - non-instantiated array non-instantiated array - does for type contained in generic module does for type contained in generic module - union of simple types union of simple types - union types - should have parens - as arg type as arg type - as return type as return type - should not have extra parens - in pointers in pointers - in tuples in tuples - in arrays in arrays - nilable type with more than two elements, Nil at the end nilable type with more than two elements, Nil at the end - array of simple types array of simple types - nilable value type nilable value type - named tuple named tuple - does for type contained in generic class does for type contained in generic class - nilable reference type nilable reference type -Code gen: op assign - evaluates exps once (#3398) evaluates exps once (#3398) - evaluates exps once, [] (#3398) evaluates exps once, [] (#3398) -Normalize: regex literal - StringInterpolation - simple simple - options - imx imx - empty empty - x x - im im - i i - StringLiteral - expands to const expands to const - simple simple -Code gen: uninitialized - doesn't break on inherited declared var (#390) doesn't break on inherited declared var (#390) - codegens declare var and changes it codegens declare var and changes it - works with uninitialized NoReturn (#3314) works with uninitialized NoReturn (#3314) - 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 value (#3641) codegens value (#3641) - codegens declare instance var codegens declare instance var - codegens declare instance var with static array type codegens declare instance var with static array type - codegens declare var and read it codegens declare var and read it -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 -Semantic: module - errors when extending generic module that defines instance vars errors when extending generic module that defines instance vars - gives error when including self, generic module gives error when including self, generic module - includes module with Union(T*) includes module with Union(T*) - extends a module extends a module - types proc of module with generic class types proc of module with generic class - gives error when including instantiation of self, generic module gives error when including instantiation of self, generic module - gives error when including self gives error when including self - includes generic module with self (check return subclass type, success) includes generic module with self (check return subclass type, success) - includes generic module with self (check argument type, error) includes generic module with self (check argument type, error) - includes module but not generic includes module but not generic - extends generic module from generic class and calls class method (#7167) extends generic module from generic class and calls class method (#7167) - types proc of module after type changes types proc of module after type changes - includes but not a module includes but not a module - errors if reopening generic module with different type vars (2) errors if reopening generic module with different type vars (2) - type def does not reopen type from parent namespace (#11181) type def does not reopen type from parent namespace (#11181) - errors if reopening generic module with different splat index (2) errors if reopening generic module with different splat index (2) - reports can't use instance variables inside module reports can't use instance variables inside module - errors if reopening non-generic module as generic errors if reopening non-generic module as generic - gives error when trying to instantiate with new gives error when trying to instantiate with new - uses :Module name for modules in errors uses :Module name for modules in errors - includes generic module with self (check argument type, success) includes generic module with self (check argument type, success) - can restrict module with module (#3029) can restrict module with module (#3029) - uses type declaration inside module and gives error uses type declaration inside module and gives error - inherits instance var type annotation from generic to concrete inherits instance var type annotation from generic to concrete - includes generic module with self (check return subclass type, error) includes generic module with self (check return subclass type, error) - includes generic module with self, and inherits it includes generic module with self, and inherits it - inherits instance var type annotation from generic to generic to concrete inherits instance var type annotation from generic to generic to concrete - can't reopen as struct can't reopen as struct - includes module in a module includes module in a module - finds in module when included finds in module when included - works with range and map works with range and map - doesn't look up initialize past module that defines initialize (#7007) doesn't look up initialize past module that defines initialize (#7007) - errors when extending generic module that defines instance vars (2) errors when extending generic module that defines instance vars (2) - includes module in a class includes module in a class - errors if reopening generic module with different splat index (3) errors if reopening generic module with different splat index (3) - errors if reopening generic module with different splat index errors if reopening generic module with different splat index - inherits instance var type annotation from generic to concrete with T inherits instance var type annotation from generic to concrete with T - declares module automatically if not previously declared when declaring a module declares module automatically if not previously declared when declaring a module - uses type declaration inside module uses type declaration inside module - errors when extending self and self defines instance vars (2) (#9568) errors when extending self and self defines instance vars (2) (#9568) - finds class method in block finds class method in block - types union of module and class that includes it types union of module and class that includes it - allows overloading with included generic module allows overloading with included generic module - includes generic module with self (check return type, error) includes generic module with self (check return type, error) - finds constant in generic module included in another module finds constant in generic module included in another module - includes generic module with self (check argument superclass type, success) includes generic module with self (check argument superclass type, success) - includes generic module with type includes generic module with type - includes module but wrong number of arguments includes module but wrong number of arguments - finds types close to included module finds types close to included module - errors when extending self and self defines instance vars (3) (#9568) errors when extending self and self defines instance vars (3) (#9568) - can instantiate generic module can instantiate generic module - declares module automatically if not previously declared when declaring a class declares module automatically if not previously declared when declaring a class - instantiates generic variadic module, accesses T from instance method instantiates generic variadic module, accesses T from instance method - 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) - types pointer of module types pointer of module - includes generic module explicitly includes generic module explicitly - errors if reopening generic module with different type vars errors if reopening generic module with different type vars - gives error with cyclic include between non-generic and generic module (2) gives error with cyclic include between non-generic and generic module (2) - instantiates generic variadic module, accesses T from instance method, more args instantiates generic variadic module, accesses T from instance method, more args - can use generic module as instance variable type (2) can use generic module as instance variable type (2) - can't reopen as class can't reopen as class - finds nested type inside method in block inside module finds nested type inside method in block inside module - calls super on included generic module and finds type var (2) calls super on included generic module and finds type var (2) - calls super on included generic module and finds type var calls super on included generic module and finds type var - errors when recursively extending module that defines instance vars errors when recursively extending module that defines instance vars - includes generic module with self (check return type, success) includes generic module with self (check return type, success) - extends self extends self - includes generic module with self (check argument superclass type, success) includes generic module with self (check argument superclass type, success) - calls super on included generic module calls super on included generic module - includes generic module with self includes generic module with self - initializes variable in module, recursive initializes variable in module, recursive - types pointer of module with generic type types pointer of module with generic type - can use generic module as instance variable type can use generic module as instance variable type - uses type declaration inside module, recursive, and gives error uses type declaration inside module, recursive, and gives error - finds inner class from inherited one (#476) finds inner class from inherited one (#476) - includes generic module and errors in call includes generic module and errors in call - can't pass module class to virtual metaclass (#6113) can't pass module class to virtual metaclass (#6113) - instantiates generic variadic module, accesses T from class method instantiates generic variadic module, accesses T from class method - errors when extending self and self defines instance vars (#9568) errors when extending self and self defines instance vars (#9568) - gives error when trying to instantiate with allocate gives error when trying to instantiate with allocate - gives helpful error message when generic type var is missing gives helpful error message when generic type var is missing - errors if including generic module and not specifying type vars errors if including generic module and not specifying type vars - 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) - gives error with cyclic include gives error with cyclic include - 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 - includes generic module explicitly and errors includes generic module explicitly and errors - extends module from generic class and calls class method (#7167) extends module from generic class and calls class method (#7167) - 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 - errors if declares module inside if errors if declares module inside if - works with int including enumerable works with int including enumerable - errors when extending module that defines instance vars (#4065) errors when extending module that defines instance vars (#4065) - includes generic module with another generic type includes generic module with another generic type - errors when extending module that defines instance vars (2) (#4065) errors when extending module that defines instance vars (2) (#4065) - 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 generic module from generic module and calls class method (#7167) extends generic module from generic module and calls class method (#7167) - types pointer of module with generic type types pointer of module with generic type - gives error with cyclic include between non-generic and generic module gives error with cyclic include between non-generic and 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 - instantiates generic variadic module, accesses T from instance method through generic include instantiates generic variadic module, accesses T from instance method through generic include - errors when recursively extending module that defines instance vars (2) errors when recursively extending module that defines instance vars (2) - initializes variable in module initializes variable in module - types pointer of module with method types pointer of module with method - includes module but can't access metaclass methods includes module but can't access metaclass methods - types pointer of module with method with two including types types pointer of module with method with two including types - gives error with cyclic include, generic module gives error with cyclic include, generic module -Semantic: extern struct - errors if using non-primitive type in constructor errors if using non-primitive type in constructor - errors if using non-primitive for field type errors if using non-primitive for field type - overrides getter overrides getter - can new with named args can new with named args - declares extern union with no constructor declares extern union with no constructor - errors if using non-primitive for field type via module errors if using non-primitive for field type via module - can use extern struct in lib can use extern struct in lib - can be passed to C fun can be passed to C fun - declares extern struct with no constructor declares extern struct with no constructor - declares with constructor declares with constructor - can include module can include module -Crystal::CrystalPath - #each_file_expansion - foo.cr foo.cr - ./foo ./foo - foo/bar/baz foo/bar/baz - foo.cr/bar foo.cr/bar - ./foo/bar/baz ./foo/bar/baz - ./foo.cr ./foo.cr - ./foo/bar ./foo/bar - foo/bar foo/bar - foo foo - foo.cr/bar.cr foo.cr/bar.cr - finds "other_test_files" finds "other_test_files" - finds "test_files/*" finds "test_files/*" - finds "test_files/another" finds "test_files/another" - doesn't finds "test_folder/*" doesn't finds "test_folder/*" - doesn't finds "file_two.cr" doesn't finds "file_two.cr" - doesn't finds "test_files/missing_file.cr" doesn't finds "test_files/missing_file.cr" - doesn't finds "./crystal_path_spec" doesn't finds "./crystal_path_spec" - finds "test_files/file_one.cr" finds "test_files/file_one.cr" - finds "./test_folder/file_three.cr" finds "./test_folder/file_three.cr" - doesn't finds "./crystal_path_spec.cr" doesn't finds "./crystal_path_spec.cr" - finds "test_files/file_one" finds "test_files/file_one" - doesn't finds "build/reproducible-path/crystal-1.14.0+dfsg/spec/compiler/crystal_path/crystal_path_spec.cr" doesn't finds "build/reproducible-path/crystal-1.14.0+dfsg/spec/compiler/crystal_path/crystal_path_spec.cr" - finds "test_files/**" finds "test_files/**" - finds "./file_two.cr" finds "./file_two.cr" - finds "../**" finds "../**" - finds "test_files/file_one" finds "test_files/file_one" - finds "test_files" finds "test_files" - includes 'lib' by default includes 'lib' by default - doesn't finds "../crystal_path/test_files/file_one" doesn't finds "../crystal_path/test_files/file_one" - finds "../test_folder" finds "../test_folder" - finds "./test_folder/*" finds "./test_folder/*" - finds "foo.cr" finds "foo.cr" - finds "test_files/file_four" finds "test_files/file_four" - doesn't finds "test_folder/file_three.cr" doesn't finds "test_folder/file_three.cr" - finds "crystal_path_spec" finds "crystal_path_spec" - finds "test_files/file_three" finds "test_files/file_three" - finds "test_files/yet_another" finds "test_files/yet_another" - doesn't finds "../../src/file_three" doesn't finds "../../src/file_three" - .expand_paths .expand_paths - overrides path with environment variable overrides path with environment variable -Semantic: new - evaluates initialize default value at the instance scope (6) (#731) evaluates initialize default value at the instance scope (6) (#731) - evaluates initialize default value at the instance scope (1) (#731) evaluates initialize default value at the instance scope (1) (#731) - doesn't incorrectly redefines new for generic class doesn't incorrectly redefines new for generic class - evaluates initialize default value at the instance scope (2) (#731) evaluates initialize default value at the instance scope (2) (#731) - uses correct receiver for `initialize` in namespaced generic classes (#4086) uses correct receiver for `initialize` in namespaced generic classes (#4086) - errors if using self call in default argument (1) errors if using self call in default argument (1) - errors if using self call in default argument (2) errors if using self call in default argument (2) - inherits initialize and new methods if doesn't define new (#3238) inherits initialize and new methods if doesn't define new (#3238) - evaluates initialize default value at the instance scope (4) (#731) evaluates initialize default value at the instance scope (4) (#731) - errors if using self call in default argument (3) errors if using self call in default argument (3) - doesn't have default new for inherited class from generic type doesn't have default new for inherited class from generic type - evaluates initialize default value at the instance scope (5) (#731) evaluates initialize default value at the instance scope (5) (#731) - evaluates initialize default value at the instance scope (3) (#731) evaluates initialize default value at the instance scope (3) (#731) -Crystal::Repl::Interpreter - bugs - doesn't incorrectly consider a non-closure as closure doesn't incorrectly consider a non-closure as closure - doesn't pass self to top-level method (FileNode) doesn't pass self to top-level method (FileNode) - does multidispatch on virtual struct does multidispatch on virtual struct - doesn't override local variable value with block var with the same name doesn't override local variable value with block var with the same name - correctly puts virtual metaclass type in union correctly puts virtual metaclass type in union - does leading zeros does leading zeros - does multidispatch on virtual struct union nil does multidispatch on virtual struct union nil - doesn't pass self to top-level method doesn't pass self to top-level method - breaks from current block, not from outer block breaks from current block, not from outer block -.parse_args - DIR (relative to home) DIR (relative to home) - DIR with path DIR with path - DIR (absolute) DIR (absolute) - NAME DIR NAME DIR - DIR = . DIR = . - DIR DIR -Code gen: asm - codegens with two outputs codegens with two outputs - passes correct string length to LLVM passes correct string length to LLVM - codegens with two inputs codegens with two inputs - codegens with one input codegens with one input - codegens with intel dialect codegens with intel dialect - codegens without inputs codegens without inputs -Crystal::Repl::Interpreter - is_a? - does is_a? from NilableProcType to non-Nil does is_a? from NilableProcType to non-Nil - does is_a? from NilableReferenceUnionType to NonGenericClassType (false) does is_a? from NilableReferenceUnionType to NonGenericClassType (false) - does is_a? from NilableType to NonGenericClassType (true) does is_a? from NilableType to NonGenericClassType (true) - does is_a? from NilableReferenceUnionType to NonGenericClassType (true) does is_a? from NilableReferenceUnionType to NonGenericClassType (true) - does is_a? from NilableType to GenericClassInstanceType (false) does is_a? from NilableType to GenericClassInstanceType (false) - does is_a? from NilableType to NonGenericClassType (false) does is_a? from NilableType to NonGenericClassType (false) - does is_a? from NilableType to GenericClassInstanceType (true) does is_a? from NilableType to GenericClassInstanceType (true) - does is_a? from VirtualType to NonGenericClassType (false) does is_a? from VirtualType to NonGenericClassType (false) - does is_a? from NilableProcType to Nil does is_a? from NilableProcType to Nil - does is_a? from VirtualType to NonGenericClassType (true) does is_a? from VirtualType to NonGenericClassType (true) -Semantic: method_missing - does error in method_missing if wrong number of params does error in method_missing if wrong number of params - does error in method_missing macro with virtual type does error in method_missing macro with virtual type - does method missing for generic type does method missing for generic type - doesn't look up method_missing in with_yield_scope if call has a receiver (#12097) doesn't look up method_missing in with_yield_scope if call has a receiver (#12097) - finds method_missing with 'with ... yield' finds method_missing with 'with ... yield' - errors if method_missing expands to an incorrect method errors if method_missing expands to an incorrect method - errors if method_missing expands to multiple methods errors if method_missing expands to multiple methods -Semantic: enum - doesn't overflow on flags member (#7877) doesn't overflow on flags member (#7877) - allows class vars in enum allows class vars in enum - finds class method in enum type finds class method in enum type - errors if using a name twice errors if using a name twice - errors if reopen and tries to define constant errors if reopen and tries to define constant - defines class method on enum defines class method on enum - can use macro for inside enum can use macro for inside enum - defines method on enum defines method on enum - errors if reopening enum with different base type (2) errors if reopening enum with different base type (2) - errors if reopen but not enum errors if reopen but not enum - errors if defining initialize in Enum (#7238) errors if defining initialize in Enum (#7238) - types enum value types enum value - errors if reopening enum with different base type (1) errors if reopening enum with different base type (1) - types enum types enum - marks as flags with base type (#2185) marks as flags with base type (#2185) - disallows All value for @[Flags] enum disallows All value for @[Flags] enum - errors if using instance var inside enum (#991) errors if using instance var inside enum (#991) - doesn't overflow when going from negative to zero (#7874) doesn't overflow when going from negative to zero (#7874) - disallows implicit conversion of int to enum disallows implicit conversion of int to 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 - has None value when defined as @[Flags] has None value when defined as @[Flags] - has All value when defined as @[Flags] has All value when defined as @[Flags] - gives error on unsigned flags enum overflow after a member with value gives error on unsigned flags enum overflow after a member with value - errors if enum value is too big for type (#678) errors if enum value is too big for type (#678) - can use macro expression inside enum can use macro expression inside enum - gives error on flags enum overflow gives error on flags enum overflow - 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) - disallows redefining None to non-0 for @[Flags] enum disallows redefining None to non-0 for @[Flags] enum - doesn't visit enum members generated by macros twice (#10104) doesn't visit enum members generated by macros twice (#10104) - reopens enum with same base type (2) reopens enum with same base type (2) - reopens enum without base type (2) reopens enum without base type (2) - gives error on enum overflow after a member with value gives error on enum overflow after a member with value - errors if invoking private enum method errors if invoking private enum method - errors on enum without members (#3447) errors on enum without members (#3447) - errors if declaring type inside enum, nested (#3127) errors if declaring type inside enum, nested (#3127) - gives error on signed flags enum overflow after a member with value gives error on signed flags enum overflow after a member with value - can redefine Enum.new can redefine Enum.new - doesn't error when defining a method for an enum with flags doesn't error when defining a method for an enum with flags - gives error on enum overflow gives error on enum overflow - creates enum from value creates enum from value - reopens enum without base type (1) reopens enum without base type (1) - errors if inheriting Enum (#3592) errors if inheriting Enum (#3592) - reopens an enum reopens an enum - attaches annotation to enum method (#6690) attaches annotation to enum method (#6690) - allows redefining None to 0 for @[Flags] enum allows redefining None to 0 for @[Flags] enum - 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 declaring type inside enum (#3127) errors if declaring type inside enum (#3127) - finds method in enum type finds method in enum type - reopens enum with same base type (1) reopens enum with same base type (1) -Crystal::Doc::Generator - generates sitemap generates sitemap - #formatted_doc - with no annotation, and no docs - should generate nothing should generate nothing - with a Experimental annotation, and no docs - should generate just the Experimental tag should generate just the Experimental tag - with a Deprecated annotation, and docs - should generate both the docs and Deprecated tag should generate both the docs and Deprecated tag - should generate the full document should generate the full document - should generate the full document should generate the full document - with a Experimental annotation, and docs - should generate both the docs and Experimental tag should generate both the docs and Experimental tag - with a Deprecated annotation, and no docs - should generate just the Deprecated tag should generate just the Deprecated tag - #must_include_toplevel? - returns false if program has nothing returns false if program has nothing - returns false if program has macro which is defined in other place returns false if program has macro which is defined in other place - returns true if program has constant returns true if program has constant - returns false if program has method which is defined in other place returns false if program has method which is defined in other place - returns true if program has method returns true if program has method - returns false if program has constant which is defined in other place returns false if program has constant which is defined in other place - returns true if program has macro returns true if program has macro - #collect_constants - returns empty array when constants are private returns empty array when constants are private - crystal repo - inserts pseudo methods inserts pseudo methods - #formatted_summary - with no annotation, and no docs - should generate nothing should generate nothing - with a Deprecated annotation, and docs - should generate both the docs and Deprecated tag should generate both the docs and Deprecated tag - with a Deprecated annotation, and no docs - should generate just the Deprecated tag should generate just the Deprecated tag - with a Experimental annotation, and no docs - should generate just the Experimental tag should generate just the Experimental tag - should generate the first line should generate the first line - should exclude whitespace before the summary line should exclude whitespace before the summary line - with a Experimental annotation, and docs - should generate both the docs and Experimental tag should generate both the docs and Experimental tag - should generate the first sentence should generate the first sentence -Crystal::Repl::Interpreter - alignof - interprets alignof typeof interprets alignof typeof - instance_sizeof - interprets instance_sizeof typeof interprets instance_sizeof typeof - instance_alignof - interprets instance_alignof typeof interprets instance_alignof typeof - sizeof - interprets sizeof typeof interprets sizeof typeof -Semantic: nilable cast - types as? types as? - types as? with union types as? with union - casts to module casts to module - doesn't introduce type filter for nilable cast object (#12661) doesn't introduce type filter for nilable cast object (#12661) - does upcast does upcast - types as? with NoReturn types as? with NoReturn - types as? with nil types as? with nil - doesn't crash with typeof no-type (#7441) doesn't crash with typeof no-type (#7441) -Crystal::Command::FlagsVisitor - different flags different flags - unique flags unique flags - only macro only macro -Code gen: automatic cast - casts symbol literal to enum casts symbol literal to enum - 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 literal integer (Int64 -> Int32, ok) casts literal integer (Int64 -> Int32, ok) - casts Int32 to Int64 in ivar type declaration casts Int32 to Int64 in ivar type declaration - does multidispatch with automatic casting (1) (#8217) does multidispatch with automatic casting (1) (#8217) - casts literal integer (Int32 -> Float64) casts literal integer (Int32 -> Float64) - casts Int32 -> Int64 in arg restriction casts Int32 -> Int64 in arg restriction - casts Symbol to Enum in ivar type declaration casts Symbol to Enum in ivar type declaration - casts Symbol to Enum in ivar assignment casts Symbol to Enum in ivar assignment - casts literal integer (Int32 -> Int64) casts literal integer (Int32 -> Int64) - casts literal float (Float64 -> Float32) casts literal float (Float64 -> Float32) - casts Int32 to Int64 in ivar type declaration in generic casts Int32 to Int64 in ivar type declaration in generic - doesn't autocast number on union (#8655) doesn't autocast number on union (#8655) - casts literal float (Float32 -> Float64) casts literal float (Float32 -> Float64) - casts Int32 to Int64 in cvar assignment casts Int32 to Int64 in cvar assignment - casts Int32 to Int64 in ivar assignment casts Int32 to Int64 in ivar assignment - casts integer variable to larger type (#9565) casts integer variable to larger type (#9565) - casts literal integer (Int32 -> Float32) casts literal integer (Int32 -> Float32) - does multidispatch with automatic casting (3) does multidispatch with automatic casting (3) - casts Int32 to Int64 in lvar assignment casts Int32 to Int64 in lvar assignment -Semantic: external/internal - overloads based on external name (#2610) overloads based on external name (#2610) - can call with external name and use with internal can call with external name and use with internal - can call positionally can call positionally - macros - can call with external name and use with internal, after splat can call with external name and use with internal, after splat - can call positionally can call positionally - can call with external name and use with internal can call with external name and use with internal - can call with external name and use with internal, after splat can call with external name and use with internal, after splat -Code gen: module - casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) - declares proc with module type and invoke it with two different types that return themselves declares proc with module type and invoke it with two different types that return themselves - codegens module with virtual type codegens module with virtual type - codegens cast to module that includes bool codegens cast to module that includes bool - can instantiate generic module can instantiate generic module - expands modules to its including types (#1916) expands modules to its including types (#1916) - codegens pointer of module with method with two including types with one struct (2) codegens pointer of module with method with two including types with one struct (2) - codegens pointer of module with method with two including types codegens pointer of module with method with two including types - casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) - expands modules to its including types (3) (#1916) expands modules to its including types (3) (#1916) - can use generic module as instance variable type (2) can use generic module as instance variable type (2) - codegens pointer of module with method with two including types with one struct codegens pointer of module with method with two including types with one struct - invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) - codegens cast to module with class and struct to nilable module codegens cast to module with class and struct to nilable module - declares and includes generic module, in macros T is a tuple literal declares and includes generic module, in macros T is a tuple literal - can use generic module as instance variable type can use generic module as instance variable type - codegens dispatch of union with module (#3647) codegens dispatch of union with module (#3647) - codegens proc of module when generic type includes it codegens proc of module when generic type includes it - codegens proc of a module that was never included codegens proc of a module that was never included - codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block - codegens pointer of module and pass value to method codegens pointer of module and pass value to method - declares proc with module type declares proc with module type - codegens pointer of module with method codegens pointer of module with method - expands modules to its including types (2) (#1916) expands modules to its including types (2) (#1916) -Code gen: array literal spec - creates custom generic array with type var creates custom generic array with type var - creates custom non-generic array creates custom non-generic array - creates custom generic array, with splats creates custom generic array, with splats - creates custom generic array in module (#5684) creates custom generic array in module (#5684) - creates custom generic array via alias (2) creates custom generic array via alias (2) - creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array - creates custom generic array creates custom generic array - creates custom non-generic array in module creates custom non-generic array in module - creates custom non-generic array, with splats creates custom non-generic array, with splats - creates custom non-generic array in nested module creates custom non-generic array in nested module - creates custom generic array via alias creates custom generic array via alias - assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works - assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works -Lexer: location - stores column numbers stores column numbers - locations in same files are comparable based on line locations in same files are comparable based on line - pushes and pops its location pushes and pops its location - assigns correct loc location to node assigns correct loc location to node - uses two consecutive loc pragma uses two consecutive loc pragma - locations with virtual files should be comparable locations with virtual files should be comparable - overrides location with pragma overrides location with pragma - parses var/call right after loc (#491) parses var/call right after loc (#491) - stores line numbers stores line numbers - locations in different files have no order locations in different files have no order - Location.parse - raises ArgumentError if line number is invalid raises ArgumentError if line number is invalid - raises ArgumentError if missing colon raises ArgumentError if missing colon - raises ArgumentError if column number is invalid raises ArgumentError if column number is invalid - raises ArgumentError if missing part raises ArgumentError if missing part - parses location from string parses location from string + interprets constant literal interprets constant literal +Semantic: NoReturn + computes NoReturn in a lazy way inside if then (#314) (4) computes NoReturn in a lazy way inside if then (#314) (4) + computes NoReturn in a lazy way inside if then (#314) (3) computes NoReturn in a lazy way inside if then (#314) (3) + computes NoReturn in a lazy way inside if else (#314) (3) computes NoReturn in a lazy way inside if else (#314) (3) + computes NoReturn in a lazy way inside if else (#314) (4) computes NoReturn in a lazy way inside if else (#314) (4) + computes NoReturn in a lazy way inside if else (#314) (1) computes NoReturn in a lazy way inside if else (#314) (1) + types call to LibC.exit as NoReturn types call to LibC.exit as NoReturn + computes NoReturn in a lazy way inside if then (#314) (2) computes NoReturn in a lazy way inside if then (#314) (2) + computes NoReturn in a lazy way inside if then (#314) (1) computes NoReturn in a lazy way inside if then (#314) (1) + computes NoReturn in a lazy way inside if else (#314) (2) computes NoReturn in a lazy way inside if else (#314) (2) + types exception handler as NoReturn if ensure is NoReturn types exception handler as NoReturn if ensure is NoReturn + types union of NoReturns types union of NoReturns + computes NoReturn in a lazy way inside if else (#314) (5) computes NoReturn in a lazy way inside if else (#314) (5) + types with no return even if code follows types with no return even if code follows + types union of NoReturn and something else types union of NoReturn and something else + types raise as NoReturn types raise as NoReturn + computes NoReturn in a lazy way inside if then (#314) (5) computes NoReturn in a lazy way inside if then (#314) (5) + types as NoReturn even if Nil return type is forced (#3096) types as NoReturn even if Nil return type is forced (#3096) + types as NoReturn if typeof(exp)'s exp is NoReturn types as NoReturn if typeof(exp)'s exp is NoReturn + assumes if condition's type filters when else is no return assumes if condition's type filters when else is no return +Semantic: lib + types lib var get with forward declaration types lib var get with forward declaration + errors if invoking to_i32! and got error in that call errors if invoking to_i32! and got error in that call + warns if @[Link(static: true)] is specified warns if @[Link(static: true)] is specified + can use macros inside lib can use macros inside lib + errors if CallConvention argument is not a valid string errors if CallConvention argument is not a valid string + errors if lib fun call is part of dispatch errors if lib fun call is part of dispatch + errors if second argument is not a string errors if second argument is not a string + error if passing non primitive type as varargs invoking to_unsafe error if passing non primitive type as varargs invoking to_unsafe + errors if lib already specified with positional argument errors if lib already specified with positional argument + errors if lib named arg is not a String errors if lib named arg is not a String + errors if dll argument does not end with '.dll' errors if dll argument does not end with '.dll' + errors if using out with non-pointer errors if using out with non-pointer + errors if defining incompatible funs with the same name in the same lib (#3045) errors if defining incompatible funs with the same name in the same lib (#3045) + passes float as another integer type in variable passes float as another integer type in variable + types fun returning nothing as nil types fun returning nothing as nil + reopens lib and adds more link annotations reopens lib and adds more link annotations + specifies a call convention to a lib specifies a call convention to a lib + errors if first argument is not a string errors if first argument is not a string + errors if defines def on lib errors if defines def on lib + reports error on struct field type not primitive like reports error on struct field type not primitive like + reports error on fun return type not primitive like reports error on fun return type not primitive like + defines lib funs before funs with body defines lib funs before funs with body + errors if assigning void lib call to var (#4414) errors if assigning void lib call to var (#4414) + errors if unknown named arg errors if unknown named arg + errors if using void as parameter (related to #508) errors if using void as parameter (related to #508) + errors if redefining fun with different signature (#2468) errors if redefining fun with different signature (#2468) + overrides definition of fun overrides definition of fun + errors if dll argument contains directory separators errors if dll argument contains directory separators + raises wrong number of arguments raises wrong number of arguments + reports error on fun argument type not primitive like reports error on fun argument type not primitive like + reports redefinition of fun with different signature reports redefinition of fun with different signature + errors if using void via typedef as parameter (related to #508) errors if using void via typedef as parameter (related to #508) + errors if passing void lib call to call argument (#4414) errors if passing void lib call to call argument (#4414) + specifies a call convention specifies a call convention + raises on undefined fun raises on undefined fun + errors if using named args with variadic function errors if using named args with variadic function + errors if too many link arguments errors if too many link arguments + errors if parameter already specified errors if parameter already specified + clears annotations after lib clears annotations after lib + reports error out can only be used with lib funs in named argument reports error out can only be used with lib funs in named argument + can use tuple as fun return can use tuple as fun return + error if passing type to LibC with to_unsafe but type doesn't match error if passing type to LibC with to_unsafe but type doesn't match + allows dll argument allows dll argument + raises wrong argument type raises wrong argument type + errors if using out with void pointer (#2424) errors if using out with void pointer (#2424) + warns if Link annotations use positional arguments warns if Link annotations use positional arguments + can use named args can use named args + supports forward references with struct inside struct (#399) supports forward references with struct inside struct (#399) + errors if third argument is not a bool errors if third argument is not a bool + correctly attached link flags if there's a macro if correctly attached link flags if there's a macro if + types a varargs external types a varargs external + allows invoking out with underscore allows invoking out with underscore + reports error if using out with an already declared variable reports error if using out with an already declared variable + types fun returning void as nil types fun returning void as nil + errors if using unknown named param errors if using unknown named param + allows passing splat to LibC fun allows passing splat to LibC fun + errors if using out with varargs errors if using out with varargs + types fun returning nil as nil types fun returning nil as nil + types lib var get types lib var get + reopens lib and adds same link annotations reopens lib and adds same link annotations + error if passing non primitive type as varargs error if passing non primitive type as varargs + supports forward references (#399) supports forward references (#399) + reports error when changing instance var type and something breaks reports error when changing instance var type and something breaks + passes int as another integer type in variable passes int as another integer type in variable + errors if CallConvention argument is not a string errors if CallConvention argument is not a string + errors if defining incompatible funs with the same name in different libs (#3045) errors if defining incompatible funs with the same name in different libs (#3045) + can list lib functions at the top level (#12395) can list lib functions at the top level (#12395) + errors if invoking to_i32! and got wrong type errors if invoking to_i32! and got wrong type + passes int as another integer type with literal passes int as another integer type with literal + disallows passing nil or pointer to arg expecting pointer disallows passing nil or pointer to arg expecting pointer + reports error out can only be used with lib funs reports error out can only be used with lib funs + types lib var set types lib var set + errors if missing link arguments errors if missing link arguments + gathers link annotations from macro expression gathers link annotations from macro expression + reports error when changing var type and something breaks reports error when changing var type and something breaks + errors if missing argument errors if missing argument + can use macros inside struct can use macros inside struct + doesn't try to invoke unsafe for c struct/union (#1362) doesn't try to invoke unsafe for c struct/union (#1362) + allows invoking lib call without obj inside lib allows invoking lib call without obj inside lib + can use out with named args can use out with named args + reports error on typedef type not primitive like reports error on typedef type not primitive like + reports error on fun argument type not primitive like, Nil (#2994) reports error on fun argument type not primitive like, Nil (#2994) + errors if wrong number of arguments for CallConvention errors if wrong number of arguments for CallConvention + defined fun with aliased type defined fun with aliased type + allows passing double splat to LibC fun allows passing double splat to LibC fun + errors if missing arguments errors if missing arguments + errors if using out with void pointer through type errors if using out with void pointer through type + errors if fourth argument is not a bool errors if fourth argument is not a bool +Crystal::Command::FormatCommand + formats stdin (bug) formats stdin (bug) + checks files format (ok) checks files format (ok) + formats files (dir) formats files (dir) + formats files formats files + checks files format (excludes) checks files format (excludes) + formats files (bug + show-stacktrace) formats files (bug + show-stacktrace) + checks files format (excludes + includes) checks files format (excludes + includes) + formats stdin (formatted) formats stdin (formatted) + formats stdin (syntax error) formats stdin (syntax error) + formats stdin (bug + show-backtrace) formats stdin (bug + show-backtrace) + formats files (error) formats files (error) + formats files (bug) formats files (bug) + checks files format checks files format + formats stdin formats stdin + formats stdin (invalid byte sequence error) formats stdin (invalid byte sequence error) Crystal::Config .linux_runtime_libc .linux_runtime_libc .host_target .host_target -Code gen: experimental - errors if missing link arguments errors if missing link arguments - compiles with no argument compiles with no argument - compiles with single string argument compiles with single string argument - errors if too many arguments errors if too many arguments - errors if invalid argument type errors if invalid argument type -immutability of returned container literals (#10818) - StringInterpolation#expressions StringInterpolation#expressions - Generic#type_vars Generic#type_vars - When#conds When#conds - Annotation#args Annotation#args - MultiAssign#values MultiAssign#values - MultiAssign#targets MultiAssign#targets - ProcNotation#inputs ProcNotation#inputs - Union#types Union#types - ProcPointer#args ProcPointer#args -Code gen: var - works with typeof with assignment (#828) works with typeof with assignment (#828) - codegens var codegens var - codegens bug with union of int, nil and string (2): assigning nil to union must fill all zeros codegens bug with union of int, nil and string (2): assigning nil to union must fill all zeros - codegens bug with union of int, nil and string (1): assigning nil to union must fill all zeros codegens bug with union of int, nil and string (1): assigning nil to union must fill all zeros - codegens var with type declaration codegens var with type declaration - codegens ivar assignment when not-nil type filter applies codegens ivar assignment when not-nil type filter applies - codegens bug with var, while, if, break and ssa codegens bug with var, while, if, break and ssa - assigns to underscore assigns to underscore - codegens assignment that can never be reached codegens assignment that can never be reached - codegens bug with instance vars and ssa codegens bug with instance vars and ssa -Semantic: struct - types struct getter with keyword name types struct getter with keyword name - errors if invoking to_i32! and got wrong type errors if invoking to_i32! and got wrong type - allows inline forward declaration allows inline forward declaration - errors if invoking to_i32! and got error in that call errors if invoking to_i32! and got error in that call - errors if already defined with another type errors if already defined with another type - can access instance var from the outside (#1092) can access instance var from the outside (#1092) - errors on struct if no field errors on struct if no field - types Struct#new types Struct#new - errors on struct setter if different type via new errors on struct setter if different type via new - supports macro if inside struct supports macro if inside struct - types struct getter on pointer type types struct getter on pointer type - types struct getter types struct getter - errors if includes and field already exists, the other way around errors if includes and field already exists, the other way around - types struct getter to struct types struct getter to struct - errors if includes and field already exists errors if includes and field already exists - includes another struct includes another struct - types struct types struct - errors if using void in struct field type errors if using void in struct field type - errors if invoking to_unsafe and got different type errors if invoking to_unsafe and got different type - automatically converts numeric type in struct field assignment automatically converts numeric type in struct field assignment - errors if already defined with another type (2) errors if already defined with another type (2) - errors if invoking to_unsafe and got error in that call errors if invoking to_unsafe and got error in that call - marks as packed marks as packed - errors if using void via typedef in struct field type errors if using void via typedef in struct field type - types struct getter multiple levels via new types struct getter multiple levels via new - errors if setting closure errors if setting closure - types struct setter types struct setter - errors if includes unknown type errors if includes unknown type - errors if already defined errors if already defined - errors on struct setter if different type errors on struct setter if different type - errors on empty c struct (#633) errors on empty c struct (#633) - errors if includes non-cstruct type errors if includes non-cstruct type -Normalize: proc pointer - normalizes proc pointer with variable receiver normalizes proc pointer with variable receiver - normalizes proc pointer with ivar receiver normalizes proc pointer with ivar receiver - normalizes proc pointer with const receiver normalizes proc pointer with const receiver - normalizes proc pointer with parameters, without object normalizes proc pointer with parameters, without object - normalizes proc pointer of global call normalizes proc pointer of global call - normalizes proc pointer without object normalizes proc pointer without object - normalizes proc pointer with cvar receiver normalizes proc pointer with cvar receiver - normalizes proc pointer with global const receiver normalizes proc pointer with global const receiver +Code gen: block + return from block called from dispatch return from block called from dispatch + allows modifying yielded value (with variable) allows modifying yielded value (with variable) + dispatches with captured and non-captured block (#3969) dispatches with captured and non-captured block (#3969) + yields more exps than block arg, through splat yields more exps than block arg, through splat + breaks from while in function called from block breaks from while in function called from block + codegens call with block with call with arg that yields codegens call with block with call with arg that yields + doesn't crash on yield exp without a type (#8100) doesn't crash on yield exp without a type (#8100) + doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s + codegens block with union with return codegens block with union with return + nested yields nested yields + allow return from function called from yielder function allow return from function called from yielder function + break without value returns nil break without value returns nil + union value of yielder function union value of yielder function + pass self to yielder function pass self to yielder function + unpacks tuple but doesn't override local variables unpacks tuple but doesn't override local variables + block with nilable type 2 block with nilable type 2 + doesn't codegen after while that always yields and breaks doesn't codegen after while that always yields and breaks + call block from dispatch call block from dispatch + yields inside yield (#682) yields inside yield (#682) + codegens block bug with conditional next and unconditional break (1) codegens block bug with conditional next and unconditional break (1) + return from block that always returns from function that always yields inside if block return from block that always returns from function that always yields inside if block + it yields nil from another call it yields nil from another call + break from block returns from yielder break from block returns from yielder + returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value + allows yield from dispatch call allows yield from dispatch call + codegens call with blocks of different type without args codegens call with blocks of different type without args + passes yield arguments passes yield arguments + codegens if with call with block (ssa issue) codegens if with call with block (ssa issue) + can break without value from yielder that returns nilable (2) can break without value from yielder that returns nilable (2) + codegens block with union arg (2) codegens block with union arg (2) + uses block var with same name as local var uses block var with same name as local var + codegens captured block that returns union, but proc only returns a single type codegens captured block that returns union, but proc only returns a single type + break with value from yielder that returns a nilable break with value from yielder that returns a nilable + codegens block bug with conditional next and unconditional break (2) codegens block bug with conditional next and unconditional break (2) + does next from captured block does next from captured block + codegens block bug with conditional next and unconditional break (3) codegens block bug with conditional next and unconditional break (3) + return from yielder function (2) return from yielder function (2) + pass self and arguments to yielder function pass self and arguments to yielder function + pass arguments to yielder function pass arguments to yielder function + executes yield expression if no arg is given for block executes yield expression if no arg is given for block + can call methods from block when yielder is an instance method can call methods from block when yielder is an instance method + break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while + return from block return from block + nexts in var assignment (#3364) nexts in var assignment (#3364) + (bug) doesn't set needs_value to true on every yield (#12442) (bug) doesn't set needs_value to true on every yield (#12442) + call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars + uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) + codegens block call when argument type changes codegens block call when argument type changes + allows initialize with yield (#224) allows initialize with yield (#224) + codegens block which always breaks but never enters (#494) codegens block which always breaks but never enters (#494) + codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) + can use self inside a block called from dispatch can use self inside a block called from dispatch + codegens block with nilable type with return (1) codegens block with nilable type with return (1) + returns void when called with block returns void when called with block + can access instance vars from yielder function can access instance vars from yielder function + can use global constant can use global constant + breaks in var assignment (#3364) breaks in var assignment (#3364) + uses splat in block argument uses splat in block argument + clears nilable var before inlining block method (#10087) clears nilable var before inlining block method (#10087) + assigns yield to argument assigns yield to argument + codegens block with return and yield and no return codegens block with return and yield and no return + allows using var as block arg with outer var allows using var as block arg with outer var + returns from proc literal returns from proc literal + codegens method invocation on a object of a captured block with a type that was never instantiated codegens method invocation on a object of a captured block with a type that was never instantiated + can use instance methods from yielder function can use instance methods from yielder function + codegens nested break codegens nested break + codegens method invocation on a object of a captured block with a type that was never instantiated (2) codegens method invocation on a object of a captured block with a type that was never instantiated (2) + uses block splat argument with union types uses block splat argument with union types + codegens bug with yield not_nil! that is never not nil codegens bug with yield not_nil! that is never not nil + + break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value + break from block with value break from block with value + codegens block with repeated underscore and different types (#4711) codegens block with repeated underscore and different types (#4711) + uses splat in block argument, many args uses splat in block argument, many args + allows access to local variables allows access to local variables + codegens block with virtual type arg codegens block with virtual type arg + block with nilable type block with nilable type + return from block that always returns from function that conditionally yields return from block that always returns from function that conditionally yields + generate inline generate inline + codegens block bug with conditional next and unconditional break (4) codegens block bug with conditional next and unconditional break (4) + codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) + codegens while/break inside block codegens while/break inside block + codegens bug with block and arg and var codegens bug with block and arg and var + doesn't codegen call if arg yields and always breaks doesn't codegen call if arg yields and always breaks + codegens captured block with next inside yielded block (#2097) codegens captured block with next inside yielded block (#2097) + yields splat yields splat + allows modifying yielded value (with literal) allows modifying yielded value (with literal) + doesn't crash if yield exp has no type (#12670) doesn't crash if yield exp has no type (#12670) + codegens nested return codegens nested return + can break without value from yielder that returns nilable (1) can break without value from yielder that returns nilable (1) + codegens block with union arg (1) codegens block with union arg (1) + return from yielder function return from yielder function + codegens block with nilable type with return (2) codegens block with nilable type with return (2) + codegens block with multiple underscores (#3054) codegens block with multiple underscores (#3054) + auto-unpacks tuple auto-unpacks tuple + can set instance vars from yielder function can set instance vars from yielder function Normalize: string interpolation - replaces string constant that results from macro expansion replaces string constant that results from macro expansion + replaces string constant replaces string constant + normalizes string interpolation with multiple lines normalizes string interpolation with multiple lines normalizes heredoc normalizes heredoc normalizes string interpolation normalizes string interpolation + replaces string constant that results from macro expansion replaces string constant that results from macro expansion replaces through multiple levels replaces through multiple levels - replaces string constant replaces string constant - normalizes string interpolation with multiple lines normalizes string interpolation with multiple lines -Semantic: class - doesn't lookup type in parents' namespaces, and lookups and in program doesn't lookup type in parents' namespaces, and lookups and in program - errors if assigning superclass to declared instance var errors if assigning superclass to declared instance var - types recursive type types recursive type - errors if reopening generic class with different type vars (2) errors if reopening generic class with different type vars (2) - reads an object instance var reads an object instance var - correctly types #680 correctly types #680 - does automatic inference of new for generic types does automatic inference of new for generic types - correctly types #680 (2) correctly types #680 (2) - errors when creating Value errors when creating Value - reports can't instantiate abstract class on new reports can't instantiate abstract class on new - inherits self (#2890) inherits self (#2890) - says wrong number of arguments for abstract class new (2) says wrong number of arguments for abstract class new (2) - errors if reopening non-generic class as generic errors if reopening non-generic class as generic - does automatic type inference of new for generic types 2 does automatic type inference of new for generic types 2 - errors if reopening generic class with different type vars errors if reopening generic class with different type vars - allows using self in class scope allows using self in class scope - finds in global scope if includes module finds in global scope if includes module - doesn't crash on instance variable assigned a proc, and never instantiated (#923) doesn't crash on instance variable assigned a proc, and never instantiated (#923) - errors if reopening generic class with different splat index (3) errors if reopening generic class with different splat index (3) - hoists instance variable initializer hoists instance variable initializer - inherits self twice (#5495) inherits self twice (#5495) - says that instance vars are not allowed in metaclass says that instance vars are not allowed in metaclass - allows declaring a variable in an initialize and using it allows declaring a variable in an initialize and using it - types class and subclass as one type types class and subclass as one type - reports uninitialized constant reports uninitialized constant - errors if inherits from metaclass errors if inherits from metaclass - says no overload matches for class new says no overload matches for class new - types bug #168 (it inherits instance var even if not mentioned in initialize) types bug #168 (it inherits instance var even if not mentioned in initialize) - types type var union types type var union - can mark initialize as private can mark initialize as private - types class and subclass as one type types class and subclass as one type - reports undefined instance method reports undefined instance method - does automatic type inference of new for nested generic type does automatic type inference of new for nested generic type - reports can't instantiate abstract class on allocate reports can't instantiate abstract class on allocate - can't reopen as struct can't reopen as struct - reports undefined method when method inside a class reports undefined method when method inside a class - doesn't use initialize from base class doesn't use initialize from base class - uses self as type var uses self as type var - errors on no method found on abstract class, class method (#2241) errors on no method found on abstract class, class method (#2241) - types as no return if calling method on abstract class with all abstract subclasses (#6996) types as no return if calling method on abstract class with all abstract subclasses (#6996) - errors if inheriting Gen(self) and there's no self (#2890) errors if inheriting Gen(self) and there's no self (#2890) - uses self as type var uses self as type var - errors if using read-instance-var with non-typed variable errors if using read-instance-var with non-typed variable - doesn't mix classes on definition (#2352) doesn't mix classes on definition (#2352) - says wrong number of arguments for abstract class new says wrong number of arguments for abstract class new - types instance variable on getter types instance variable on getter - can invoke method on abstract generic type with subclasses but no instances can invoke method on abstract generic type with subclasses but no instances - errors if reading non-existent ivar errors if reading non-existent ivar - doesn't use initialize from base class with virtual type doesn't use initialize from base class with virtual type - types class inside class types class inside class - errors if reopening generic class with different splat index (2) errors if reopening generic class with different splat index (2) - types virtual method of generic class types virtual method of generic class - errors if reopening generic class with different splat index errors if reopening generic class with different splat index - types as no return if calling method on abstract generic class (#6996) types as no return if calling method on abstract generic class (#6996) - inherits Gen(self) (#2890) inherits Gen(self) (#2890) - types as no return if calling method on abstract class with generic subclasses but no instances (#6996) types as no return if calling method on abstract class with generic subclasses but no instances (#6996) - can invoke method on abstract type without subclasses nor instances can invoke method on abstract type without subclasses nor instances - doesn't mark instance variable as nilable if calling another initialize doesn't mark instance variable as nilable if calling another initialize - uses number type var in class method uses number type var in class method - errors when creating Number errors when creating Number - types generic of generic type types generic of generic type - doesn't lookup new in supermetaclass doesn't lookup new in supermetaclass - allows instantiating generic class with number allows instantiating generic class with number - errors if reading ivar from non-ivar container errors if reading ivar from non-ivar container - preserves order of instance vars (#3050) preserves order of instance vars (#3050) - types as no return if calling method on generic class with subclasses (#6996) types as no return if calling method on generic class with subclasses (#6996) - doesn't error on new on abstract virtual type class doesn't error on new on abstract virtual type class - doesn't crash with top-level initialize (#2601) doesn't crash with top-level initialize (#2601) - type def does not reopen type from parent namespace (#11181) type def does not reopen type from parent namespace (#11181) - types instance variable types instance variable - types instance variable types instance variable - types self inside method call without obj types self inside method call without obj - reports wrong number of arguments for initialize reports wrong number of arguments for initialize - reads an object instance var from a union type reads an object instance var from a union type - errors if inherits from module errors if inherits from module - types class and subclass as one type types class and subclass as one type - types Const#new#method types Const#new#method - can't reopen as module can't reopen as module - can invoke method on abstract generic type without subclasses nor instances can invoke method on abstract generic type without subclasses nor instances - errors when wrong arguments for new errors when wrong arguments for new - errors if using underscore in generic class errors if using underscore in generic class - reports superclass mismatch reports superclass mismatch - errors if declares class inside if errors if declares class inside if - types Const#allocate types Const#allocate - can use short name for top-level type can use short name for top-level type - infers generic type after instance was created with explicit type infers generic type after instance was created with explicit type - can't use implicit initialize if defined in parent can't use implicit initialize if defined in parent - allows defining classes inside modules or classes with :: allows defining classes inside modules or classes with :: - types Const#new types Const#new - reports unknown class when extending reports unknown class when extending - errors if creating instance before typing instance variable errors if creating instance before typing instance variable - reads a virtual type instance var reads a virtual type instance var -Code gen: method_missing - does method_missing macro with block but not using it does method_missing macro with block but not using it - does method_missing macro with included module does method_missing macro with included module - 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 - does method_missing macro with block does method_missing macro with block - 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 with assignment (bug) does method_missing with assignment (bug) - does method_missing macro without args (with call) does method_missing macro without args (with call) - does method_missing macro with module involved does method_missing macro with module involved - does method_missing macro with args (with call) does method_missing macro with args (with call) - works with named arguments (#3654) works with named arguments (#3654) - does method_missing macro with virtual type (1) does method_missing macro with virtual type (1) - works with named arguments that aren't legal variable names (#10381) works with named arguments that aren't legal variable names (#10381) - forwards forwards - does method_missing macro with top level method involved does method_missing macro with top level method involved - does method_missing generating method does method_missing generating method - does method_missing macro with virtual type (4) does method_missing macro with virtual type (4) - does method_missing macro with virtual type (3) does method_missing macro with virtual type (3) - does method_missing with assignment (2) (bug) does method_missing with assignment (2) (bug) - finds method_missing with 'with ... yield' finds method_missing with 'with ... yield' - does method_missing macro with virtual type (7) does method_missing macro with virtual type (7) - does method_missing macro with args does method_missing macro with args - does method_missing macro with virtual type (6) does method_missing macro with virtual type (6) -Semantic: struct - doesn't make virtual for Float doesn't make virtual for Float - can't extend struct from class can't extend struct from class - doesn't make virtual for Int doesn't make virtual for Int - doesn't make virtual for Struct doesn't make virtual for Struct - allows struct to participate in virtual allows struct to participate in virtual - can cast to base abstract struct can cast to base abstract struct - doesn't error if method is not found in abstract type doesn't error if method is not found in abstract type - types struct declaration types struct declaration - types generic struct declaration types generic struct declaration - can't reopen as class can't reopen as class - passes subtype check with generic module type on virtual type passes subtype check with generic module type on virtual type - errors if defining finalize for struct (#3840) errors if defining finalize for struct (#3840) - can't extend struct from non-abstract struct can't extend struct from non-abstract struct - can't be nilable can't be nilable - can't extend class from struct can't extend class from struct - passes subtype check with generic module type on virtual type (2) (#10302) passes subtype check with generic module type on virtual type (2) (#10302) - doesn't make virtual for Value doesn't make virtual for Value - can't reopen as module can't reopen as module - passes subtype check with generic module type on virtual type (3) passes subtype check with generic module type on virtual type (3) - unifies type to virtual type unifies type to virtual type +codegen: previous_def + codegens previous def when inside fun and forwards args codegens previous def when inside fun and forwards args + codegens previous def codegens previous def + codegens previous def when inside fun with self codegens previous def when inside fun with self + correctly passes named arguments correctly passes named arguments +Normalize: expressions + normalizes expressions with begin/end normalizes expressions with begin/end + normalizes an empty expression with begin/end normalizes an empty expression with begin/end + normalizes an expression normalizes an expression +Crystal::Repl::Interpreter + alignof + interprets alignof typeof interprets alignof typeof + instance_alignof + interprets instance_alignof typeof interprets instance_alignof typeof + instance_sizeof + interprets instance_sizeof typeof interprets instance_sizeof typeof + sizeof + interprets sizeof typeof interprets sizeof typeof +Crystal::Command + clear_cache + clears any cached compiler files clears any cached compiler files +Semantic: const + doesn't errors if constant depends on another one defined later through method, but constant is simple ('a') doesn't errors if constant depends on another one defined later through method, but constant is simple ('a') + errors if can't infer constant type (#3240, #3948) errors if can't infer constant type (#3240, #3948) + types a nested type with same name types a nested type with same name + doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED // 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED // 2) + finds current type only for first path item (1) finds current type only for first path item (1) + errors if using constant as generic type (#3240) errors if using constant as generic type (#3240) + doesn't errors if constant depends on another one defined later through method, but constant is simple (~ 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (~ 2) + doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + ZED) doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + ZED) + errors if using return inside constant value (#5391) errors if using return inside constant value (#5391) + types a constant reference types a constant reference + doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + 2) + doesn't errors if constant depends on another one defined later through method, but constant is simple (1 &+ ZED) doesn't errors if constant depends on another one defined later through method, but constant is simple (1 &+ ZED) + finds current type first finds current type first + can use constant defined later (#2906) can use constant defined later (#2906) + doesn't count parent types as current type doesn't count parent types as current type + doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &* 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &* 2) + finds constant in class that extends class (#205) finds constant in class that extends class (#205) + types a constant types a constant + doesn't errors if constant depends on another one defined later through method, but constant is simple ("foo") doesn't errors if constant depends on another one defined later through method, but constant is simple ("foo") + finds current type only for first path item (2) finds current type only for first path item (2) + doesn't error if using c enum doesn't error if using c enum + creates container module if not exist when using Path creates container module if not exist when using Path + types a nested constant using Path types a nested constant using Path + doesn't errors if constant depends on another one defined later through method, but constant is simple (true) doesn't errors if constant depends on another one defined later through method, but constant is simple (true) + doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED * 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED * 2) + types a global constant reference in method types a global constant reference in method + keeps type of container when using Path keeps type of container when using Path + types a nested constant types a nested constant + doesn't errors if constant depends on another one defined later through method, but constant is simple (- 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (- 2) + errors if using const in var declaration errors if using const in var declaration + doesn't errors if constant depends on another one defined later through method, but constant is simple (nil) doesn't errors if constant depends on another one defined later through method, but constant is simple (nil) + doesn't share variables with global scope doesn't share variables with global scope + errors if using const in uninitialized errors if using const in uninitialized + finds constant in module that includes module (#205) finds constant in module that includes module (#205) + doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &- 1) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &- 1) + types a global constant reference in static method types a global constant reference in static method + errors if constant has NoReturn type (#6139) errors if constant has NoReturn type (#6139) + errors if using const in restriction errors if using const in restriction + finds const from restriction finds const from restriction + types a constant using Path types a constant using Path + errors if using const in type declaration errors if using const in type declaration + doesn't errors if constant depends on another one defined later through method, but constant is simple (1) doesn't errors if constant depends on another one defined later through method, but constant is simple (1) + types a constant inside a def types a constant inside a def + finds current type before parents (#4086) finds current type before parents (#4086) + errors on dynamic constant assignment inside block errors on dynamic constant assignment inside block + errors if using const in proc notation parameter type errors if using const in proc notation parameter type + errors on dynamic constant assignment inside if errors on dynamic constant assignment inside if + errors if using const in proc notation return type errors if using const in proc notation return type + doesn't errors if constant depends on another one defined later through method, but constant is simple (+ 1) doesn't errors if constant depends on another one defined later through method, but constant is simple (+ 1) + finds nearest constant first finds nearest constant first + doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED - 1) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED - 1) + doesn't crash with const used in initialize (bug) doesn't crash with const used in initialize (bug) Parser - parses "property until : Int32" parses "property until : Int32" - parses "property typeof : Int32" parses "property typeof : Int32" - parses "def >; end;" parses "def >; end;" - says syntax error on "next - 1" says syntax error on "next - 1" - parses "foo.& 1, 2" parses "foo.& 1, 2" + parses "foo(a: n >> 2)" parses "foo(a: n >> 2)" + parses "def ===(*args, **opts, &); end" parses "def ===(*args, **opts, &); end" + parses "asm(\"nop\" ::::)" parses "asm(\"nop\" ::::)" + parses "module : Int32" parses "module : Int32" + parses "lib LibC; enum Foo; A\nB; C\nD = 1; end end" parses "lib LibC; enum Foo; A\nB; C\nD = 1; end end" + parses "break {1 => 2}" parses "break {1 => 2}" + parses "->foo(Void*)" parses "->foo(Void*)" + parses "a : Foo" parses "a : Foo" + parses "def foo(@@begin); end" parses "def foo(@@begin); end" + parses "foo(a: n % 2)" parses "foo(a: n % 2)" + parses "foo.|" parses "foo.|" + parses "class Foo(T1); end" parses "class Foo(T1); end" + parses "{% begin %}%Q{ %s }{% end %}" parses "{% begin %}%Q{ %s }{% end %}" + says syntax error on "foo **bar, *x" says syntax error on "foo **bar, *x" + says syntax error on "b! = 1" says syntax error on "b! = 1" + parses "@foo/2" parses "@foo/2" + says syntax error on "break & 1" says syntax error on "break & 1" + parses "def self.<=(); end;" parses "def self.<=(); end;" + parses "foo.is_a?(Foo | Bar)" parses "foo.is_a?(Foo | Bar)" + parses "property true : Int32" parses "property true : Int32" + says syntax error on "{1 => 2 3 => 4}" says syntax error on "{1 => 2 3 => 4}" + parses "foo[1] /2" parses "foo[1] /2" + says syntax error on "case 1\nin 1; 2" says syntax error on "case 1\nin 1; 2" + says syntax error on "1 unless next" says syntax error on "1 unless next" + parses "def self.+(); end;" parses "def self.+(); end;" + says syntax error on "def foo(var : Foo+); end" says syntax error on "def foo(var : Foo+); end" + parses "begin : Int32" parses "begin : Int32" + parses "_, _ = 1, 2" parses "_, _ = 1, 2" + parses "def foo(@struct); end" parses "def foo(@struct); end" + parses "{foo:'a', bar:'b'}" parses "{foo:'a', bar:'b'}" + parses "1 < 2" parses "1 < 2" + parses "def foo(@@with); end" parses "def foo(@@with); end" + parses "1.[](2)" parses "1.[](2)" + parses "foo(n * 2)" parses "foo(n * 2)" + parses "<<-HERE1; <<-HERE2\nHERE1\nhere2\nHERE2" parses "<<-HERE1; <<-HERE2\nHERE1\nhere2\nHERE2" + parses "macro foo(x)\n 1 + 2; end" parses "macro foo(x)\n 1 + 2; end" + parses "{[] of Foo, Bar::Baz.new}" parses "{[] of Foo, Bar::Baz.new}" + says syntax error on "next[0]= 1" says syntax error on "next[0]= 1" + says syntax error on "def foo(foo true); end" says syntax error on "def foo(foo true); end" + parses "def foo(x : U) forall T, U; end" parses "def foo(x : U) forall T, U; end" + parses "def foo(x, *, y, &); 1; end" parses "def foo(x, *, y, &); 1; end" says syntax error on "def foo(unless); end" says syntax error on "def foo(unless); end" - parses "def self.^(); end;" parses "def self.^(); end;" - says syntax error on "return // 1" says syntax error on "return // 1" - parses "def foo(x @lib); end" parses "def foo(x @lib); end" - parses "x = 1; foo x do\nend" parses "x = 1; foo x do\nend" - parses "def foo(x @typeof); end" parses "def foo(x @typeof); end" - parses "def foo(@next); end" parses "def foo(@next); end" - parses ":==" parses ":==" - parses "foo = 1; ->foo.<<(Int32)" parses "foo = 1; ->foo.<<(Int32)" - parses "1\n-2" parses "1\n-2" - says syntax error on "foo { |instance_sizeof| }" says syntax error on "foo { |instance_sizeof| }" - parses "foo 1, a: 1, b: 2\n1" parses "foo 1, a: 1, b: 2\n1" - parses "private : Int32" parses "private : Int32" - parses "a.b >>=\n1" parses "a.b >>=\n1" - parses "def foo(nil foo); end" parses "def foo(nil foo); end" - parses "%Q{hello \\n world}" parses "%Q{hello \\n world}" - parses "def foo(enum foo); end" parses "def foo(enum foo); end" - parses "property next : Int32" parses "property next : Int32" - parses "foo(a: n <= 2)" parses "foo(a: n <= 2)" - parses "def foo(struct foo); end" parses "def foo(struct foo); end" - parses "Foo({->})" parses "Foo({->})" - says syntax error on "a.b() += 1" says syntax error on "a.b() += 1" - parses "1 == 2 == 3 == 4" parses "1 == 2 == 3 == 4" - says syntax error on "foo { |(while)| }" says syntax error on "foo { |(while)| }" - says syntax error on "def foo(foo private); end" says syntax error on "def foo(foo private); end" - parses "macro [];end" parses "macro [];end" - parses "a.b &-=\n1" parses "a.b &-=\n1" - parses "foo(z: 0, a: n ^ 2)" parses "foo(z: 0, a: n ^ 2)" - parses "def foo(x @@asm); end" parses "def foo(x @@asm); end" - says syntax error on "macro foo" says syntax error on "macro foo" - says syntax error on "macro responds_to?; end" says syntax error on "macro responds_to?; end" - says syntax error on "def foo(require); end" says syntax error on "def foo(require); end" + parses "a.b/2" parses "a.b/2" + parses "true" parses "true" + parses "def foo(var : Int); end" parses "def foo(var : Int); end" + parses "foo.[]= do end" parses "foo.[]= do end" + parses "foo.==" parses "foo.==" + parses "{% for x in y %}body{% end %}" parses "{% for x in y %}body{% end %}" + parses "def foo(@@lib); end" parses "def foo(@@lib); end" + says syntax error on "def foo(alias); end" says syntax error on "def foo(alias); end" + parses "foo.=== 1, 2" parses "foo.=== 1, 2" + parses "foo &.block" parses "foo &.block" + parses "n ^ 2" parses "n ^ 2" + parses "def foo; a = 1; x { a }; end" parses "def foo; a = 1; x { a }; end" + says syntax error on "def self.!; end" says syntax error on "def self.!; end" + parses "foo 1.bar do\nend" parses "foo 1.bar do\nend" + parses "foo = 1; ->foo.%(Int32)" parses "foo = 1; ->foo.%(Int32)" + parses "private def foo; end" parses "private def foo; end" + parses "class Foo(T); end" parses "class Foo(T); end" + parses "instance_sizeof(X)" parses "instance_sizeof(X)" + parses "case {1, 2}\nwhen {.foo, .bar}\n5\nend" parses "case {1, 2}\nwhen {.foo, .bar}\n5\nend" + parses "lib LibC; type A = B.class; end" parses "lib LibC; type A = B.class; end" + parses "def foo(x @abstract); end" parses "def foo(x @abstract); end" + parses "enum Foo; {% if 1 %}2{% end %}; end" parses "enum Foo; {% if 1 %}2{% end %}; end" + parses "1 ensure 2" parses "1 ensure 2" + parses "foo !false" parses "foo !false" + parses "true : Int32" parses "true : Int32" + says syntax error on "x++" says syntax error on "x++" + parses "break : Int32" parses "break : Int32" + says syntax error on "break | 1" says syntax error on "break | 1" + sets correct location of annotation in lib sets correct location of annotation in lib + says syntax error on "foo { |break| }" says syntax error on "foo { |break| }" + says syntax error on "break ? 1 : 2" says syntax error on "break ? 1 : 2" + says syntax error on "1 .. next" says syntax error on "1 .. next" + parses "n &** 2" parses "n &** 2" + says syntax error on "def foo(foo if); end" says syntax error on "def foo(foo if); end" + parses "foo(0, n << 2)" parses "foo(0, n << 2)" + parses "def foo(x @@pointerof); end" parses "def foo(x @@pointerof); end" + parses "def foo(@[Foo] &@block); end" parses "def foo(@[Foo] &@block); end" + says syntax error on "break === 1" says syntax error on "break === 1" + says syntax error on "foo[break]" says syntax error on "foo[break]" + parses "1" parses "1" + parses "def foo(x @@in); end" parses "def foo(x @@in); end" + says syntax error on "foo { |out| }" says syntax error on "foo { |out| }" + parses "a = 1; a ^= 1" parses "a = 1; a ^= 1" + parses "foo./(1, 2) { 3 }" parses "foo./(1, 2) { 3 }" + parses "alias Foo = Bar" parses "alias Foo = Bar" + parses "sizeof(\n Int32\n)" parses "sizeof(\n Int32\n)" + parses "foo(0, n < 2)" parses "foo(0, n < 2)" + says syntax error on "foo { |(with)| }" says syntax error on "foo { |(with)| }" + says syntax error on "def foo\nabstract\nend" says syntax error on "def foo\nabstract\nend" + parses "a = 1; a &&= 1" parses "a = 1; a &&= 1" + parses "foo.+" parses "foo.+" + parses "def foo(var : self.class); end" parses "def foo(var : self.class); end" + parses "def foo(while foo); end" parses "def foo(while foo); end" + parses "do : Int32" parses "do : Int32" + says syntax error on "def foo(foo fun); end" says syntax error on "def foo(foo fun); end" + parses "lib LibC; struct Foo; {{ 1 }}; end; end" parses "lib LibC; struct Foo; {{ 1 }}; end; end" + parses "alignof(\n Int32\n)" parses "alignof(\n Int32\n)" + parses "def foo(@@self); end" parses "def foo(@@self); end" + parses "foo &.as?(T)" parses "foo &.as?(T)" + says syntax error on "<<-HERE\n One\n wrong\n Zero\n HERE" says syntax error on "<<-HERE\n One\n wrong\n Zero\n HERE" + parses "@@a : Foo" parses "@@a : Foo" + parses "typeof(\n 1\n)" parses "typeof(\n 1\n)" + parses "case\nend" parses "case\nend" + says syntax error on "while break; end" says syntax error on "while break; end" + says syntax error on "foo { |select| }" says syntax error on "foo { |select| }" + parses "def foo\n1\nend" parses "def foo\n1\nend" + parses "if foo; 1; end" parses "if foo; 1; end" + parses "->Foo.[]=(Int32)" parses "->Foo.[]=(Int32)" + parses "macro foo;bar{% for x in y %}\\ \n body{% end %}\\ baz;end" parses "macro foo;bar{% for x in y %}\\ \n body{% end %}\\ baz;end" + parses "case 1\nwhen .responds_to?(:foo)\n2\nend" parses "case 1\nwhen .responds_to?(:foo)\n2\nend" + parses "T/1" parses "T/1" + says syntax error on "a.b, c.d() = 1" says syntax error on "a.b, c.d() = 1" + says syntax error on "next // 1" says syntax error on "next // 1" + parses "{{ //.options }}" parses "{{ //.options }}" + parses "begin; rescue; end" parses "begin; rescue; end" + parses "a = 1; a[2] &&= 3" parses "a = 1; a[2] &&= 3" + parses "{% begin %}%r<\\A>{% end %}" parses "{% begin %}%r<\\A>{% end %}" + parses "property yield : Int32" parses "property yield : Int32" + parses "def !=(*args, **opts); end" parses "def !=(*args, **opts); end" + says syntax error on "break == 1" says syntax error on "break == 1" + parses "{% if 1; 2; end %}" parses "{% if 1; 2; end %}" + parses "macro foo;end" parses "macro foo;end" + parses "nil" parses "nil" + parses "def self.**(); end;" parses "def self.**(); end;" + parses "{% begin %}%i{ %s }{% end %}" parses "{% begin %}%i{ %s }{% end %}" + says syntax error on "foo { |alias| }" says syntax error on "foo { |alias| }" + sets correct location of global path in class def sets correct location of global path in class def + says syntax error on "def foo(x : U) forall; end" says syntax error on "def foo(x : U) forall; end" + parses "def foo(@fun); end" parses "def foo(@fun); end" + parses "a = 1" parses "a = 1" + parses "->Foo.>=(Int32)" parses "->Foo.>=(Int32)" + parses "case a\nwhen b\n/ /\n\nelse\n/ /\nend" parses "case a\nwhen b\n/ /\n\nelse\n/ /\nend" + parses "def foo(x @@return); end" parses "def foo(x @@return); end" + parses "{% begin %}%x< %s >{% end %}" parses "{% begin %}%x< %s >{% end %}" + parses "def foo(@offsetof); end" parses "def foo(@offsetof); end" + says syntax error on "foo(return)" says syntax error on "foo(return)" + parses "{% begin %}%w{ %s }{% end %}" parses "{% begin %}%w{ %s }{% end %}" + parses "enum Foo; {{1}}; end" parses "enum Foo; {{1}}; end" + parses "def foo(x @@with); end" parses "def foo(x @@with); end" + says syntax error on "macro foo; {% foo = 1 }; end" says syntax error on "macro foo; {% foo = 1 }; end" + parses "foo(0, n // 2)" parses "foo(0, n // 2)" + parses "foo.%(1, 2) { 3 }" parses "foo.%(1, 2) { 3 }" + says syntax error on "alias Foo?" says syntax error on "alias Foo?" + parses "foo(n / 2)" parses "foo(n / 2)" + says syntax error on "def foo(foo require); end" says syntax error on "def foo(foo require); end" + parses "1.tap do |x|; 1; rescue; x; end" parses "1.tap do |x|; 1; rescue; x; end" + parses "/\\//" parses "/\\//" + parses "def **(); end;" parses "def **(); end;" + says syntax error on "{\n1 => 2\n3 => 4\n}" says syntax error on "{\n1 => 2\n3 => 4\n}" + parses "def foo(x @@if); end" parses "def foo(x @@if); end" + parses "@[Foo(1)]" parses "@[Foo(1)]" + parses ":foo!" parses ":foo!" + parses "a ?\n b ? b1 : b2\n : c ? 3\n : 0" parses "a ?\n b ? b1 : b2\n : c ? 3\n : 0" + parses "n &* 2" parses "n &* 2" + parses "foo.!~(1, 2) { 3 }" parses "foo.!~(1, 2) { 3 }" + says syntax error on "break &* 1" says syntax error on "break &* 1" + parses "foo(a: n &* 2)" parses "foo(a: n &* 2)" + says syntax error on "foo { |class| }" says syntax error on "foo { |class| }" + parses "property elsif : Int32" parses "property elsif : Int32" + parses "foo %x()" parses "foo %x()" + says syntax error on "A = begin; B = 1; end" says syntax error on "A = begin; B = 1; end" + says syntax error on "a = return" says syntax error on "a = return" + says syntax error on "{a[]: 1}" says syntax error on "{a[]: 1}" + says syntax error on "{\n}" says syntax error on "{\n}" + says syntax error on "{\n1 => 2, 3 => 4\n5 => 6}" says syntax error on "{\n1 => 2, 3 => 4\n5 => 6}" + parses "property when : Int32" parses "property when : Int32" + says syntax error on "def foo(foo struct); end" says syntax error on "def foo(foo struct); end" + parses "foo(0, n & 2)" parses "foo(0, n & 2)" + says syntax error on "'''" says syntax error on "'''" + parses "foo (1 + 2), 3" parses "foo (1 + 2), 3" + parses "Foo::Bar" parses "Foo::Bar" + says syntax error on "fun foo\nclass" says syntax error on "fun foo\nclass" + parses "def foo(x @def); end" parses "def foo(x @def); end" + parses "foo(z: 0, a: n * 2)" parses "foo(z: 0, a: n * 2)" + parses "offsetof(\n Foo,\n @foo\n)" parses "offsetof(\n Foo,\n @foo\n)" + says syntax error on "def foo(**args, x); end" says syntax error on "def foo(**args, x); end" parses "{% begin %}%r(\\A){% end %}" parses "{% begin %}%r(\\A){% end %}" - parses "lib LibC\nfun getchar(Int, Float)\nend" parses "lib LibC\nfun getchar(Int, Float)\nend" - parses "<<-FOO\n \t 1\n \t FOO" parses "<<-FOO\n \t 1\n \t FOO" - parses "Foo(T?)" parses "Foo(T?)" - says syntax error on "1 foo" says syntax error on "1 foo" - parses "puts {{*1}}" parses "puts {{*1}}" - says syntax error on "foo { |(x, x)| }" says syntax error on "foo { |(x, x)| }" - says syntax error on "return + 1" says syntax error on "return + 1" - says syntax error on "foo.responds_to?" says syntax error on "foo.responds_to?" - parses "def foo(**args : **Foo)\n1\nend" parses "def foo(**args : **Foo)\n1\nend" - parses "foo = 1; ->foo.&**(Int32)" parses "foo = 1; ->foo.&**(Int32)" - parses "break if true" parses "break if true" + says syntax error on "select\nwhen 1\n2\nend" says syntax error on "select\nwhen 1\n2\nend" + says syntax error on "break[]" says syntax error on "break[]" + parses "lib LibC; struct Foo; end end" parses "lib LibC; struct Foo; end end" + parses "-> : Int32 { }" parses "-> : Int32 { }" + parses "def foo(abstract foo); end" parses "def foo(abstract foo); end" + says syntax error on "def foo(true); end" says syntax error on "def foo(true); end" + parses "/fo\#{1}o/" parses "/fo\#{1}o/" + says syntax error on "case 1; when return; end; end" says syntax error on "case 1; when return; end; end" + parses "foo.!~ 1, 2" parses "foo.!~ 1, 2" says syntax error on "def foo(class); end" says syntax error on "def foo(class); end" - parses "def -; end;" parses "def -; end;" - parses "foo do |a|; 1; end" parses "foo do |a|; 1; end" - says syntax error on "*a" says syntax error on "*a" - parses "foo[0] = 1 if 2" parses "foo[0] = 1 if 2" - parses "<<-HERE\n One\n\n Zero\n HERE" parses "<<-HERE\n One\n\n Zero\n HERE" - parses "property abstract : Int32" parses "property abstract : Int32" - parses "1 unless 3" parses "1 unless 3" - parses "1/2" parses "1/2" - parses "foo(&.bar.baz)" parses "foo(&.bar.baz)" - parses "<<-HERE\r\n One\r\n Zero\r\n HERE\r\n" parses "<<-HERE\r\n One\r\n Zero\r\n HERE\r\n" - parses "Foo(\nT,\nU,\n)" parses "Foo(\nT,\nU,\n)" - says syntax error on "def foo(*a foo); end" says syntax error on "def foo(*a foo); end" - parses "def foo(x @@lib); end" parses "def foo(x @@lib); end" - parses "a\nwhile / /\n/ /\nend" parses "a\nwhile / /\n/ /\nend" - parses "puts %w{one two}" parses "puts %w{one two}" + says syntax error on "@:Foo" says syntax error on "@:Foo" + parses "-> do end" parses "-> do end" + parses ":>>" parses ":>>" + parses "lib LibC; fun foo : Int*; end" parses "lib LibC; fun foo : Int*; end" + parses "{% begin %}%Q< %s >{% end %}" parses "{% begin %}%Q< %s >{% end %}" + parses "property pointerof : Int32" parses "property pointerof : Int32" + parses "def foo(@@select); end" parses "def foo(@@select); end" + parses "break 1" parses "break 1" + parses "foo\n .bar" parses "foo\n .bar" + parses "n == 2" parses "n == 2" + parses "def foo(x @@sizeof); end" parses "def foo(x @@sizeof); end" + parses "def |; end;" parses "def |; end;" + says syntax error on "*a, b, c, d, e = 1, 2" says syntax error on "*a, b, c, d, e = 1, 2" + parses "def self.<; end;" parses "def self.<; end;" + says syntax error on "a() = 1" says syntax error on "a() = 1" + says syntax error on "if break; end" says syntax error on "if break; end" + parses "case\n1\nwhen 1\n2\nend\nif a\nend" parses "case\n1\nwhen 1\n2\nend\nif a\nend" + says syntax error on "enum Foo; A B; end" says syntax error on "enum Foo; A B; end" + parses "foo(0, n == 2)" parses "foo(0, n == 2)" + parses "macro /;end" parses "macro /;end" + parses "a { |x| x } / b" parses "a { |x| x } / b" + parses "->Foo.>>(Int32)" parses "->Foo.>>(Int32)" + parses "n &+ 2" parses "n &+ 2" + calls with blocks within index operator (#12818) + parses "foo.[bar do; 1; end]" parses "foo.[bar do; 1; end]" + parses "foo[bar { 1 }]" parses "foo[bar { 1 }]" + parses "foo.[](bar do; 1; end)" parses "foo.[](bar do; 1; end)" + parses "foo.[bar { 1 }]" parses "foo.[bar { 1 }]" + parses "foo[bar do; 1; end]" parses "foo[bar do; 1; end]" + parses "foo.[](bar { 1 })" parses "foo.[](bar { 1 })" + parses "foo +1.0" parses "foo +1.0" + parses "@@a, b = 1, 2" parses "@@a, b = 1, 2" + parses "1.as Bar" parses "1.as Bar" + parses "foo%i" parses "foo%i" + parses "case {1}\nin {Int32.class}; 2; end" parses "case {1}\nin {Int32.class}; 2; end" + says syntax error on "def foo(foo class); end" says syntax error on "def foo(foo class); end" + says syntax error on "macro foo x; 1 + 2; end" says syntax error on "macro foo x; 1 + 2; end" + parses "lib LibC\nfun getchar(a : Int, b : Float) : Int\nend" parses "lib LibC\nfun getchar(a : Int, b : Float) : Int\nend" + parses "1 // 2" parses "1 // 2" + parses "/ /" parses "/ /" + parses "def foo(@nil); end" parses "def foo(@nil); end" + parses "->::Foo.foo=" parses "->::Foo.foo=" + parses "class Foo; end" parses "class Foo; end" + parses "next 1" parses "next 1" + parses "call ->foo" parses "call ->foo" + parses "{foo:\"a\", bar:\"b\"}" parses "{foo:\"a\", bar:\"b\"}" + parses "foo(a: n // 2)" parses "foo(a: n // 2)" + parses "class Foo(T, *U); end" parses "class Foo(T, *U); end" + parses "case foo; end" parses "case foo; end" + parses "1 if 3" parses "1 if 3" + parses "{1, 2, 3}" parses "{1, 2, 3}" + parses "1 rescue 2" parses "1 rescue 2" + parses "foo.<=(1, 2)" parses "foo.<=(1, 2)" + says syntax error on "1 ? : 2 : 3" says syntax error on "1 ? : 2 : 3" + parses "def foo(\"bar qux\" y); y; end" parses "def foo(\"bar qux\" y); y; end" + parses "foo(z: 0, a: n ^ 2)" parses "foo(z: 0, a: n ^ 2)" + parses "lib : Int32" parses "lib : Int32" + parses "def foo(x @@case); end" parses "def foo(x @@case); end" + parses "{% begin %}%r{\\A}{% end %}" parses "{% begin %}%r{\\A}{% end %}" + says syntax error on "break .. 1" says syntax error on "break .. 1" + parses "def >=(); end" parses "def >=(); end" + parses "def foo(&); end" parses "def foo(&); end" + says syntax error on "def foo(*args = 1); end" says syntax error on "def foo(*args = 1); end" + parses "def foo(x @select); end" parses "def foo(x @select); end" + parses "{% begin %}%Q[ %s ]{% end %}" parses "{% begin %}%Q[ %s ]{% end %}" parses "foo.responds_to? :foo" parses "foo.responds_to? :foo" - says syntax error on "-> :Int32 { }" says syntax error on "-> :Int32 { }" - parses "case 1; when 1 then 2; else; 3; end" parses "case 1; when 1 then 2; else; 3; end" - parses "x = 1 rescue 2" parses "x = 1 rescue 2" - parses "foo +1" parses "foo +1" - parses "{% begin %}%i| %s |{% end %}" parses "{% begin %}%i| %s |{% end %}" - parses "::T/1" parses "::T/1" + parses "break" parses "break" + parses "a.b /=\n1" parses "a.b /=\n1" + parses "foo.** 1, 2" parses "foo.** 1, 2" + parses "pointerof(\n foo\n)" parses "pointerof(\n foo\n)" + parses "macro foo;unless var;true;end;end" parses "macro foo;unless var;true;end;end" + parses "`foo`" parses "`foo`" + parses "def foo(x @nil); end" parses "def foo(x @nil); end" + parses "\"foo\"" parses "\"foo\"" + parses "foo.>=(1, 2)" parses "foo.>=(1, 2)" + parses ":**" parses ":**" + parses "{[] of Foo, ::foo}" parses "{[] of Foo, ::foo}" + parses "macro foo(a, @[Foo] &block);end" parses "macro foo(a, @[Foo] &block);end" + says syntax error on "def foo!=; end" says syntax error on "def foo!=; end" + parses "property include : Int32" parses "property include : Int32" + parses "def Foo::Bar.foo\n1\nend" parses "def Foo::Bar.foo\n1\nend" + parses "<<-'HERE COMES HEREDOC'\n hello \\n world\n \#{1}\n HERE COMES HEREDOC" parses "<<-'HERE COMES HEREDOC'\n hello \\n world\n \#{1}\n HERE COMES HEREDOC" + parses "property false : Int32" parses "property false : Int32" + parses "+1.0_f32" parses "+1.0_f32" + says syntax error on "foo(\"\": 1)" says syntax error on "foo(\"\": 1)" + parses "def foo(x @@fun); end" parses "def foo(x @@fun); end" + parses "include Foo\nif true; end" parses "include Foo\nif true; end" + parses "macro foo=;end" parses "macro foo=;end" + parses "{1 => 2, 3 => 4}" parses "{1 => 2, 3 => 4}" + parses "def foo(@self); end" parses "def foo(@self); end" + parses "->() : Int32 { }" parses "->() : Int32 { }" + says syntax error on "{{ {% begin %} }}" says syntax error on "{{ {% begin %} }}" + parses "def self.!~(); end;" parses "def self.!~(); end;" + parses "enum Foo; A = 1\ndef foo; 1; end; end" parses "enum Foo; A = 1\ndef foo; 1; end; end" + says syntax error on "foo { |asm| }" says syntax error on "foo { |asm| }" + parses "def foo(a, &block : self -> self); end" parses "def foo(a, &block : self -> self); end" + parses "def foo(x @@abstract); end" parses "def foo(x @@abstract); end" + parses "foo(a: n - 2)" parses "foo(a: n - 2)" + parses "->Foo.&-(Int32)" parses "->Foo.&-(Int32)" + parses "foo.^ 1, 2" parses "foo.^ 1, 2" + says syntax error on "def foo\nmacro\nend" says syntax error on "def foo\nmacro\nend" + parses "Foo(T, U, 1)" parses "Foo(T, U, 1)" + says syntax error on "foo { |false| }" says syntax error on "foo { |false| }" + parses "a ? 1 : b ? 2 : c ? 3 : 0" parses "a ? 1 : b ? 2 : c ? 3 : 0" + parses "\"foo\#{bar}baz\"" parses "\"foo\#{bar}baz\"" + parses "foo { 1 }" parses "foo { 1 }" + parses "def foo(@@asm); end" parses "def foo(@@asm); end" + parses "def foo; yield 1; yield; end" parses "def foo; yield 1; yield; end" + parses "def foo(x @begin); end" parses "def foo(x @begin); end" + parses "foo.!~(1, 2)" parses "foo.!~(1, 2)" + parses "1 +2_i64" parses "1 +2_i64" + parses "case {1}\nin {Foo(Int32)}; 2; end" parses "case {1}\nin {Foo(Int32)}; 2; end" + parses "macro %;end" parses "macro %;end" + parses "case;end" parses "case;end" + says syntax error on "foo { |(select)| }" says syntax error on "foo { |(select)| }" + parses "2**3**4" parses "2**3**4" + parses "def foo(@true); end" parses "def foo(@true); end" + parses "Foo(typeof(1), typeof(2))" parses "Foo(typeof(1), typeof(2))" + says syntax error on "case 1\nin Int32; 2; else" says syntax error on "case 1\nin Int32; 2; else" + parses "property until : Int32" parses "property until : Int32" + parses "Foo(T, 1, U)" parses "Foo(T, 1, U)" + parses "->Foo.&+(Int32)" parses "->Foo.&+(Int32)" + parses "def foo;bar(end: 1);end" parses "def foo;bar(end: 1);end" + parses "def >>(); end" parses "def >>(); end" + parses "def foo(x, **args)\n1\nend" parses "def foo(x, **args)\n1\nend" + parses "property macro : Int32" parses "property macro : Int32" + parses "{{ foo.nil?(foo) }}" parses "{{ foo.nil?(foo) }}" + parses "`foo\#{1}bar`" parses "`foo\#{1}bar`" + parses "def foo(lib foo); end" parses "def foo(lib foo); end" + says syntax error on "next ... 1" says syntax error on "next ... 1" + parses "a @b-1\nc" parses "a @b-1\nc" + parses "require \"foo\"; [1]" parses "require \"foo\"; [1]" + parses "{A::B => 1, C::D => 2}" parses "{A::B => 1, C::D => 2}" + parses "foo(a: n &+ 2)" parses "foo(a: n &+ 2)" + parses ":^" parses ":^" + parses "def foo(x, *args, y = 2, w, z = 3); 1; end" parses "def foo(x, *args, y = 2, w, z = 3); 1; end" + says syntax error on "def foo(**args = 1); end" says syntax error on "def foo(**args = 1); end" + parses "false : Int32" parses "false : Int32" + parses "foo.==(1, 2) { 3 }" parses "foo.==(1, 2) { 3 }" + parses "begin; 1; 2; 3; end;" parses "begin; 1; 2; 3; end;" + parses "foo(a: n =~ 2)" parses "foo(a: n =~ 2)" + parses "foo { |a, (b, c), (d, e)| a; b; c; d; e }" parses "foo { |a, (b, c), (d, e)| a; b; c; d; e }" + says syntax error on "b? = 1" says syntax error on "b? = 1" + parses "foo(0, n &- 2)" parses "foo(0, n &- 2)" + parses "def self.foo=()\n1\nend" parses "def self.foo=()\n1\nend" + parses "@a : Foo = 1" parses "@a : Foo = 1" + parses "def foo(x = 1, *y); 1; end" parses "def foo(x = 1, *y); 1; end" + parses "next *{1, 2}" parses "next *{1, 2}" + says syntax error on "return > 1" says syntax error on "return > 1" + parses "lib LibC; struct Foo; x : Int; y : Float; end end" parses "lib LibC; struct Foo; x : Int; y : Float; end end" + parses "a.b &-=\n1" parses "a.b &-=\n1" + parses "def &-(); end" parses "def &-(); end" + parses "def foo\n1\nend\nif 1\nend" parses "def foo\n1\nend\nif 1\nend" + parses "foo(n <= 2)" parses "foo(n <= 2)" + parses "next 1 if true" parses "next 1 if true" + parses "foo = 1; ->foo.>(Int32)" parses "foo = 1; ->foo.>(Int32)" + parses "foo(n == 2)" parses "foo(n == 2)" + parses "def /; end;" parses "def /; end;" + says syntax error on "asm(\"nop\" ::: \"\#{foo}\")" says syntax error on "asm(\"nop\" ::: \"\#{foo}\")" + parses "def foo(x @macro); end" parses "def foo(x @macro); end" + parses "foo(0, n =~ 2)" parses "foo(0, n =~ 2)" + sets correct location of global path in annotation sets correct location of global path in annotation + parses "1 if /x/" parses "1 if /x/" + parses "1.as?(\n Int32\n)" parses "1.as?(\n Int32\n)" + parses "foo.^(1, 2) { 3 }" parses "foo.^(1, 2) { 3 }" + parses "def <=(*args, **opts); end" parses "def <=(*args, **opts); end" + parses "f.x = Foo.new" parses "f.x = Foo.new" + parses "module Foo(T); end" parses "module Foo(T); end" + parses "[] of ->\n1" parses "[] of ->\n1" + parses "def foo(var : Int32 = 1); end" parses "def foo(var : Int32 = 1); end" + parses "foo.& 1, 2" parses "foo.& 1, 2" + parses "foo bar.baz(1) do\nend" parses "foo bar.baz(1) do\nend" + parses "(1; 2; 3)" parses "(1; 2; 3)" + parses "foo(n &** 2)" parses "foo(n &** 2)" + says syntax error on "foo { |unless| }" says syntax error on "foo { |unless| }" + parses "1.nil?(\n)" parses "1.nil?(\n)" + parses "{% if true %}\n{% end %}\n{% if true %}\n{% end %}" parses "{% if true %}\n{% end %}\n{% if true %}\n{% end %}" + says syntax error on "macro foo x y; end" says syntax error on "macro foo x y; end" + parses "{\n{1}\n}" parses "{\n{1}\n}" + says syntax error on "foo { |(out)| }" says syntax error on "foo { |(out)| }" + parses "lib LibC\nfun getch = \"get.char\" : Int32\nend" parses "lib LibC\nfun getch = \"get.char\" : Int32\nend" + parses "def self.&(); end;" parses "def self.&(); end;" + parses "protected : Int32" parses "protected : Int32" + says syntax error on "macro foo(**x, y)" says syntax error on "macro foo(**x, y)" + parses "case / /; when / /; / /; else; / /; end" parses "case / /; when / /; / /; else; / /; end" + says syntax error on "def foo(*x, &x); end" says syntax error on "def foo(*x, &x); end" + parses "foo &.bar.baz" parses "foo &.bar.baz" + says syntax error on " {1, 2, 3 end" says syntax error on " {1, 2, 3 end" + parses "def foo(x @in); end" parses "def foo(x @in); end" + says syntax error on "a = 1, 2, 3" says syntax error on "a = 1, 2, 3" + parses "foo %q()" parses "foo %q()" + says syntax error on "foo { |self| }" says syntax error on "foo { |self| }" + parses "<<-FOO\n\t1\n\tFOO" parses "<<-FOO\n\t1\n\tFOO" + parses "@[Foo()]" parses "@[Foo()]" + parses "if foo\n1\nend" parses "if foo\n1\nend" + parses "def []?; end" parses "def []?; end" + parses "module Foo(*T); end" parses "module Foo(*T); end" + parses "def %(); end;" parses "def %(); end;" + parses "&+ 1" parses "&+ 1" parses "def foo(a, @[Foo] var); end" parses "def foo(a, @[Foo] var); end" - parses "def foo(x @@include); end" parses "def foo(x @@include); end" - parses "foo(a: n // 2)" parses "foo(a: n // 2)" - parses "def foo(x @@class); end" parses "def foo(x @@class); end" + parses "->Foo.<(Int32)" parses "->Foo.<(Int32)" + parses "def type(type); end" parses "def type(type); end" + says syntax error on "foo.&&" says syntax error on "foo.&&" + parses "{{ 1 // 2 }}" parses "{{ 1 // 2 }}" + parses "foo 1, **bar, &block" parses "foo 1, **bar, &block" + says syntax error on "foo { |(asm)| }" says syntax error on "foo { |(asm)| }" parses "def foo(@@var = 1); 1; end" parses "def foo(@@var = 1); 1; end" - parses "1 >= 2" parses "1 >= 2" - says syntax error on "foo { |enum| }" says syntax error on "foo { |enum| }" - parses "when : Int32" parses "when : Int32" - parses "f.x **= 2" parses "f.x **= 2" - parses "Foo(\"foo bar\": U)" parses "Foo(\"foo bar\": U)" - says syntax error on "foo { |(def)| }" says syntax error on "foo { |(def)| }" - parses "def foo(&block); end" parses "def foo(&block); end" - parses "Foo(*T)" parses "Foo(*T)" - parses "foo begin\nbar do\nend\nend" parses "foo begin\nbar do\nend\nend" - parses "_ = 1" parses "_ = 1" - parses "else : Int32" parses "else : Int32" - parses "\n\n__LINE__" parses "\n\n__LINE__" - says syntax error on "foo { |if| }" says syntax error on "foo { |if| }" - parses "a.b &+=\n1" parses "a.b &+=\n1" - parses "enum Foo : UInt16; end" parses "enum Foo : UInt16; end" - parses "unless foo; 1; else; 2; end" parses "unless foo; 1; else; 2; end" - parses "\"foo\"" parses "\"foo\"" - parses "def *(); end" parses "def *(); end" - parses "macro foo; 1 + 2 {{foo}} 3 + 4; end" parses "macro foo; 1 + 2 {{foo}} 3 + 4; end" - parses "a ? 1\n : b" parses "a ? 1\n : b" - parses "property when : Int32" parses "property when : Int32" - says syntax error on "def foo(foo macro); end" says syntax error on "def foo(foo macro); end" - says syntax error on "next.foo" says syntax error on "next.foo" - says syntax error on "case 1\nin _;" says syntax error on "case 1\nin _;" - says syntax error on "def foo(foo if); end" says syntax error on "def foo(foo if); end" - says syntax error on "def foo(struct); end" says syntax error on "def foo(struct); end" - parses "def foo(x @offsetof); end" parses "def foo(x @offsetof); end" - says syntax error on "enum Foo; A B; end" says syntax error on "enum Foo; A B; end" - parses "lib LibC\nfun getchar(a : Int)\nend" parses "lib LibC\nfun getchar(a : Int)\nend" - parses "f.x &+= 2" parses "f.x &+= 2" - parses "def &(); end" parses "def &(); end" - parses "::Foo{\"x\" => \"y\"}" parses "::Foo{\"x\" => \"y\"}" - parses "<<-'EOF'.x\n foo\nEOF" parses "<<-'EOF'.x\n foo\nEOF" - parses "a = 1; a //= 1" parses "a = 1; a //= 1" - parses "{% begin %}%q{ %s }{% end %}" parses "{% begin %}%q{ %s }{% end %}" - parses "macro foo;end" parses "macro foo;end" - parses "def foo(x @@return); end" parses "def foo(x @@return); end" - sets correct location of annotation on method parameter sets correct location of annotation on method parameter - parses "->Foo.[](Int32)" parses "->Foo.[](Int32)" - parses "def >(); end;" parses "def >(); end;" - says syntax error on "foo { |(yield)| }" says syntax error on "foo { |(yield)| }" - parses "lib LibC\nfun getch = \"get.char\"\nend" parses "lib LibC\nfun getch = \"get.char\"\nend" - parses "macro foo; 1 + 2 {{foo}}\\ 3 + 4; end" parses "macro foo; 1 + 2 {{foo}}\\ 3 + 4; end" + says syntax error on "break + 1" says syntax error on "break + 1" + parses "1 ^ 2" parses "1 ^ 2" + parses "foo./(1, 2)" parses "foo./(1, 2)" + parses "foo(0, n !~ 2)" parses "foo(0, n !~ 2)" + parses "<<-HERE1; <<-HERE2\nhere1\nHERE1\nHERE2" parses "<<-HERE1; <<-HERE2\nhere1\nHERE1\nHERE2" + parses "1..\n2.." parses "1..\n2.." + says syntax error on "enum Foo < UInt16; end" says syntax error on "enum Foo < UInt16; end" + parses "1 rescue 2" parses "1 rescue 2" + parses "case 1\nwhen 1\n2\nelse\n3\nend" parses "case 1\nwhen 1\n2\nelse\n3\nend" parses "def foo(@unless); end" parses "def foo(@unless); end" - parses "macro &+;end" parses "macro &+;end" - parses "a : Foo" parses "a : Foo" - parses "def foo(x : *T -> R); end" parses "def foo(x : *T -> R); end" - parses "lib LibC\nfun getch = \"get.char\"(x : Int32)\nend" parses "lib LibC\nfun getch = \"get.char\"(x : Int32)\nend" - parses "a = 1\nfoo -a" parses "a = 1\nfoo -a" - parses "<<-'HERE COMES HEREDOC'\n hello \\n world\n \#{1}\n HERE COMES HEREDOC" parses "<<-'HERE COMES HEREDOC'\n hello \\n world\n \#{1}\n HERE COMES HEREDOC" - parses "foo = 1; ->foo.//(Int32)" parses "foo = 1; ->foo.//(Int32)" - says syntax error on "def foo(foo until); end" says syntax error on "def foo(foo until); end" - parses "def foo(@@yield); end" parses "def foo(@@yield); end" - parses "def self.<=; end;" parses "def self.<=; end;" - parses "def <=(); end" parses "def <=(); end" - parses "a = 1\ncase 1\nwhen a then 1\nend" parses "a = 1\ncase 1\nwhen a then 1\nend" - parses "return : Int32" parses "return : Int32" - parses "def foo(x); end; x" parses "def foo(x); end; x" - says syntax error on "{1, ->do\n|x| x\end }" says syntax error on "{1, ->do\n|x| x\end }" - says syntax error on "foo { |abstract| }" says syntax error on "foo { |abstract| }" - parses "def []=(*args, **opts, &); end" parses "def []=(*args, **opts, &); end" - parses "foo 1\n" parses "foo 1\n" - parses "lib LibC\nfun getchar(a : Int, b : Float)\nend" parses "lib LibC\nfun getchar(a : Int, b : Float)\nend" + parses "\"hello \\\r\n world\"" parses "\"hello \\\r\n world\"" parses "foo %Q" parses "foo %Q" - parses "[] of {String, ->}" parses "[] of {String, ->}" - says syntax error on "foo { |begin| }" says syntax error on "foo { |begin| }" - parses "foo &.[0] = 1" parses "foo &.[0] = 1" - parses "puts {{1}}" parses "puts {{1}}" - parses "def foo(a, &block : Int, Float -> Double); end" parses "def foo(a, &block : Int, Float -> Double); end" - parses "Int[8, 4]" parses "Int[8, 4]" - parses "property rescue : Int32" parses "property rescue : Int32" - parses "{{ foo.nil?(foo) }}" parses "{{ foo.nil?(foo) }}" - parses "foo(\n begin\n result : Int32 = 1\n result\n end\n )" parses "foo(\n begin\n result : Int32 = 1\n result\n end\n )" - parses "def foo(@[Foo] var); end" parses "def foo(@[Foo] var); end" - parses "instance_sizeof(X)" parses "instance_sizeof(X)" - parses "@[Foo(1, foo: 2\n)]" parses "@[Foo(1, foo: 2\n)]" + parses "Foo(x: U)" parses "Foo(x: U)" parses "foo(z: 0, a: n >= 2)" parses "foo(z: 0, a: n >= 2)" - says syntax error on "->(x, y z) { }" says syntax error on "->(x, y z) { }" - parses "def foo(alias foo); end" parses "def foo(alias foo); end" - says syntax error on "a, B = 1, 2" says syntax error on "a, B = 1, 2" - says syntax error on "def foo(offsetof); end" says syntax error on "def foo(offsetof); end" - parses "def foo(@nil); end" parses "def foo(@nil); end" - parses "foo.=~(1, 2)" parses "foo.=~(1, 2)" - says syntax error on "fun foo(x : Int32, x : Int64); end" says syntax error on "fun foo(x : Int32, x : Int64); end" - parses "fun : Int32" parses "fun : Int32" - parses "puts {{**1}}" parses "puts {{**1}}" - parses "def foo(x @@pointerof); end" parses "def foo(x @@pointerof); end" - parses "[1, 2]" parses "[1, 2]" - parses "macro &-;end" parses "macro &-;end" - parses "foo(n == 2)" parses "foo(n == 2)" - parses "def foo(var : Int?); end" parses "def foo(var : Int?); end" - parses "def &-(); end" parses "def &-(); end" + parses "/ /\n/ /" parses "/ /\n/ /" + parses ":|" parses ":|" + parses "foo.<(1, 2) { 3 }" parses "foo.<(1, 2) { 3 }" + parses "->Foo.**(Int32)" parses "->Foo.**(Int32)" + says syntax error on "1 as Bar" says syntax error on "1 as Bar" + parses "1 ** 2" parses "1 ** 2" + says syntax error on "+return" says syntax error on "+return" + says syntax error on "def foo(**args, *x); end" says syntax error on "def foo(**args, *x); end" + parses "next *1" parses "next *1" + parses "- 1" parses "- 1" + parses "def %(); end" parses "def %(); end" + parses "puts {{1}}" parses "puts {{1}}" + parses "a ? 1 :\n b ? 2 :\n c ? 3\n : 0" parses "a ? 1 :\n b ? 2 :\n c ? 3\n : 0" + parses "foo = 1; ->foo.foo" parses "foo = 1; ->foo.foo" + parses "a = 1\nfoo -a" parses "a = 1\nfoo -a" + says syntax error on "foo { |(in)| }" says syntax error on "foo { |(in)| }" + parses "a, b = 1, 2 if 3" parses "a, b = 1, 2 if 3" + parses "foo[0] = 1 if 2" parses "foo[0] = 1 if 2" + parses "def foo(@@typeof); end" parses "def foo(@@typeof); end" + parses ":\u304B\u305F\u306A" parses ":\u304B\u305F\u306A" + parses "a = 1; a -= 1" parses "a = 1; a -= 1" + says syntax error on "1 ... next" says syntax error on "1 ... next" + says syntax error on "def foo(in); end" says syntax error on "def foo(in); end" + parses "def foo(x @@nil); end" parses "def foo(x @@nil); end" + says syntax error on "class Foo(); end" says syntax error on "class Foo(); end" + parses "def foo(x @@offsetof); end" parses "def foo(x @@offsetof); end" + parses "foo(//)" parses "foo(//)" + parses "foo.!=(1, 2)" parses "foo.!=(1, 2)" + says syntax error on "def foo(foo begin); end" says syntax error on "def foo(foo begin); end" + says syntax error on "def foo(x, x); end" says syntax error on "def foo(x, x); end" + says syntax error on "foo { |if| }" says syntax error on "foo { |if| }" + says syntax error on "def foo?=(x); end" says syntax error on "def foo?=(x); end" + parses "def >=(*args, **opts, &); end" parses "def >=(*args, **opts, &); end" + parses "def foo(x @sizeof); end" parses "def foo(x @sizeof); end" + parses "foo.bar= *baz" parses "foo.bar= *baz" + parses "f.x = - 1" parses "f.x = - 1" + says syntax error on "*1, a = 2" says syntax error on "*1, a = 2" + parses "foo { |a, b| 1 }" parses "foo { |a, b| 1 }" + parses "macro []?;end" parses "macro []?;end" + parses "def foo(x @extend); end" parses "def foo(x @extend); end" + parses "{% begin %}%Q( %s ){% end %}" parses "{% begin %}%Q( %s ){% end %}" + parses "def foo(@macro); end" parses "def foo(@macro); end" + parses "def foo(*y : *T); 1; end" parses "def foo(*y : *T); 1; end" + parses "1 \\\n + 2" parses "1 \\\n + 2" + parses "def foo(return foo); end" parses "def foo(return foo); end" + parses ":\"\\\"foo\"" parses ":\"\\\"foo\"" + parses "def foo(x)\n x\nend; foo = 1; b = 2; foo -b" parses "def foo(x)\n x\nend; foo = 1; b = 2; foo -b" + parses "[1, 2] of Int" parses "[1, 2] of Int" + says syntax error on "foo { |protected| }" says syntax error on "foo { |protected| }" + says syntax error on "def foo(foo def); end" says syntax error on "def foo(foo def); end" parses "foo(z: 0, a: n &** 2)" parses "foo(z: 0, a: n &** 2)" - parses "case {1}\nin {true}; 2; end" parses "case {1}\nin {true}; 2; end" says syntax error on "foo { |macro| }" says syntax error on "foo { |macro| }" - parses "foo[1] /2" parses "foo[1] /2" - parses "break {1 => 2}" parses "break {1 => 2}" - says syntax error on "macro foo.bar;end" says syntax error on "macro foo.bar;end" - parses "-> : Int32 { }" parses "-> : Int32 { }" - says syntax error on "foo { |def| }" says syntax error on "foo { |def| }" - parses "{% for x in y %}body{% end %}" parses "{% for x in y %}body{% end %}" - parses "a = / /" parses "a = / /" - parses "/ /\n/ /" parses "/ /\n/ /" - parses "a = 1; a &+=\n1" parses "a = 1; a &+=\n1" + parses "foo(z: 0, a: n <= 2)" parses "foo(z: 0, a: n <= 2)" + parses "foo(&.responds_to?(:foo))" parses "foo(&.responds_to?(:foo))" + says syntax error on "foo { |(require)| }" says syntax error on "foo { |(require)| }" + parses "def self.<(); end;" parses "def self.<(); end;" + parses "begin; 1; rescue Foo | Bar; 2; end" parses "begin; 1; rescue Foo | Bar; 2; end" + says syntax error on "*a if true = 2" says syntax error on "*a if true = 2" + parses "def foo; / /; end" parses "def foo; / /; end" + parses "break {1, 2}" parses "break {1, 2}" + parses "foo(Foo: 1, Bar: 2)" parses "foo(Foo: 1, Bar: 2)" + parses "@@a : Foo = 1" parses "@@a : Foo = 1" + parses "foo out x; x" parses "foo out x; x" + parses "property ensure : Int32" parses "property ensure : Int32" + says syntax error on "(1, 2 3)" says syntax error on "(1, 2 3)" + parses "{% begin %}%[ %s ]{% end %}" parses "{% begin %}%[ %s ]{% end %}" + parses "a = 1; a -=\n1" parses "a = 1; a -=\n1" + parses "foo a: 1, &block" parses "foo a: 1, &block" + parses "{% if x %}body{% end %}" parses "{% if x %}body{% end %}" + says syntax error on "return ** 1" says syntax error on "return ** 1" + parses "def self./; end;" parses "def self./; end;" + parses "->Foo.*(Int32)" parses "->Foo.*(Int32)" + parses "typeof(1)" parses "typeof(1)" + parses "self / number" parses "self / number" + says syntax error on "Foo({x: X, x: Y})" says syntax error on "Foo({x: X, x: Y})" + parses "def foo(x @@extend); end" parses "def foo(x @@extend); end" + parses "foo.bar(1, 2)" parses "foo.bar(1, 2)" + parses "->Foo.%(Int32)" parses "->Foo.%(Int32)" + parses "foo &.as(T).bar" parses "foo &.as(T).bar" + parses "macro foo(x); 1 + 2; end" parses "macro foo(x); 1 + 2; end" + says syntax error on "a.b(), c.d = 1" says syntax error on "a.b(), c.d = 1" + parses "def foo(@break); end" parses "def foo(@break); end" + parses "foo.<=" parses "foo.<=" + parses "property lib : Int32" parses "property lib : Int32" + parses "2 * (3 + 4)" parses "2 * (3 + 4)" + says syntax error on "a.[]() = 1" says syntax error on "a.[]() = 1" + parses "foo = 1; ->foo.-(Int32)" parses "foo = 1; ->foo.-(Int32)" + says syntax error on "return &** 1" says syntax error on "return &** 1" + parses "n ** 2" parses "n ** 2" + says syntax error on "def foo\nextend\nend" says syntax error on "def foo\nextend\nend" + parses "%r(\\ )" parses "%r(\\ )" + parses "foo(z: 0, a: n === 2)" parses "foo(z: 0, a: n === 2)" + says syntax error on "nil foo" says syntax error on "nil foo" + parses "->::foo=" parses "->::foo=" + parses "foo.bar = {} of Int32 => Int32" parses "foo.bar = {} of Int32 => Int32" + parses "foo%q" parses "foo%q" + parses "lib LibC; struct Foo; x : Int*; end end" parses "lib LibC; struct Foo; x : Int*; end end" + says syntax error on "foo { |in| }" says syntax error on "foo { |in| }" + says syntax error on "return do\nend" says syntax error on "return do\nend" + says syntax error on "foo { |enum| }" says syntax error on "foo { |enum| }" + parses "case 1\nin false; 2; end" parses "case 1\nin false; 2; end" + parses "def foo(x @@lib); end" parses "def foo(x @@lib); end" + parses "f.x |= 2" parses "f.x |= 2" + parses "Foo(T)?" parses "Foo(T)?" + parses "def foo(@false); end" parses "def foo(@false); end" + parses "->foo=" parses "->foo=" + parses "def foo(@asm); end" parses "def foo(@asm); end" + says syntax error on "foo[1] = return" says syntax error on "foo[1] = return" + parses "macro [];end" parses "macro [];end" + parses "lib LibC; struct Foo; x, y, z : Int; end end" parses "lib LibC; struct Foo; x, y, z : Int; end end" + parses "[] of ->;" parses "[] of ->;" + parses "{% begin %}%| %s |{% end %}" parses "{% begin %}%| %s |{% end %}" + parses ":<=" parses ":<=" + parses "def foo(var : Int*); end" parses "def foo(var : Int*); end" + parses "macro -;end" parses "macro -;end" + parses "1 unless 3" parses "1 unless 3" + says syntax error on "def foo(pointerof); end" says syntax error on "def foo(pointerof); end" + says syntax error on "1 2" says syntax error on "1 2" + parses "1 > 2" parses "1 > 2" + parses "def foo(instance_sizeof foo); end" parses "def foo(instance_sizeof foo); end" + says syntax error on "macro responds_to?; end" says syntax error on "macro responds_to?; end" + parses "{% begin %}%x{ %s }{% end %}" parses "{% begin %}%x{ %s }{% end %}" + says syntax error on "foo { |(enum)| }" says syntax error on "foo { |(enum)| }" + parses "foo = 1; foo {}" parses "foo = 1; foo {}" + parses "puts ~1" parses "puts ~1" + parses "()" parses "()" + parses "foo(\"foo bar\": 1, \"baz\": 2)" parses "foo(\"foo bar\": 1, \"baz\": 2)" + parses "def foo(@end); end" parses "def foo(@end); end" + parses "foo(1.., 2)" parses "foo(1.., 2)" + says syntax error on "A = (B = 1)" says syntax error on "A = (B = 1)" + parses "end : Int32" parses "end : Int32" + says syntax error on "def foo(*a foo); end" says syntax error on "def foo(*a foo); end" + parses "!1" parses "!1" + parses "a, *b = 1" parses "a, *b = 1" + parses "abstract struct Foo; end" parses "abstract struct Foo; end" + parses "foo(&.as?(T).bar)" parses "foo(&.as?(T).bar)" + says syntax error on "*a, b, c, d = 1, 2" says syntax error on "*a, b, c, d = 1, 2" + parses "def foo(macro foo); end" parses "def foo(macro foo); end" + parses "case 1\nwhen .is_a?(T)\n2\nend" parses "case 1\nwhen .is_a?(T)\n2\nend" + says syntax error on "a {}, b = 1" says syntax error on "a {}, b = 1" + parses "property fun : Int32" parses "property fun : Int32" + says syntax error on "1 .. break" says syntax error on "1 .. break" + parses "@a = uninitialized Foo" parses "@a = uninitialized Foo" + parses "foo.% do end" parses "foo.% do end" + parses "def foo(@@var); 1; end" parses "def foo(@@var); 1; end" + parses "foo.!=" parses "foo.!=" + says syntax error on "def foo(x, **x); end" says syntax error on "def foo(x, **x); end" + parses "a, b, *c = 1" parses "a, b, *c = 1" + parses "offsetof(X, @a)" parses "offsetof(X, @a)" + parses "foo(..2)" parses "foo(..2)" + parses "foo" parses "foo" + parses "->Foo.^(Int32)" parses "->Foo.^(Int32)" + parses "until true; 1; end;" parses "until true; 1; end;" + says syntax error on "foo[return]" says syntax error on "foo[return]" + says syntax error on "next ** 1" says syntax error on "next ** 1" + parses "macro &+;end" parses "macro &+;end" + parses "!a && b" parses "!a && b" + parses "def foo(@var); 1; end" parses "def foo(@var); 1; end" + parses "next 1, 2" parses "next 1, 2" + parses "break 1, *2" parses "break 1, *2" + parses "def self.===; end;" parses "def self.===; end;" + says syntax error on "case next; when 1; end; end" says syntax error on "case next; when 1; end; end" + says syntax error on "next &- 1" says syntax error on "next &- 1" + parses "f.x &= 2" parses "f.x &= 2" + parses "require : Int32" parses "require : Int32" + parses "typeof : Int32" parses "typeof : Int32" + parses "def Foo.foo\n1\nend" parses "def Foo.foo\n1\nend" + parses "a\nunless / /\n/ /\nelse\n/ /\nend" parses "a\nunless / /\n/ /\nelse\n/ /\nend" + parses "foo%Q" parses "foo%Q" + says syntax error on "{foo: 1, bar: 2\nbaz: 3}" says syntax error on "{foo: 1, bar: 2\nbaz: 3}" + parses "case 1\nin .bar?; 2; end" parses "case 1\nin .bar?; 2; end" + parses "foo = 1; b = 2; foo +b" parses "foo = 1; b = 2; foo +b" + says syntax error on "def foo(foo module); end" says syntax error on "def foo(foo module); end" + parses "def foo(@instance_sizeof); end" parses "def foo(@instance_sizeof); end" + parses "lib LibC\n$errno = Foo : Int32\nend" parses "lib LibC\n$errno = Foo : Int32\nend" + parses "1 * -2" parses "1 * -2" + parses "case 1\nin Foo(Int32); 2; end" parses "case 1\nin Foo(Int32); 2; end" + parses "x[a: 1, b: 2]" parses "x[a: 1, b: 2]" + parses "n > 2" parses "n > 2" + parses "foo(*bar)" parses "foo(*bar)" + parses "->Foo.!~(Int32)" parses "->Foo.!~(Int32)" + says syntax error on "def foo(*x, **x); end" says syntax error on "def foo(*x, **x); end" + parses "a = 1; b = 2; c = 3; a-b -c" parses "a = 1; b = 2; c = 3; a-b -c" + parses "{% begin %}%x( %s ){% end %}" parses "{% begin %}%x( %s ){% end %}" + parses "property case : Int32" parses "property case : Int32" + parses "asm(\"nop\" : : )" parses "asm(\"nop\" : : )" + parses "property nil : Int32" parses "property nil : Int32" + parses "case 1; when 1 then 2; else; 3; end" parses "case 1; when 1 then 2; else; 3; end" + parses "def foo(in foo); end" parses "def foo(in foo); end" + parses "a = 1; a &-= 1" parses "a = 1; a &-= 1" + says syntax error on "until return; end" says syntax error on "until return; end" + parses "def foo(x @@module); end" parses "def foo(x @@module); end" + parses "foo.>= 1, 2" parses "foo.>= 1, 2" + parses "def ===(other, file = 1); end" parses "def ===(other, file = 1); end" + parses "abstract def foo(x)" parses "abstract def foo(x)" + parses "@[Foo(\n1, foo: 2\n)]" parses "@[Foo(\n1, foo: 2\n)]" + parses "def foo(@@next); end" parses "def foo(@@next); end" + parses "foo.!= do end" parses "foo.!= do end" + parses "while true; end;" parses "while true; end;" + parses ":/" parses ":/" + parses "a; if / /; / /; elsif / /; / /; end" parses "a; if / /; / /; elsif / /; / /; end" + parses "foo(a: n !~ 2)" parses "foo(a: n !~ 2)" + parses "asm(\"nop\" ::: :)" parses "asm(\"nop\" ::: :)" + says syntax error on "->(x : Int32, x : Int32) {}" says syntax error on "->(x : Int32, x : Int32) {}" + parses "foo(\na: 1,\n)" parses "foo(\na: 1,\n)" + parses "case 1; when 2 then /foo/; end" parses "case 1; when 2 then /foo/; end" + parses "[/ /, / /]" parses "[/ /, / /]" + parses "1 - 2" parses "1 - 2" + parses "call(foo : A, end : B)" parses "call(foo : A, end : B)" + parses "foo.**(1, 2)" parses "foo.**(1, 2)" + parses "case {1, 2}\nwhen {3, 4}, {5, 6}\n7\nend" parses "case {1, 2}\nwhen {3, 4}, {5, 6}\n7\nend" + says syntax error on "\n lib LibFoo\n fun foo(x : Int32\n y : Float64)\n end\n " says syntax error on "\n lib LibFoo\n fun foo(x : Int32\n y : Float64)\n end\n " + parses "{{ nil?(foo) }}" parses "{{ nil?(foo) }}" + says syntax error on "next + 1" says syntax error on "next + 1" + parses "foo { |a| 1 }" parses "foo { |a| 1 }" + parses "def foo(@@sizeof); end" parses "def foo(@@sizeof); end" + parses "macro foo;bar{% unless x %}body{% end %}baz;end" parses "macro foo;bar{% unless x %}body{% end %}baz;end" + says syntax error on "yield next" says syntax error on "yield next" + parses "[\n1\n]" parses "[\n1\n]" + parses "foo = 1; ->foo.//(Int32)" parses "foo = 1; ->foo.//(Int32)" + parses "1 / -2" parses "1 / -2" + says syntax error on "case return; when 1; end; end" says syntax error on "case return; when 1; end; end" + parses "def foo(x @@true); end" parses "def foo(x @@true); end" + parses "Foo(T | U)" parses "Foo(T | U)" + parses "\"foo\#{\"bar\"}baz\"" parses "\"foo\#{\"bar\"}baz\"" + parses "property alias : Int32" parses "property alias : Int32" + parses "def foo(@def); end" parses "def foo(@def); end" + parses "nil?" parses "nil?" + says syntax error on "[1 1]" says syntax error on "[1 1]" + says syntax error on "def foo(foo case); end" says syntax error on "def foo(foo case); end" + parses "Foo({\"foo\": X, \"bar\": Y})" parses "Foo({\"foo\": X, \"bar\": Y})" + says syntax error on "$foo :: Foo" says syntax error on "$foo :: Foo" + parses "abstract def foo : Int32" parses "abstract def foo : Int32" + parses "foo(Bar { 1 })" parses "foo(Bar { 1 })" + parses "foo(a: n &- 2)" parses "foo(a: n &- 2)" + parses "def <=(); end;" parses "def <=(); end;" + parses "->Foo.foo!" parses "->Foo.foo!" + says syntax error on "break // 1" says syntax error on "break // 1" + parses "foo(a: n == 2)" parses "foo(a: n == 2)" + says syntax error on "return === 1" says syntax error on "return === 1" + says syntax error on "next.foo" says syntax error on "next.foo" + says syntax error on "break < 1" says syntax error on "break < 1" + parses "puts {{\n1\n}}" parses "puts {{\n1\n}}" + parses "case 1; end" parses "case 1; end" + says syntax error on "foo { |instance_sizeof| }" says syntax error on "foo { |instance_sizeof| }" + parses "def foo=(value); end" parses "def foo=(value); end" + parses "lib LibC\nfun getchar\nend" parses "lib LibC\nfun getchar\nend" + parses "lib LibC; fun foo(a : ::B, ::C -> ::D); end" parses "lib LibC; fun foo(a : ::B, ::C -> ::D); end" + parses "def *(); end;" parses "def *(); end;" + parses "->(x) { x }" parses "->(x) { x }" + parses "foo.is_a? Const" parses "foo.is_a? Const" + parses "def foo(@module); end" parses "def foo(@module); end" + parses "n === 2" parses "n === 2" + parses "foo(&.bar.baz)" parses "foo(&.bar.baz)" + parses "enum Foo; A = 1\ndef self.foo; 1; end\nend" parses "enum Foo; A = 1\ndef self.foo; 1; end\nend" + parses "{% begin %}%w[ %s ]{% end %}" parses "{% begin %}%w[ %s ]{% end %}" + parses "1 - 2" parses "1 - 2" + parses "foo \"foo bar\": 1, \"baz\": 2" parses "foo \"foo bar\": 1, \"baz\": 2" + says syntax error on "def foo(break); end" says syntax error on "def foo(break); end" + parses "f.x >>= 2" parses "f.x >>= 2" + parses "Foo(T, {x: X})" parses "Foo(T, {x: X})" + parses "1.as(Bar)" parses "1.as(Bar)" + parses "def foo(@@until); end" parses "def foo(@@until); end" + parses "def foo(a, &block : Int, Float -> Double); end" parses "def foo(a, &block : Int, Float -> Double); end" + parses "def self./(); end;" parses "def self./(); end;" + parses "foo(z: 0, a: n // 2)" parses "foo(z: 0, a: n // 2)" + says syntax error on "a = 1; b = 2; a, b += 1, 2" says syntax error on "a = 1; b = 2; a, b += 1, 2" + parses "->() { }" parses "->() { }" + parses "as(Bar)" parses "as(Bar)" + parses "a = 1; a <<=\n1" parses "a = 1; a <<=\n1" + parses "a = 1; a %= 1" parses "a = 1; a %= 1" + parses "macro &;end" parses "macro &;end" + parses "foo.!" parses "foo.!" + parses "1;+2" parses "1;+2" + parses "def self./(); end;" parses "def self./(); end;" + parses "a.b <<=\n1" parses "a.b <<=\n1" + parses "n =~ 2" parses "n =~ 2" + parses "foo(0, n === 2)" parses "foo(0, n === 2)" + parses "foo(z: 0, a: n < 2)" parses "foo(z: 0, a: n < 2)" + parses "(1)\nif true; end" parses "(1)\nif true; end" + parses "foo.bar.baz" parses "foo.bar.baz" + parses "foo.bar(1).baz" parses "foo.bar(1).baz" + parses "1.0" parses "1.0" + parses "def foo(x @@include); end" parses "def foo(x @@include); end" + parses "foo &->bar" parses "foo &->bar" + parses "{% begin %}%q( %s ){% end %}" parses "{% begin %}%q( %s ){% end %}" + says syntax error on "foo {1, 2}" says syntax error on "foo {1, 2}" + says syntax error on "foo { |(pointerof)| }" says syntax error on "foo { |(pointerof)| }" + parses "foo x, y do\nend" parses "foo x, y do\nend" + parses "->@@foo.foo=" parses "->@@foo.foo=" + says syntax error on "asm(\"\" ::: \"\"(var))" says syntax error on "asm(\"\" ::: \"\"(var))" + parses "instance_alignof(\n Int32\n)" parses "instance_alignof(\n Int32\n)" + parses "{% unless 1; 2; end %}" parses "{% unless 1; 2; end %}" + parses "/(fo\#{\"bar\"}\#{1}o)/" parses "/(fo\#{\"bar\"}\#{1}o)/" + says syntax error on "->::@foo.foo" says syntax error on "->::@foo.foo" + parses "foo.**(1, 2) { 3 }" parses "foo.**(1, 2) { 3 }" + says syntax error on "def self.as?; end" says syntax error on "def self.as?; end" + parses "macro foo\n'\\\\'\nend" parses "macro foo\n'\\\\'\nend" + says syntax error on "@@foo :: Foo" says syntax error on "@@foo :: Foo" + parses "def foo(x @unless); end" parses "def foo(x @unless); end" + parses "asm(\"nop\" : \"a\"(0))" parses "asm(\"nop\" : \"a\"(0))" + parses "{% unless 1; 2; else 3; end %}" parses "{% unless 1; 2; else 3; end %}" + parses "n - 2" parses "n - 2" + parses "1 <=> 2" parses "1 <=> 2" + parses "Foo(T, 1)" parses "Foo(T, 1)" + parses "case 1\nwhen .!()\n2\nend" parses "case 1\nwhen .!()\n2\nend" + parses "def <(); end" parses "def <(); end" + parses "1+2*3" parses "1+2*3" + parses "foo.*(1, 2) { 3 }" parses "foo.*(1, 2) { 3 }" + parses "case 1\nin true; 2; end" parses "case 1\nin true; 2; end" + parses "Foo(\nT,\nU,\n)" parses "Foo(\nT,\nU,\n)" + parses "(baz; bar do\nend)" parses "(baz; bar do\nend)" + parses "foo(&block)" parses "foo(&block)" + parses "def foo(@@false); end" parses "def foo(@@false); end" + says syntax error on "foo { |(end)| }" says syntax error on "foo { |(end)| }" + parses "case 1; when x then 2; else; 3; end" parses "case 1; when x then 2; else; 3; end" + parses "foo.=~ do end" parses "foo.=~ do end" + says syntax error on "A = begin; 1; ensure; B = 1; end" says syntax error on "A = begin; 1; ensure; B = 1; end" + parses "struct : Int32" parses "struct : Int32" + parses "foo + 1" parses "foo + 1" + parses "Int[]" parses "Int[]" + parses "foo(a: n * 2)" parses "foo(a: n * 2)" + says syntax error on "def foo; A = 1; end" says syntax error on "def foo; A = 1; end" + parses "enum Foo; private def foo; 1; end; end" parses "enum Foo; private def foo; 1; end; end" + says syntax error on "def foo(var = x : Int); end" says syntax error on "def foo(var = x : Int); end" + says syntax error on "*a, *b = 1" says syntax error on "*a, *b = 1" + parses "foo(z: 0, a: n % 2)" parses "foo(z: 0, a: n % 2)" + says syntax error on "def foo(&a foo); end" says syntax error on "def foo(&a foo); end" + parses "1 rescue 2 if 3" parses "1 rescue 2 if 3" + says syntax error on "unless next; end" says syntax error on "unless next; end" + says syntax error on "a.b() = 1" says syntax error on "a.b() = 1" + says syntax error on "foo { |private| }" says syntax error on "foo { |private| }" + says syntax error on "def foo(foo abstract); end" says syntax error on "def foo(foo abstract); end" + parses "macro []=;end" parses "macro []=;end" + parses "->@foo.foo!" parses "->@foo.foo!" + parses "macro foo\n{%\nif 1\n2\nelse\n3\nend\n%}end" parses "macro foo\n{%\nif 1\n2\nelse\n3\nend\n%}end" + parses "def foo(x @@yield); end" parses "def foo(x @@yield); end" + says syntax error on "next .. 1" says syntax error on "next .. 1" + parses "1.as? Bar" parses "1.as? Bar" + parses "foo.nil?( )" parses "foo.nil?( )" + parses "Foo??" parses "Foo??" + parses "def foo; x { |a, *b| b }; end" parses "def foo; x { |a, *b| b }; end" + parses "def foo(@@true); end" parses "def foo(@@true); end" + parses "def ^; end;" parses "def ^; end;" + parses ":[]=" parses ":[]=" + parses "foo = 1; ->foo.[]=(Int32)" parses "foo = 1; ->foo.[]=(Int32)" + parses "foo(0, n &* 2)" parses "foo(0, n &* 2)" + parses "n < 2" parses "n < 2" + parses "n !~ 2" parses "n !~ 2" + parses "x[0] ? 1 : 0" parses "x[0] ? 1 : 0" + says syntax error on "def foo(foo enum); end" says syntax error on "def foo(foo enum); end" + parses "Foo.bar x.y do\nend" parses "Foo.bar x.y do\nend" + says syntax error on "def =\nend" says syntax error on "def =\nend" + parses "foo 1, a: 1, b: 2\n1" parses "foo 1, a: 1, b: 2\n1" + parses "1 &- 2" parses "1 &- 2" parses "1.tap do; 1; rescue; 2; end" parses "1.tap do; 1; rescue; 2; end" - parses "def foo(include foo); end" parses "def foo(include foo); end" - says syntax error on "'''" says syntax error on "'''" - parses "property with : Int32" parses "property with : Int32" - parses "{% begin %}%Q{ %s }{% end %}" parses "{% begin %}%Q{ %s }{% end %}" - sets correct location of instance variable in proc pointer sets correct location of instance variable in proc pointer - parses "def foo; x { |a| a }; end" parses "def foo; x { |a| a }; end" - parses "def foo(@@def); end" parses "def foo(@@def); end" - says syntax error on "foo { |require| }" says syntax error on "foo { |require| }" + parses "Foo.foo(count: 3).bar { }" parses "Foo.foo(count: 3).bar { }" + parses "def ==(*args, **opts, &); end" parses "def ==(*args, **opts, &); end" + parses "{% begin %}%w( %s ){% end %}" parses "{% begin %}%w( %s ){% end %}" + parses "def ==(); end" parses "def ==(); end" + says syntax error on "foo { |while| }" says syntax error on "foo { |while| }" + parses "nil?( )" parses "nil?( )" + parses "unless foo; 1; else; 2; end" parses "unless foo; 1; else; 2; end" + says syntax error on "1 then" says syntax error on "1 then" + parses "class Foo\nend" parses "class Foo\nend" + parses "Foo(\nx:\nT,\ny:\nU,\n)" parses "Foo(\nx:\nT,\ny:\nU,\n)" + says syntax error on "def foo(foo yield); end" says syntax error on "def foo(foo yield); end" + parses "foo.| do end" parses "foo.| do end" + parses "{} of Int32 -> Int32 => Int32" parses "{} of Int32 -> Int32 => Int32" + parses "/foo/m" parses "/foo/m" + parses "f.x *= 2" parses "f.x *= 2" + says syntax error on "def foo(private); end" says syntax error on "def foo(private); end" + parses "def foo(@[Foo] @[Bar] var : Int32); end" parses "def foo(@[Foo] @[Bar] var : Int32); end" + parses "'a'" parses "'a'" + parses "->Foo.//(Int32)" parses "->Foo.//(Int32)" + parses "def foo(x @case); end" parses "def foo(x @case); end" + parses "private : Int32" parses "private : Int32" + parses "*_ = 1, 2" parses "*_ = 1, 2" + says syntax error on "foo { |until| }" says syntax error on "foo { |until| }" parses "def self.=~(); end;" parses "def self.=~(); end;" - parses "{1 => 2, 3 => 4}" parses "{1 => 2, 3 => 4}" - parses "foo(0, n ^ 2)" parses "foo(0, n ^ 2)" - parses "1 .. 2" parses "1 .. 2" - parses "def type(type); end" parses "def type(type); end" - parses "foo &.each {\n}" parses "foo &.each {\n}" - parses "a = 1; a |= 1" parses "a = 1; a |= 1" - parses "foo./" parses "foo./" - parses "def foo(var1, var2); end" parses "def foo(var1, var2); end" - parses "foo { |a, b, | 1 }" parses "foo { |a, b, | 1 }" - parses "def foo(@@require); end" parses "def foo(@@require); end" - says syntax error on "1 2" says syntax error on "1 2" - parses "n << 2" parses "n << 2" - parses "{\n1,\n2\n}" parses "{\n1,\n2\n}" - parses "case 1\nin Int32; 2; end" parses "case 1\nin Int32; 2; end" - parses "macro foo;unless var;true;end;end" parses "macro foo;unless var;true;end;end" + parses "->@foo.foo" parses "->@foo.foo" + parses "property next : Int32" parses "property next : Int32" + parses "A.new(\"x\", B.new(\"y\"))" parses "A.new(\"x\", B.new(\"y\"))" + parses "<<-EOF.x\n foo\nEOF" parses "<<-EOF.x\n foo\nEOF" + parses "def downto(n)\n1\nend" parses "def downto(n)\n1\nend" + parses "def foo(unless foo); end" parses "def foo(unless foo); end" + parses "1 \\\r\n + 2" parses "1 \\\r\n + 2" + parses "{a: 1}" parses "{a: 1}" + parses "foo.[]= 1, 2" parses "foo.[]= 1, 2" + parses "foo.<= do end" parses "foo.<= do end" + parses "def foo(case foo); end" parses "def foo(case foo); end" + parses "foo = 1; ->foo.!~(Int32)" parses "foo = 1; ->foo.!~(Int32)" + parses "foo = 1; ->foo.>>(Int32)" parses "foo = 1; ->foo.>>(Int32)" + parses "foo.== do end" parses "foo.== do end" + parses "foo.^ do end" parses "foo.^ do end" + parses "macro foo;%var if true;end" parses "macro foo;%var if true;end" + says syntax error on "return & 1" says syntax error on "return & 1" + parses "property asm : Int32" parses "property asm : Int32" + says syntax error on "def foo(foo extend); end" says syntax error on "def foo(foo extend); end" + says syntax error on "return % 1" says syntax error on "return % 1" + parses "foo.as(Bar)" parses "foo.as(Bar)" + says syntax error on "foo { |include| }" says syntax error on "foo { |include| }" + parses "foo.>=" parses "foo.>=" + parses "foo 1, a: 1, b: 2" parses "foo 1, a: 1, b: 2" + parses "def foo(x @@select); end" parses "def foo(x @@select); end" + parses "property rescue : Int32" parses "property rescue : Int32" + parses "a = 1; a >>=\n1" parses "a = 1; a >>=\n1" + says syntax error on "def foo *y; 1; end" says syntax error on "def foo *y; 1; end" + parses "1 + /foo/" parses "1 + /foo/" + says syntax error on "def foo=(a,b); end" says syntax error on "def foo=(a,b); end" + parses "-1" parses "-1" + parses "a ? 1\n : b ? 2\n : c ? 3\n : 0" parses "a ? 1\n : b ? 2\n : c ? 3\n : 0" + parses "property abstract : Int32" parses "property abstract : Int32" + parses "def self.=~; end;" parses "def self.=~; end;" + says syntax error on "def foo(foo false); end" says syntax error on "def foo(foo false); end" + parses "abstract def foo" parses "abstract def foo" + parses "foo.Bar" parses "foo.Bar" + parses "return 1" parses "return 1" + parses "foo ensure 2" parses "foo ensure 2" + parses "def foo(extend foo); end" parses "def foo(extend foo); end" + parses "(1 ... )" parses "(1 ... )" + parses "macro foo\n'\\''\nend" parses "macro foo\n'\\''\nend" + parses "def foo(@[Foo] outer inner); end" parses "def foo(@[Foo] outer inner); end" + says syntax error on "Foo(\"\": T)" says syntax error on "Foo(\"\": T)" + parses "1.x; foo do\nend" parses "1.x; foo do\nend" + parses "def foo(asm foo); end" parses "def foo(asm foo); end" + parses "foo &.[0] = 1" parses "foo &.[0] = 1" + parses "->@foo.foo=" parses "->@foo.foo=" + parses "foo = 1; ->foo.&*(Int32)" parses "foo = 1; ->foo.&*(Int32)" + parses "def self.%; end;" parses "def self.%; end;" + says syntax error on "break ... 1" says syntax error on "break ... 1" + parses "begin\n/ /\nend" parses "begin\n/ /\nend" + sets correct location of tuple type sets correct location of tuple type + says syntax error on "foo { |(instance_sizeof)| }" says syntax error on "foo { |(instance_sizeof)| }" + parses "{[] of Foo, Bar::Baz + 2}" parses "{[] of Foo, Bar::Baz + 2}" + parses "foo 1, 2" parses "foo 1, 2" + says syntax error on "lib Foo%end" says syntax error on "lib Foo%end" + parses "\"hello \" \\\r\n \"world\"" parses "\"hello \" \\\r\n \"world\"" + parses "foo 1, **bar" parses "foo 1, **bar" + parses "def self.foo=\n1\nend" parses "def self.foo=\n1\nend" + parses "property protected : Int32" parses "property protected : Int32" + parses "_, *_, _, _ = 1, 2, 3" parses "_, *_, _, _ = 1, 2, 3" + parses ":\"\\\"foo\\\"\"" parses ":\"\\\"foo\\\"\"" + parses "foo(a: n | 2)" parses "foo(a: n | 2)" says syntax error on "foo { |(break)| }" says syntax error on "foo { |(break)| }" - parses "/fo\#{1}o/" parses "/fo\#{1}o/" - parses "macro foo(@[Foo] *args);end" parses "macro foo(@[Foo] *args);end" - parses "def foo(x = 1, **args)\n1\nend" parses "def foo(x = 1, **args)\n1\nend" - parses "class Foo(T); end" parses "class Foo(T); end" - parses "var.@foo" parses "var.@foo" - parses "foo(0, n + 2)" parses "foo(0, n + 2)" + parses "foo(a: n ** 2)" parses "foo(a: n ** 2)" + says syntax error on "def foo(foo with); end" says syntax error on "def foo(foo with); end" + says syntax error on "foo { |with| }" says syntax error on "foo { |with| }" + parses "macro &*;end" parses "macro &*;end" + parses "case 1\nwhen 1\n2\nend" parses "case 1\nwhen 1\n2\nend" + parses "def self.===(); end;" parses "def self.===(); end;" + parses "a = 1; (a)/b" parses "a = 1; (a)/b" + parses "def ^(); end" parses "def ^(); end" + says syntax error on "self, x = 1, 2" says syntax error on "self, x = 1, 2" parses "a.b &=\n1" parses "a.b &=\n1" - parses "/ /; / /" parses "/ /; / /" - says syntax error on "def foo @@var, █ end" says syntax error on "def foo @@var, █ end" - parses "property unless : Int32" parses "property unless : Int32" + parses "foo = 1; ->foo.bar(Int32)" parses "foo = 1; ->foo.bar(Int32)" + parses "foo(a: n === 2)" parses "foo(a: n === 2)" + says syntax error on "macro foo;{%end};end" says syntax error on "macro foo;{%end};end" + says syntax error on "'a' foo" says syntax error on "'a' foo" + parses "def self.>=(); end;" parses "def self.>=(); end;" + parses "def *; end;" parses "def *; end;" + says syntax error on "{\"foo\" => 1, \"bar\": 2}" says syntax error on "{\"foo\" => 1, \"bar\": 2}" + says syntax error on "def f end" says syntax error on "def f end" + parses "x = 0; a, b = x += 1" parses "x = 0; a, b = x += 1" + says syntax error on "next & 1" says syntax error on "next & 1" + parses "->@foo.foo?" parses "->@foo.foo?" + parses "foo.<" parses "foo.<" + parses "foo.*" parses "foo.*" + parses "property module : Int32" parses "property module : Int32" + parses "def foo(x @yield); end" parses "def foo(x @yield); end" + parses "def foo(@var = 1); 1; end" parses "def foo(@var = 1); 1; end" + parses "def foo(@@require); end" parses "def foo(@@require); end" + parses "def foo(@[Foo] var : Int32); end" parses "def foo(@[Foo] var : Int32); end" + parses "foo(\n1\n)" parses "foo(\n1\n)" + parses "macro &**;end" parses "macro &**;end" + parses "def foo(var1, var2); end" parses "def foo(var1, var2); end" + parses "foo(0, n ^ 2)" parses "foo(0, n ^ 2)" + parses "foo.>(1, 2) { 3 }" parses "foo.>(1, 2) { 3 }" + parses "class Foo(*T); end" parses "class Foo(*T); end" + parses "->::foo!" parses "->::foo!" + says syntax error on "<<-HERE\n One\n \#{1}\n wrong\#{1}\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n wrong\#{1}\n HERE" + says syntax error on "A = foo { B = 1 }" says syntax error on "A = foo { B = 1 }" + parses "1.[]?(2)" parses "1.[]?(2)" + parses "def ===(); end" parses "def ===(); end" + parses "foo.>(1, 2)" parses "foo.>(1, 2)" + parses "puts %i(one two)" parses "puts %i(one two)" + says syntax error on "->(x, y z) { }" says syntax error on "->(x, y z) { }" + parses "foo(a: 1, &block)" parses "foo(a: 1, &block)" + parses "1.as(\n Int32\n)" parses "1.as(\n Int32\n)" + parses "foo(a: n < 2)" parses "foo(a: n < 2)" + parses "def foo;{{@type}};end" parses "def foo;{{@type}};end" + parses "def self.+; end;" parses "def self.+; end;" + parses "def foo(@@yield); end" parses "def foo(@@yield); end" + parses "-> do; 1; rescue; 2; end" parses "-> do; 1; rescue; 2; end" + parses "{\"foo\": 1, \"bar\": 2}" parses "{\"foo\": 1, \"bar\": 2}" + parses "@@foo" parses "@@foo" + parses "def foo; a = 1; a {}; end" parses "def foo; a = 1; a {}; end" parses "def foo(\n&block\n); end" parses "def foo(\n&block\n); end" - parses "def ==(); end;" parses "def ==(); end;" - parses "macro foo;var unless true;end" parses "macro foo;var unless true;end" - sets correct location of argument in named tuple type sets correct location of argument in named tuple type - parses "macro !~;end" parses "macro !~;end" - parses "`foo\\``" parses "`foo\\``" - parses "def **(); end;" parses "def **(); end;" - parses "def >=(*args, **opts); end" parses "def >=(*args, **opts); end" - parses "private def foo; end" parses "private def foo; end" - says syntax error on "*a, *b = 1" says syntax error on "*a, *b = 1" - parses "a = 1; a rescue a" parses "a = 1; a rescue a" - parses "foo = 1; ->foo.&+(Int32)" parses "foo = 1; ->foo.&+(Int32)" - says syntax error on "next <= 1" says syntax error on "next <= 1" - says syntax error on "case return; when 1; end; end" says syntax error on "case return; when 1; end; end" - parses "foo(x, *bar, *baz, y)" parses "foo(x, *bar, *baz, y)" - parses "def foo(var : Char[256]); end" parses "def foo(var : Char[256]); end" - parses "->@@foo.foo" parses "->@@foo.foo" - parses "def foo(case foo); end" parses "def foo(case foo); end" - parses "foo = 1; ->foo.**(Int32)" parses "foo = 1; ->foo.**(Int32)" - parses "def >=(); end" parses "def >=(); end" - says syntax error on "fun Foo : Int64\nend" says syntax error on "fun Foo : Int64\nend" - parses "n >= 2" parses "n >= 2" - parses "{[] of Foo, Bar::Baz.new}" parses "{[] of Foo, Bar::Baz.new}" - says syntax error on "def foo(x : U) forall U, U; end" says syntax error on "def foo(x : U) forall U, U; end" - parses "foo %q" parses "foo %q" - parses "->@@foo.foo?" parses "->@@foo.foo?" - parses "def foo(@@begin); end" parses "def foo(@@begin); end" - says syntax error on "Foo{one: :two, three: :four}" says syntax error on "Foo{one: :two, three: :four}" - parses "until : Int32" parses "until : Int32" - parses "def ==; end;" parses "def ==; end;" - says syntax error on "foo[next]" says syntax error on "foo[next]" - says syntax error on "macro foo(**x, **y)" says syntax error on "macro foo(**x, **y)" - parses "foo { a = 1 }; a" parses "foo { a = 1 }; a" - parses ":[]?" parses ":[]?" - parses "n &* 2" parses "n &* 2" - parses "{% begin %}%r|\\A|{% end %}" parses "{% begin %}%r|\\A|{% end %}" - parses "/fo\\so/" parses "/fo\\so/" - says syntax error on "foo { |(end)| }" says syntax error on "foo { |(end)| }" + parses "lib LibC; struct Foo; x : Int**; end end" parses "lib LibC; struct Foo; x : Int**; end end" + parses "{% begin %}%x| %s |{% end %}" parses "{% begin %}%x| %s |{% end %}" + parses "macro foo;bar{% for x in y %}\\ \n body{% end %}baz;end" parses "macro foo;bar{% for x in y %}\\ \n body{% end %}baz;end" + parses "->Foo.foo" parses "->Foo.foo" + parses "{} of Int => Double" parses "{} of Int => Double" + parses "case {1}\nin {false}; 2; end" parses "case {1}\nin {false}; 2; end" + says syntax error on "foo { |pointerof| }" says syntax error on "foo { |pointerof| }" + parses "def foo(var : Int | Double); end" parses "def foo(var : Int | Double); end" + parses "...2" parses "...2" + parses "<<-HERE\n One \\n Two\n Zero\n HERE" parses "<<-HERE\n One \\n Two\n Zero\n HERE" + parses ":[]=" parses ":[]=" + parses "def foo(until foo); end" parses "def foo(until foo); end" + says syntax error on "def foo(foo include); end" says syntax error on "def foo(foo include); end" + parses "macro **;end" parses "macro **;end" + says syntax error on "def foo :String\nend" says syntax error on "def foo :String\nend" + parses "{[] of Foo, Bar::Baz * 2}" parses "{[] of Foo, Bar::Baz * 2}" + parses "property extend : Int32" parses "property extend : Int32" + parses "lib Foo::Bar\nend" parses "lib Foo::Bar\nend" + says syntax error on "def foo(foo in); end" says syntax error on "def foo(foo in); end" + says syntax error on "enum Foo\n A, B, C\nend\n" says syntax error on "enum Foo\n A, B, C\nend\n" + parses "def foo(@next); end" parses "def foo(@next); end" + parses "foo result : Int32; result" parses "foo result : Int32; result" + says syntax error on "\"hello\" foo" says syntax error on "\"hello\" foo" + parses "foo(n + 2)" parses "foo(n + 2)" + parses "{foo:a, bar:b}" parses "{foo:a, bar:b}" + parses "foo(out @x); @x" parses "foo(out @x); @x" + says syntax error on "1 ... break" says syntax error on "1 ... break" + parses "foo(n | 2)" parses "foo(n | 2)" + parses "def foo(a, @[Foo] &block); end" parses "def foo(a, @[Foo] &block); end" + parses ":foo" parses ":foo" + says syntax error on "def foo(macro); end" says syntax error on "def foo(macro); end" + says syntax error on "def foo(foo return); end" says syntax error on "def foo(foo return); end" + parses "a b() {}" parses "a b() {}" + parses "foo *bar" parses "foo *bar" + parses "-1.0" parses "-1.0" + says syntax error on "a = a" says syntax error on "a = a" + parses "def foo(var); end" parses "def foo(var); end" + says syntax error on "macro foo(x, *); 1; end" says syntax error on "macro foo(x, *); 1; end" + parses "->Foo.|(Int32)" parses "->Foo.|(Int32)" + parses "def ==(other, file = 1); end" parses "def ==(other, file = 1); end" + parses "foo(n << 2)" parses "foo(n << 2)" + parses "case 1\nwhen 1\n2\nend\nif a\nend" parses "case 1\nwhen 1\n2\nend\nif a\nend" + parses "foo(a: n >= 2)" parses "foo(a: n >= 2)" + parses "def foo(class foo); end" parses "def foo(class foo); end" + parses "until true; end;" parses "until true; end;" + parses "pointerof(@a)" parses "pointerof(@a)" + says syntax error on "next ? 1 : 2" says syntax error on "next ? 1 : 2" + parses "foo.!=(1, 2) { 3 }" parses "foo.!=(1, 2) { 3 }" + parses "1 & 2" parses "1 & 2" + parses ":>" parses ":>" + parses "macro foo;bar(end: 1);end" parses "macro foo;bar(end: 1);end" + says syntax error on "def foo(foo protected); end" says syntax error on "def foo(foo protected); end" + parses "foo.!~" parses "foo.!~" + parses "lib LibC\nfun getch = \"get.char\"\nend" parses "lib LibC\nfun getch = \"get.char\"\nend" + parses "a = 1; a &*=\n1" parses "a = 1; a &*=\n1" + parses "{[] of Foo, self.foo}" parses "{[] of Foo, self.foo}" + parses "a = 1; a |=\n1" parses "a = 1; a |=\n1" + parses "1.responds_to?(\n :foo\n)" parses "1.responds_to?(\n :foo\n)" + parses "foo(/ /)" parses "foo(/ /)" + parses "lib LibC; fun foo(a : Int*); end" parses "lib LibC; fun foo(a : Int*); end" + parses "def ===; end;" parses "def ===; end;" + parses "a.b() /3" parses "a.b() /3" + sets correct location of instance variable in proc pointer sets correct location of instance variable in proc pointer + says syntax error on "Foo(T U)" says syntax error on "Foo(T U)" says syntax error on "def foo(until); end" says syntax error on "def foo(until); end" - parses "pointerof : Int32" parses "pointerof : Int32" - parses "foo.%(1, 2) { 3 }" parses "foo.%(1, 2) { 3 }" - says syntax error on "{a: 1, b: 2 c: 3}" says syntax error on "{a: 1, b: 2 c: 3}" - parses "def foo(&block :\n Int ->); end" parses "def foo(&block :\n Int ->); end" - parses "var.@foo.@bar" parses "var.@foo.@bar" - says syntax error on "def foo(foo self); end" says syntax error on "def foo(foo self); end" + parses "def foo; with a yield 1; end" parses "def foo; with a yield 1; end" + parses "@[Foo::Bar]" parses "@[Foo::Bar]" + parses "n << 2" parses "n << 2" + parses "Foo(X, instance_alignof(Int32))" parses "Foo(X, instance_alignof(Int32))" + parses " macro foo(\n @[Foo]\n id,\n @[Bar] name\n );end" parses " macro foo(\n @[Foo]\n id,\n @[Bar] name\n );end" + parses "def >(); end;" parses "def >(); end;" + says syntax error on "def foo\ninclude\nend" says syntax error on "def foo\ninclude\nend" + parses "lib LibC; {% if 1 %}2{% end %}; end" parses "lib LibC; {% if 1 %}2{% end %}; end" + sets correct location of private method in enum sets correct location of private method in enum + parses "break *{1, 2}" parses "break *{1, 2}" + parses "def foo(@lib); end" parses "def foo(@lib); end" + parses "def []=(other, file = 1); end" parses "def []=(other, file = 1); end" + says syntax error on "@[Foo(\"\": 1)]" says syntax error on "@[Foo(\"\": 1)]" + parses "a.b &*=\n1" parses "a.b &*=\n1" + parses "a[0], a[1] = 1, 2" parses "a[0], a[1] = 1, 2" + says syntax error on "{a: 1 b: 2}" says syntax error on "{a: 1 b: 2}" + parses "foo.< do end" parses "foo.< do end" + parses "lib LibC; fun getchar(a : Int, b : Float) : Int; end" parses "lib LibC; fun getchar(a : Int, b : Float) : Int; end" + parses "a = 1; a /=\n1" parses "a = 1; a /=\n1" + parses "foo = 1; foo +1" parses "foo = 1; foo +1" + parses "a/b" parses "a/b" + parses "def foo(var : Int -> Double); end" parses "def foo(var : Int -> Double); end" + parses "foo(z: 0, a: n | 2)" parses "foo(z: 0, a: n | 2)" + sets correct location of named tuple type sets correct location of named tuple type + says syntax error on "def foo(struct); end" says syntax error on "def foo(struct); end" + parses "lib LibC\n$errno : Int32\n$errno2 : Int32\nend" parses "lib LibC\n$errno : Int32\n$errno2 : Int32\nend" + says syntax error on "offsetof(X, 1.0)" says syntax error on "offsetof(X, 1.0)" + parses "foo(a: n << 2)" parses "foo(a: n << 2)" + parses "1 =~ 2" parses "1 =~ 2" + says syntax error on "foo { |(abstract)| }" says syntax error on "foo { |(abstract)| }" + parses "->::foo?" parses "->::foo?" + parses "a = 1; a += 10 if a += 20" parses "a = 1; a += 10 if a += 20" + parses "def |(); end;" parses "def |(); end;" + parses "def foo(@[Foo] **args); end" parses "def foo(@[Foo] **args); end" + parses "return *{1, 2}" parses "return *{1, 2}" + says syntax error on "<<-'HERE\n" says syntax error on "<<-'HERE\n" + parses "Foo(\"foo bar\": U)" parses "Foo(\"foo bar\": U)" + parses "1 | 2" parses "1 | 2" + parses "def foo(var = 1); end" parses "def foo(var = 1); end" + parses "a = 1; a &+=\n1" parses "a = 1; a &+=\n1" + says syntax error on "next < 1" says syntax error on "next < 1" + parses "x : *T -> R" parses "x : *T -> R" + says syntax error on "foo { |(sizeof)| }" says syntax error on "foo { |(sizeof)| }" + parses "1 !~ 2" parses "1 !~ 2" + says syntax error on "<<-HERE\n One\nwrong\n Zero\n HERE" says syntax error on "<<-HERE\n One\nwrong\n Zero\n HERE" + says syntax error on "foo { |(unless)| }" says syntax error on "foo { |(unless)| }" + parses "macro foo(@[Foo] var);end" parses "macro foo(@[Foo] var);end" + parses "def foo(x @offsetof); end" parses "def foo(x @offsetof); end" + parses "{{ foo &.nil? }}" parses "{{ foo &.nil? }}" + parses "\"hello \"\\\n\"world\"" parses "\"hello \"\\\n\"world\"" + parses "foo ..2" parses "foo ..2" + parses "include Foo" parses "include Foo" + parses "foo = 1; ->foo.^(Int32)" parses "foo = 1; ->foo.^(Int32)" + parses "b.c ||= 1" parses "b.c ||= 1" + parses "f.x Foo.new" parses "f.x Foo.new" + says syntax error on "break &** 1" says syntax error on "break &** 1" + parses "foo = 1; ->foo./(Int32)" parses "foo = 1; ->foo./(Int32)" + says syntax error on "1 if break" says syntax error on "1 if break" + parses "lib LibC\nfun getchar(...)\nend" parses "lib LibC\nfun getchar(...)\nend" + parses "lib LibC; struct Foo; {% if 1 %}2{% end %}; end; end" parses "lib LibC; struct Foo; {% if 1 %}2{% end %}; end; end" + parses "instance_sizeof(\n Int32\n)" parses "instance_sizeof(\n Int32\n)" + parses "case\nwhen true\n1\nend" parses "case\nwhen true\n1\nend" + parses "foo.* do end" parses "foo.* do end" + parses "case : Int32" parses "case : Int32" + parses "nil : Int32" parses "nil : Int32" + says syntax error on "def self.responds_to?; end" says syntax error on "def self.responds_to?; end" + parses ":\"\"" parses ":\"\"" + parses "1 &+ 2" parses "1 &+ 2" + parses "foo z: out x; x" parses "foo z: out x; x" + parses "break 1, 2" parses "break 1, 2" + says syntax error on "foo :: Foo" says syntax error on "foo :: Foo" + parses "foo.bar = (1).abs" parses "foo.bar = (1).abs" + parses "A = 1" parses "A = 1" + parses "foo[\nfoo[\n1\n]\n]" parses "foo[\nfoo[\n1\n]\n]" parses "a.b / 2" parses "a.b / 2" - parses "next {1, 2}" parses "next {1, 2}" - parses "def foo(@@protected); end" parses "def foo(@@protected); end" - parses "->Foo.==(Int32)" parses "->Foo.==(Int32)" - parses "{a: 1, b: 2}" parses "{a: 1, b: 2}" - parses "1 || 2" parses "1 || 2" - parses "1 / 2" parses "1 / 2" - parses "Foo({x: X})" parses "Foo({x: X})" - parses "{% if true %}\n{% end %}\n{% if true %}\n{% end %}" parses "{% if true %}\n{% end %}\n{% if true %}\n{% end %}" - parses "[1] /2" parses "[1] /2" - parses "lib LibC; enum Foo; A = 1; B; end end" parses "lib LibC; enum Foo; A = 1; B; end end" - parses "include : Int32" parses "include : Int32" - parses "break : Int32" parses "break : Int32" - says syntax error on "a {} += 1" says syntax error on "a {} += 1" - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) ::)" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) ::)" - parses "n ^ 2" parses "n ^ 2" - parses "if foo; 1; else; 2; end" parses "if foo; 1; else; 2; end" - says syntax error on "a {}, b = 1" says syntax error on "a {}, b = 1" - says syntax error on "asm(\"nop\" :::: \"\#{volatile}\")" says syntax error on "asm(\"nop\" :::: \"\#{volatile}\")" - parses "def foo(@module); end" parses "def foo(@module); end" - parses "a = 1; a %= 1" parses "a = 1; a %= 1" - parses "def foo(x @sizeof); end" parses "def foo(x @sizeof); end" - parses "break;" parses "break;" - says syntax error on "def foo(foo in); end" says syntax error on "def foo(foo in); end" - parses "foo(bar { })" parses "foo(bar { })" - parses "a = 1; pointerof(a)" parses "a = 1; pointerof(a)" + parses "asm(\"nop\" : \"a\"(0) : \"b\"(1))" parses "asm(\"nop\" : \"a\"(0) : \"b\"(1))" + parses "def foo(require foo); end" parses "def foo(require foo); end" + says syntax error on "foo(\"bar\" \"baz\")" says syntax error on "foo(\"bar\" \"baz\")" + parses "macro |;end" parses "macro |;end" + parses "->::foo" parses "->::foo" parses "Foo(X, instance_sizeof(Int32))" parses "Foo(X, instance_sizeof(Int32))" - parses "foo 1, 2" parses "foo 1, 2" - parses "module Foo(T); end" parses "module Foo(T); end" - parses "f.x ^= 2" parses "f.x ^= 2" - sets correct location of annotation in enum sets correct location of annotation in enum + parses "lib LibC\nfun getch = \"get.char\"(x : Int32)\nend" parses "lib LibC\nfun getch = \"get.char\"(x : Int32)\nend" + parses "foo(z: 0, a: n - 2)" parses "foo(z: 0, a: n - 2)" + parses "lib LibC\nfun getchar : (->)?\nend" parses "lib LibC\nfun getchar : (->)?\nend" + says syntax error on "foo { |module| }" says syntax error on "foo { |module| }" + parses "<<-FOO\n\t 1\n\t FOO" parses "<<-FOO\n\t 1\n\t FOO" + parses "foo.+(1, 2)" parses "foo.+(1, 2)" + parses "foo.nil?" parses "foo.nil?" + parses "a == / /" parses "a == / /" + says syntax error on "b, 1 == 2, a = 4" says syntax error on "b, 1 == 2, a = 4" + parses "+1" parses "+1" + parses "/foo/imximx" parses "/foo/imximx" + parses "foo(out x); x" parses "foo(out x); x" parses "foo = 1; ->foo.>=(Int32)" parses "foo = 1; ->foo.>=(Int32)" - parses "def foo(x @pointerof); end" parses "def foo(x @pointerof); end" - parses "def foo(var : self*); end" parses "def foo(var : self*); end" - says syntax error on "foo { |(false)| }" says syntax error on "foo { |(false)| }" - says syntax error on "def foo\ninclude\nend" says syntax error on "def foo\ninclude\nend" - says syntax error on "a.[]() = 1" says syntax error on "a.[]() = 1" - parses "1 <= 2" parses "1 <= 2" - says syntax error on "next > 1" says syntax error on "next > 1" - parses "def foo(macro foo); end" parses "def foo(macro foo); end" - parses "case\n1\nwhen 1\n2\nend\nif a\nend" parses "case\n1\nwhen 1\n2\nend\nif a\nend" - parses "{% begin %}%x[ %s ]{% end %}" parses "{% begin %}%x[ %s ]{% end %}" - parses "def !=(*args, **opts); end" parses "def !=(*args, **opts); end" - parses "{A::B => 1, C::D => 2}" parses "{A::B => 1, C::D => 2}" - parses "@a : Foo = 1" parses "@a : Foo = 1" - parses ":[]?" parses ":[]?" + says syntax error on "next | 1" says syntax error on "next | 1" + parses "foo.<(1, 2)" parses "foo.<(1, 2)" + parses "def foo(x y); y; end" parses "def foo(x y); y; end" + parses "foo.[]=" parses "foo.[]=" + says syntax error on "def foo(**args, **args2); end" says syntax error on "def foo(**args, **args2); end" + says syntax error on "foo(1, 2, 3 end" says syntax error on "foo(1, 2, 3 end" + parses "def foo(nil foo); end" parses "def foo(nil foo); end" + parses "foo(z: 0, a: n ** 2)" parses "foo(z: 0, a: n ** 2)" + parses "asm(\"nop\" :: : :)" parses "asm(\"nop\" :: : :)" + parses "puts %w(one two)" parses "puts %w(one two)" + parses "[1] /2" parses "[1] /2" + parses "foo(z: 0, a: n / 2)" parses "foo(z: 0, a: n / 2)" + parses "1 / 2" parses "1 / 2" + parses "{A::B}" parses "{A::B}" + parses "f.x %= 2" parses "f.x %= 2" + parses "puts {{*1}}" parses "puts {{*1}}" + parses "def foo(@until); end" parses "def foo(@until); end" + parses ":<=>" parses ":<=>" + parses "->\n:\nInt32\n{\n}" parses "->\n:\nInt32\n{\n}" + says syntax error on "return false foo" says syntax error on "return false foo" + parses "foo(0, n >= 2)" parses "foo(0, n >= 2)" parses "def self.foo()\n1\nend" parses "def self.foo()\n1\nend" - parses "->Foo.>=(Int32)" parses "->Foo.>=(Int32)" - parses "pointerof(\n foo\n)" parses "pointerof(\n foo\n)" - says syntax error on "foo[break]" says syntax error on "foo[break]" - parses "a = 1; yield a rescue a" parses "a = 1; yield a rescue a" - parses "->Foo.foo?" parses "->Foo.foo?" - parses "foo %q()" parses "foo %q()" - says syntax error on "next << 1" says syntax error on "next << 1" - parses "foo %x" parses "foo %x" - parses "def foo(yield foo); end" parses "def foo(yield foo); end" - parses "->Foo.+(Int32)" parses "->Foo.+(Int32)" - parses "def <=(*args, **opts); end" parses "def <=(*args, **opts); end" - parses "macro foo;bar{% if x %}body{% elsif y %}body2{% else %}body3{%end%}baz;end" parses "macro foo;bar{% if x %}body{% elsif y %}body2{% else %}body3{%end%}baz;end" - says syntax error on "{a: 1, a: 2}" says syntax error on "{a: 1, a: 2}" - parses "module Foo(*T); end" parses "module Foo(*T); end" - parses "def self.[]?; end" parses "def self.[]?; end" - parses "(bar do\nend)" parses "(bar do\nend)" - parses "foo x do\nend" parses "foo x do\nend" - parses "def foo(@alias); end" parses "def foo(@alias); end" - parses "def foo(@@include); end" parses "def foo(@@include); end" - parses "case {1, 2}\nwhen {3, 4}\n5\nend" parses "case {1, 2}\nwhen {3, 4}\n5\nend" - parses "a : Foo*" parses "a : Foo*" - says syntax error on " {1 => end" says syntax error on " {1 => end" - says syntax error on "Hash {foo: 1} of Int32 => Int32" says syntax error on "Hash {foo: 1} of Int32 => Int32" - says syntax error on "next &+ 1" says syntax error on "next &+ 1" - parses "def self.-; end;" parses "def self.-; end;" - parses "def foo(x)\n x\nend; foo = 1; b = 2; foo -b" parses "def foo(x)\n x\nend; foo = 1; b = 2; foo -b" - parses "1 <=> 2" parses "1 <=> 2" - parses "a = 1\nfoo - a" parses "a = 1\nfoo - a" - parses "-> do end" parses "-> do end" - parses "puts __LINE__" parses "puts __LINE__" - parses "n &+ 2" parses "n &+ 2" - says syntax error on "def foo(with); end" says syntax error on "def foo(with); end" - parses "<<-HERE\n \#{1}One\n \#{2}Zero\n HERE" parses "<<-HERE\n \#{1}One\n \#{2}Zero\n HERE" - parses "<<-HERE\n \#{1} \#{2}\n HERE" parses "<<-HERE\n \#{1} \#{2}\n HERE" - parses "next 1, *2" parses "next 1, *2" - parses "puts %i(one two)" parses "puts %i(one two)" - parses "enum : Int32" parses "enum : Int32" - parses ":>" parses ":>" - parses "foo = 1; foo(-1)" parses "foo = 1; foo(-1)" - parses "a = 1; a **=\n1" parses "a = 1; a **=\n1" - parses "-> do; 1; rescue; 2; end" parses "-> do; 1; rescue; 2; end" - parses "(foo bar do\nend)" parses "(foo bar do\nend)" - parses "a ? 1 :\n b ? 2 :\n c ? 3\n : 0" parses "a ? 1 :\n b ? 2 :\n c ? 3\n : 0" - parses "foo -1.0, -2.0" parses "foo -1.0, -2.0" - parses "with : Int32" parses "with : Int32" - parses "foo.% do end" parses "foo.% do end" - parses "foo.== 1, 2" parses "foo.== 1, 2" - says syntax error on "a = 1; a += next" says syntax error on "a = 1; a += next" - parses "Foo({X, Y})" parses "Foo({X, Y})" - parses "1 * 2" parses "1 * 2" - parses "property end : Int32" parses "property end : Int32" - parses "def !=; end;" parses "def !=; end;" - parses "def foo(@[Foo] &@block); end" parses "def foo(@[Foo] &@block); end" - parses "foo = 1; ->foo.foo" parses "foo = 1; ->foo.foo" - says syntax error on "macro foo(x, *); 1; end" says syntax error on "macro foo(x, *); 1; end" - parses "foo(0, n > 2)" parses "foo(0, n > 2)" - says syntax error on "a.b(), c.d = 1" says syntax error on "a.b(), c.d = 1" - parses "/(fo\#{\"bar\"}\#{1}o)/" parses "/(fo\#{\"bar\"}\#{1}o)/" - parses "def foo(bar = 1\n); 2; end" parses "def foo(bar = 1\n); 2; end" - parses "Foo(Bar(T | U))" parses "Foo(Bar(T | U))" + parses "1 +2.0" parses "1 +2.0" + parses "a.foo(&block)" parses "a.foo(&block)" + parses "->::Foo.foo" parses "->::Foo.foo" + parses "1 -2.0" parses "1 -2.0" + says syntax error on "a {} += 1" says syntax error on "a {} += 1" + parses "def foo(@@break); end" parses "def foo(@@break); end" + says syntax error on "def foo(x : U) forall U,; end" says syntax error on "def foo(x : U) forall U,; end" + parses "extend Foo" parses "extend Foo" + parses "return 1, *2" parses "return 1, *2" + says syntax error on "def foo(offsetof); end" says syntax error on "def foo(offsetof); end" + says syntax error on "def foo(x = 1, y); end" says syntax error on "def foo(x = 1, y); end" + parses "foo\n.bar" parses "foo\n.bar" + says syntax error on "foo { |case| }" says syntax error on "foo { |case| }" + parses "def foo(x @@protected); end" parses "def foo(x @@protected); end" + says syntax error on "require 1" says syntax error on "require 1" + parses "call @foo.bar" parses "call @foo.bar" + parses "def >=(); end;" parses "def >=(); end;" + parses "foo(&.block)" parses "foo(&.block)" + parses "property while : Int32" parses "property while : Int32" + parses "::Foo{\"x\" => \"y\"}" parses "::Foo{\"x\" => \"y\"}" + parses "foo(regex: //)" parses "foo(regex: //)" + parses "def self.^(); end;" parses "def self.^(); end;" + says syntax error on "def responds_to?; end" says syntax error on "def responds_to?; end" + parses "property else : Int32" parses "property else : Int32" + parses "property def : Int32" parses "property def : Int32" + parses "1\n-2" parses "1\n-2" + parses "->Foo.&**(Int32)" parses "->Foo.&**(Int32)" + says syntax error on "a += 1" says syntax error on "a += 1" + parses "yield foo do\nend" parses "yield foo do\nend" + parses "->(x : Int32) { x }" parses "->(x : Int32) { x }" + parses "foo(bar:a, baz:b)" parses "foo(bar:a, baz:b)" + says syntax error on "break >> 1" says syntax error on "break >> 1" + parses "enum Foo; A\nB; C\nD = 1; end" parses "enum Foo; A\nB; C\nD = 1; end" + parses "<<-HERE\n One\n Zero\n HERE" parses "<<-HERE\n One\n Zero\n HERE" + says syntax error on "macro foo.bar;end" says syntax error on "macro foo.bar;end" + parses "foo(&.!)" parses "foo(&.!)" + parses "extend self" parses "extend self" + parses "a = uninitialized Foo; a" parses "a = uninitialized Foo; a" + parses "def foo(self foo); end" parses "def foo(self foo); end" + parses "1\\\r\n + 2" parses "1\\\r\n + 2" + parses "def self.~(); end;" parses "def self.~(); end;" + parses "def foo; a; end" parses "def foo; a; end" + says syntax error on "/foo)/" says syntax error on "/foo)/" + says syntax error on "*a, 1 = 2" says syntax error on "*a, 1 = 2" + parses "def self.!=; end;" parses "def self.!=; end;" + parses "def foo(x @@end); end" parses "def foo(x @@end); end" + parses "a = 1; a &*= 1" parses "a = 1; a &*= 1" + says syntax error on "foo { |offsetof| }" says syntax error on "foo { |offsetof| }" + says syntax error on "yield break" says syntax error on "yield break" + says syntax error on "foo { |next| }" says syntax error on "foo { |next| }" + parses "foo.+(1, 2) { 3 }" parses "foo.+(1, 2) { 3 }" + parses "\"hello \" \\\n \"world\"" parses "\"hello \" \\\n \"world\"" + says syntax error on "foo(**bar, out x)" says syntax error on "foo(**bar, out x)" + says syntax error on "def foo(foo until); end" says syntax error on "def foo(foo until); end" + parses "case {1}\nin {nil}; 2; end" parses "case {1}\nin {nil}; 2; end" + parses "..2" parses "..2" + says syntax error on "macro nil?; end" says syntax error on "macro nil?; end" + parses "1 <= 2 <= 3" parses "1 <= 2 <= 3" + says syntax error on "foo.responds_to?" says syntax error on "foo.responds_to?" + parses ":%" parses ":%" + says syntax error on "*a === 1" says syntax error on "*a === 1" + parses "{% if 1\n x\nend %}" parses "{% if 1\n x\nend %}" + parses "@[Foo(\"hello\")]" parses "@[Foo(\"hello\")]" + parses "foo do |a|; 1; end" parses "foo do |a|; 1; end" + says syntax error on "x--" says syntax error on "x--" + parses "*a = 1" parses "*a = 1" + says syntax error on "def is_a?; end" says syntax error on "def is_a?; end" + says syntax error on "def foo:String\nend" says syntax error on "def foo:String\nend" + parses "x, y = <<-FOO, <<-BAR\nhello\nFOO\nworld\nBAR" parses "x, y = <<-FOO, <<-BAR\nhello\nFOO\nworld\nBAR" + parses "foo(z: 0, a: n + 2)" parses "foo(z: 0, a: n + 2)" + says syntax error on "foo **bar, 1" says syntax error on "foo **bar, 1" + says syntax error on "1 ... return" says syntax error on "1 ... return" + says syntax error on "FOO, BAR = 1, 2" says syntax error on "FOO, BAR = 1, 2" + says syntax error on "fun foo\nFoo = 1" says syntax error on "fun foo\nFoo = 1" + parses "class Foo(Type); end" parses "class Foo(Type); end" + parses "2 * 3 + 4 * 5" parses "2 * 3 + 4 * 5" + parses "/ /" parses "/ /" + says syntax error on "foo { |(typeof)| }" says syntax error on "foo { |(typeof)| }" + parses "{..2}" parses "{..2}" + parses "begin; / /; end" parses "begin; / /; end" + parses "my_def def foo\nloop do\nend\nend" parses "my_def def foo\nloop do\nend\nend" + parses "a\nwhile / /\n/ /\nend" parses "a\nwhile / /\n/ /\nend" + says syntax error on "def foo(while); end" says syntax error on "def foo(while); end" + parses "foo = 1; ->foo.&(Int32)" parses "foo = 1; ->foo.&(Int32)" + parses "def foo : Int32\n1\nend" parses "def foo : Int32\n1\nend" + parses "foo.=== do end" parses "foo.=== do end" + parses "def foo(a, & : Int -> Double); end" parses "def foo(a, & : Int -> Double); end" + parses "def foo(); 1; rescue; 2; end" parses "def foo(); 1; rescue; 2; end" + parses "foo = 1; ->foo.*(Int32)" parses "foo = 1; ->foo.*(Int32)" parses "+1.0" parses "+1.0" - parses "2 / 3 + 4 / 5" parses "2 / 3 + 4 / 5" - parses "puts _" parses "puts _" - parses "foo(n >= 2)" parses "foo(n >= 2)" - parses "def foo(@with); end" parses "def foo(@with); end" - parses "<<-HERE1; <<-HERE2\nHERE1\nhere2\nHERE2" parses "<<-HERE1; <<-HERE2\nHERE1\nhere2\nHERE2" - parses "return {1 => 2}" parses "return {1 => 2}" - says syntax error on "break ? 1 : 2" says syntax error on "break ? 1 : 2" - parses "foo.!" parses "foo.!" - says syntax error on "break &* 1" says syntax error on "break &* 1" - says syntax error on "foo &.&&" says syntax error on "foo &.&&" - says syntax error on "b, 1 == 2, a = 4" says syntax error on "b, 1 == 2, a = 4" - parses "def foo(x @@in); end" parses "def foo(x @@in); end" - parses "foo.bar=(*baz)" parses "foo.bar=(*baz)" - parses "~ 1" parses "~ 1" - parses "def -(); end;" parses "def -(); end;" - parses "b.c ||= 1" parses "b.c ||= 1" - parses "@[Foo(1, foo: 2)]" parses "@[Foo(1, foo: 2)]" - parses "foo = 1; ->foo.[](Int32)" parses "foo = 1; ->foo.[](Int32)" - says syntax error on "def foo(_ y); y; end" says syntax error on "def foo(_ y); y; end" - parses "begin; 1; rescue ex : Foo | Bar; 2; end" parses "begin; 1; rescue ex : Foo | Bar; 2; end" - parses "begin; 1; rescue ::Foo | ::Bar; 2; end" parses "begin; 1; rescue ::Foo | ::Bar; 2; end" - says syntax error on "def foo(protected); end" says syntax error on "def foo(protected); end" - parses "return;" parses "return;" - parses "def foo(x : U) : Int32 forall T, U; end" parses "def foo(x : U) : Int32 forall T, U; end" - parses "def foo(@sizeof); end" parses "def foo(@sizeof); end" - parses "def foo(x @false); end" parses "def foo(x @false); end" - parses "'a'" parses "'a'" - parses "foo(bar:\"a\", baz:\"b\")" parses "foo(bar:\"a\", baz:\"b\")" - parses "-1_i64" parses "-1_i64" - says syntax error on "$foo :: Foo" says syntax error on "$foo :: Foo" - parses ":\"foo\"" parses ":\"foo\"" - says syntax error on "\n lib LibFoo\n fun foo(x : Int32\n y : Float64)\n end\n " says syntax error on "\n lib LibFoo\n fun foo(x : Int32\n y : Float64)\n end\n " - parses "lib LibC\n$errno = Foo : Int32\nend" parses "lib LibC\n$errno = Foo : Int32\nend" - says syntax error on "macro is_a?; end" says syntax error on "macro is_a?; end" - parses "foo(n + 2)" parses "foo(n + 2)" - parses "{% begin %}%x< %s >{% end %}" parses "{% begin %}%x< %s >{% end %}" + says syntax error on "def foo(yield); end" says syntax error on "def foo(yield); end" + parses "a.b /2/" parses "a.b /2/" + says syntax error on "def as; end" says syntax error on "def as; end" + parses "foo.is_a?(Const)" parses "foo.is_a?(Const)" + parses "a = 1; a += 1" parses "a = 1; a += 1" + parses "f.x &*= 2" parses "f.x &*= 2" + parses "def >; end;" parses "def >; end;" + says syntax error on "def foo(return); end" says syntax error on "def foo(return); end" + says syntax error on "->::foo.foo" says syntax error on "->::foo.foo" + parses "break *1" parses "break *1" + parses "f ->{ a do\n end\n }" parses "f ->{ a do\n end\n }" + parses "foo % w()" parses "foo % w()" + parses "while true; end\nif true; end" parses "while true; end\nif true; end" + parses "macro foo(\na = 0\n)\nend" parses "macro foo(\na = 0\n)\nend" + parses "macro foo;if %var;true;end;end" parses "macro foo;if %var;true;end;end" + says syntax error on "foo { |(extend)| }" says syntax error on "foo { |(extend)| }" + parses "def foo(&block); end" parses "def foo(&block); end" + parses "foo = 1; foo -1" parses "foo = 1; foo -1" + parses "f.x += 2" parses "f.x += 2" + parses "def foo(x @alias); end" parses "def foo(x @alias); end" + parses "foo.>= do end" parses "foo.>= do end" + parses "a.b %=\n1" parses "a.b %=\n1" + says syntax error on "foo { |yield| }" says syntax error on "foo { |yield| }" + says syntax error on "def self.is_a?; end" says syntax error on "def self.is_a?; end" + says syntax error on "foo { |(while)| }" says syntax error on "foo { |(while)| }" + says syntax error on "def foo var\n end" says syntax error on "def foo var\n end" + parses "begin 1 end / 2" parses "begin 1 end / 2" + parses "foo = 1; foo &x" parses "foo = 1; foo &x" + parses "def foo(x @pointerof); end" parses "def foo(x @pointerof); end" + says syntax error on "case break; when 1; end; end" says syntax error on "case break; when 1; end; end" + says syntax error on "def as?; end" says syntax error on "def as?; end" + parses "T::U/1" parses "T::U/1" + parses "def foo(x @typeof); end" parses "def foo(x @typeof); end" parses "a = 1; a /b" parses "a = 1; a /b" - parses "{% begin %}%{ %s }{% end %}" parses "{% begin %}%{ %s }{% end %}" - parses "class Foo\ndef foo; end; end" parses "class Foo\ndef foo; end; end" - says syntax error on "def foo() :String\nend" says syntax error on "def foo() :String\nend" - parses "lib LibC\nfun getchar\nend" parses "lib LibC\nfun getchar\nend" - parses "foo(a: 1\n)" parses "foo(a: 1\n)" - parses "foo.+(1, 2)" parses "foo.+(1, 2)" - parses "foo(n &* 2)" parses "foo(n &* 2)" - parses "->::foo" parses "->::foo" - parses "x[0] ? 1 : 0" parses "x[0] ? 1 : 0" - parses "{{ //.options }}" parses "{{ //.options }}" - parses "def foo; end; if false; 1; else; 2; end" parses "def foo; end; if false; 1; else; 2; end" - parses "lib LibC\nfun getch = \"get.char\" : Int32\nend" parses "lib LibC\nfun getch = \"get.char\" : Int32\nend" - parses "include Foo\nif true; end" parses "include Foo\nif true; end" - parses "foo &.nil?" parses "foo &.nil?" - parses "case / /; when / /; / /; else; / /; end" parses "case / /; when / /; / /; else; / /; end" - parses "x = 1 ensure 2" parses "x = 1 ensure 2" - says syntax error on "foo { |while| }" says syntax error on "foo { |while| }" - parses "lib LibFoo\nend\nif true\nend" parses "lib LibFoo\nend\nif true\nend" - parses "foo 1, **bar" parses "foo 1, **bar" - parses "def foo(out foo); end" parses "def foo(out foo); end" - parses "foo.[0]" parses "foo.[0]" - says syntax error on "foo { |(lib)| }" says syntax error on "foo { |(lib)| }" - parses "foo(a: n * 2)" parses "foo(a: n * 2)" - parses "Foo(T, 1, U)" parses "Foo(T, 1, U)" - parses "+1_i64" parses "+1_i64" - parses "require \"foo\"" parses "require \"foo\"" - says syntax error on "def foo(**args, **args2); end" says syntax error on "def foo(**args, **args2); end" - parses "->@foo.foo!" parses "->@foo.foo!" - parses "foo result : Int32; result" parses "foo result : Int32; result" - parses "def foo(x, *, y, &); 1; end" parses "def foo(x, *, y, &); 1; end" - says syntax error on "def self.responds_to?; end" says syntax error on "def self.responds_to?; end" - parses "{foo:\"a\", bar:\"b\"}" parses "{foo:\"a\", bar:\"b\"}" - parses "foo(1, **bar)" parses "foo(1, **bar)" - calls with blocks within index operator (#12818) - parses "foo[bar { 1 }]" parses "foo[bar { 1 }]" - parses "foo.[](bar do; 1; end)" parses "foo.[](bar do; 1; end)" - parses "foo.[](bar { 1 })" parses "foo.[](bar { 1 })" - parses "foo[bar do; 1; end]" parses "foo[bar do; 1; end]" - parses "foo.[bar { 1 }]" parses "foo.[bar { 1 }]" - parses "foo.[bar do; 1; end]" parses "foo.[bar do; 1; end]" - says syntax error on "return 1 foo" says syntax error on "return 1 foo" - says syntax error on "if next; end" says syntax error on "if next; end" - parses "{% begin %}%w| %s |{% end %}" parses "{% begin %}%w| %s |{% end %}" - says syntax error on "foo { |(until)| }" says syntax error on "foo { |(until)| }" - parses "/foo/i" parses "/foo/i" - says syntax error on "def foo(foo offsetof); end" says syntax error on "def foo(foo offsetof); end" - parses "asm(\"nop\" ::)" parses "asm(\"nop\" ::)" - says syntax error on "foo { |(unless)| }" says syntax error on "foo { |(unless)| }" - parses "1.as?(Bar)" parses "1.as?(Bar)" - parses "foo.&" parses "foo.&" + parses "asm : Int32" parses "asm : Int32" + parses "def foo(@while); end" parses "def foo(@while); end" + parses ":===" parses ":===" + parses "puts __DIR__" parses "puts __DIR__" + parses "foo %i" parses "foo %i" + parses "Foo()" parses "Foo()" + parses "a\nwhile / /; / /; end" parses "a\nwhile / /; / /; end" + parses "foo.*(1, 2)" parses "foo.*(1, 2)" + says syntax error on "class Foo(T, U V)" says syntax error on "class Foo(T, U V)" + says syntax error on "macro !;end" says syntax error on "macro !;end" single splats inside container literals - parses "case 1\nwhen {*2}; 3; end" parses "case 1\nwhen {*2}; 3; end" - parses "{*1, *2}" parses "{*1, *2}" - parses "[*1, 2]" parses "[*1, 2]" - parses "{*1 * 2}" parses "{*1 * 2}" - says syntax error on "case {*1}\nwhen {2}; 3; end" says syntax error on "case {*1}\nwhen {2}; 3; end" - parses "[1, *2]" parses "[1, *2]" - says syntax error on "{*1 => 2}" says syntax error on "{*1 => 2}" - parses "[1, *2, 3, *4, 5]" parses "[1, *2, 3, *4, 5]" - parses "[*[*[1]], *[2]]" parses "[*[*[1]], *[2]]" - parses "{1, *2, 3, *4, 5}" parses "{1, *2, 3, *4, 5}" + parses "[*1 ** 2]" parses "[*1 ** 2]" + parses "[*1]" parses "[*1]" parses "{*1, 2}" parses "{*1, 2}" - parses "[*1, *2]" parses "[*1, *2]" + parses "[1, *2, 3, *4, 5]" parses "[1, *2, 3, *4, 5]" parses "{*1}" parses "{*1}" - parses "{1, *2}" parses "{1, *2}" parses "Set {*{1} * 2}" parses "Set {*{1} * 2}" + parses "{*1, *2}" parses "{*1, *2}" + says syntax error on "case {1}\nwhen {*2}; 3; end" says syntax error on "case {1}\nwhen {*2}; 3; end" + says syntax error on "{*1 => 2}" says syntax error on "{*1 => 2}" + parses "{1, *2, 3, *4, 5}" parses "{1, *2, 3, *4, 5}" parses "Set {*1, 2, *3}" parses "Set {*1, 2, *3}" - says syntax error on "{*a: 1}" says syntax error on "{*a: 1}" + parses "[*[*[1]], *[2]]" parses "[*[*[1]], *[2]]" says syntax error on "{a: 1, *2}" says syntax error on "{a: 1, *2}" - parses "[*1 ** 2]" parses "[*1 ** 2]" - parses "[*1]" parses "[*1]" - says syntax error on "{1 => 2, *3}" says syntax error on "{1 => 2, *3}" + parses "[*1, *2]" parses "[*1, *2]" parses "x = {*1}" parses "x = {*1}" - says syntax error on "case {1}\nwhen {*2}; 3; end" says syntax error on "case {1}\nwhen {*2}; 3; end" - parses "foo &.@bar" parses "foo &.@bar" - parses "def foo(x @@def); end" parses "def foo(x @@def); end" + parses "[*1, 2]" parses "[*1, 2]" + parses "case 1\nwhen {*2}; 3; end" parses "case 1\nwhen {*2}; 3; end" + parses "{*1 * 2}" parses "{*1 * 2}" + says syntax error on "{1 => 2, *3}" says syntax error on "{1 => 2, *3}" + parses "[1, *2]" parses "[1, *2]" + says syntax error on "{*a: 1}" says syntax error on "{*a: 1}" + says syntax error on "case {*1}\nwhen {2}; 3; end" says syntax error on "case {*1}\nwhen {2}; 3; end" + parses "{1, *2}" parses "{1, *2}" + parses "def self.-; end;" parses "def self.-; end;" + parses "foo.% 1, 2" parses "foo.% 1, 2" + parses "def foo(**args : **Foo)\n1\nend" parses "def foo(**args : **Foo)\n1\nend" + parses "{\"foo\": 1}" parses "{\"foo\": 1}" + says syntax error on "return >= 1" says syntax error on "return >= 1" parses "def foo(var : Int, Float -> Double); end" parses "def foo(var : Int, Float -> Double); end" - says syntax error on "<<-HERE\n One\n \#{1}\n wrong\#{1}\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n wrong\#{1}\n HERE" - parses "macro foo(@[Foo] var);end" parses "macro foo(@[Foo] var);end" - says syntax error on "foo { |with| }" says syntax error on "foo { |with| }" - parses "case 1\nin true; 2; end" parses "case 1\nin true; 2; end" - parses "def foo(x @@private); end" parses "def foo(x @@private); end" - parses "macro foo(x = __LINE__);end" parses "macro foo(x = __LINE__);end" - parses "->Foo.&-(Int32)" parses "->Foo.&-(Int32)" - parses "Foo(T)" parses "Foo(T)" - says syntax error on "def foo(enum); end" says syntax error on "def foo(enum); end" - parses "@@a : Foo = 1" parses "@@a : Foo = 1" - parses "lib LibC; struct Foo; x, y, z : Int; end end" parses "lib LibC; struct Foo; x, y, z : Int; end end" - says syntax error on "def foo(foo next); end" says syntax error on "def foo(foo next); end" - parses "foo = 1; ->foo.|(Int32)" parses "foo = 1; ->foo.|(Int32)" - parses "foo % i()" parses "foo % i()" - says syntax error on "<<-'HERE\n" says syntax error on "<<-'HERE\n" - parses ":=~" parses ":=~" - parses "->Foo.<(Int32)" parses "->Foo.<(Int32)" - says syntax error on "foo { |typeof| }" says syntax error on "foo { |typeof| }" - says syntax error on "def foo(foo extend); end" says syntax error on "def foo(foo extend); end" - parses "property if : Int32" parses "property if : Int32" - parses "def foo(sizeof foo); end" parses "def foo(sizeof foo); end" - parses "{% if 1\n x\nend %}" parses "{% if 1\n x\nend %}" - parses "1 ensure 2" parses "1 ensure 2" - parses "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2))" parses "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2))" - parses "foo.!~ do end" parses "foo.!~ do end" - says syntax error on "a = 1; a += return" says syntax error on "a = 1; a += return" - parses "->foo!" parses "->foo!" - parses "def self.%(); end;" parses "def self.%(); end;" - parses "foo(z: 0, a: n % 2)" parses "foo(z: 0, a: n % 2)" - says syntax error on "return & 1" says syntax error on "return & 1" - parses "foo.<= 1, 2" parses "foo.<= 1, 2" - parses "%r(foo(bar))" parses "%r(foo(bar))" - parses "foo { |a| 1 }" parses "foo { |a| 1 }" - parses "def foo; with a yield 1; end" parses "def foo; with a yield 1; end" - parses "def foo(x @@if); end" parses "def foo(x @@if); end" - parses "{\n1\n}" parses "{\n1\n}" - parses "foo { |(a, *b, c)| }" parses "foo { |(a, *b, c)| }" - parses "foo(n <= 2)" parses "foo(n <= 2)" - parses "foo(&.!)" parses "foo(&.!)" - says syntax error on "def foo(**a foo); end" says syntax error on "def foo(**a foo); end" - says syntax error on "def foo(foo break); end" says syntax error on "def foo(foo break); end" - parses "def foo(x @@break); end" parses "def foo(x @@break); end" - parses "macro /;end" parses "macro /;end" - parses "foo.bar = {} of Int32 => Int32" parses "foo.bar = {} of Int32 => Int32" - parses "1..;" parses "1..;" - parses "1..\n2.." parses "1..\n2.." - parses "foo %Q()" parses "foo %Q()" - parses "lib Foo::Bar\nend" parses "lib Foo::Bar\nend" - parses "{1 => 2 / 3}" parses "{1 => 2 / 3}" - parses "\"\#{1\n}\"" parses "\"\#{1\n}\"" - parses "def foo(x) : Int32\n1\nend" parses "def foo(x) : Int32\n1\nend" - parses "{1.. => 2};" parses "{1.. => 2};" - parses "1 \\\n + 2" parses "1 \\\n + 2" - parses "+1" parses "+1" - parses "2.3_f32" parses "2.3_f32" - says syntax error on "def foo(asm); end" says syntax error on "def foo(asm); end" - parses "->foo(Int32, Float64)" parses "->foo(Int32, Float64)" - parses "f.x <<= 2" parses "f.x <<= 2" - parses "::foo" parses "::foo" - says syntax error on "foo 1," says syntax error on "foo 1," - says syntax error on "def foo(foo include); end" says syntax error on "def foo(foo include); end" - says syntax error on "macro Foo.bar;end" says syntax error on "macro Foo.bar;end" - parses "lib LibC\n$errno : Int32\n$errno2 : Int32\nend" parses "lib LibC\n$errno : Int32\n$errno2 : Int32\nend" - parses "->Foo.**(Int32)" parses "->Foo.**(Int32)" - parses "[] of Int" parses "[] of Int" - says syntax error on "return < 1" says syntax error on "return < 1" - says syntax error on "{a[]: 1}" says syntax error on "{a[]: 1}" - says syntax error on "foo { |module| }" says syntax error on "foo { |module| }" - parses "->\n:\nInt32\n{\n}" parses "->\n:\nInt32\n{\n}" - says syntax error on "[1 1]" says syntax error on "[1 1]" - says syntax error on "next &** 1" says syntax error on "next &** 1" - parses "def foo(a, &block); end" parses "def foo(a, &block); end" - parses "%q{hello \#{foo} world}" parses "%q{hello \#{foo} world}" - parses "def foo(x @protected); end" parses "def foo(x @protected); end" - says syntax error on "*a if true" says syntax error on "*a if true" - parses "foo(a: 1, &block)" parses "foo(a: 1, &block)" - parses "foo..2" parses "foo..2" - parses "def -(); end" parses "def -(); end" - says syntax error on "def foo():String\nend" says syntax error on "def foo():String\nend" - parses "{% unless 1; 2; end %}" parses "{% unless 1; 2; end %}" - says syntax error on "def foo!=; end" says syntax error on "def foo!=; end" - parses "foo" parses "foo" - parses "foo &./(1)" parses "foo &./(1)" - parses "begin : Int32" parses "begin : Int32" - parses "->Foo::Bar::Baz.foo" parses "->Foo::Bar::Baz.foo" - parses "-> { }" parses "-> { }" - parses "Foo(x: U, y: V)" parses "Foo(x: U, y: V)" - says syntax error on "foo { |(macro)| }" says syntax error on "foo { |(macro)| }" - parses "def foo(x @if); end" parses "def foo(x @if); end" - parses "select\nwhen foo\n2\nwhen bar\n4\nend" parses "select\nwhen foo\n2\nwhen bar\n4\nend" - parses "case {1, 2}\nwhen {3, 4}, {5, 6}\n7\nend" parses "case {1, 2}\nwhen {3, 4}, {5, 6}\n7\nend" + says syntax error on "def foo(foo asm); end" says syntax error on "def foo(foo asm); end" parses "x.foo a: 1, b: 2 " parses "x.foo a: 1, b: 2 " - says syntax error on "next >= 1" says syntax error on "next >= 1" - parses "a.b <<=\n1" parses "a.b <<=\n1" - parses "def foo; with a yield; end" parses "def foo; with a yield; end" - parses "def foo(@return); end" parses "def foo(@return); end" - parses "{{ 1 // 2 }}" parses "{{ 1 // 2 }}" - parses "property struct : Int32" parses "property struct : Int32" - parses "case 1; when 0, 1; 2; else; 3; end" parses "case 1; when 0, 1; 2; else; 3; end" - says syntax error on "foo(&block) {}" says syntax error on "foo(&block) {}" - says syntax error on "a = a" says syntax error on "a = a" - parses "*a, b = 1" parses "*a, b = 1" - says syntax error on "{1, ->{ |x| x } }" says syntax error on "{1, ->{ |x| x } }" - says syntax error on "foo { |struct| }" says syntax error on "foo { |struct| }" - parses "->Foo.>>(Int32)" parses "->Foo.>>(Int32)" - parses "def foo(@@true); end" parses "def foo(@@true); end" - parses "foo.is_a? Const" parses "foo.is_a? Const" - parses "begin\n1\nensure\n2\nend" parses "begin\n1\nensure\n2\nend" - says syntax error on "case 1\nin 1; 2" says syntax error on "case 1\nin 1; 2" - parses "<<-SOME\n Sa\n Se\n SOME" parses "<<-SOME\n Sa\n Se\n SOME" - parses "->::Foo.foo" parses "->::Foo.foo" - parses ":%" parses ":%" - parses "def foo(var : self); end" parses "def foo(var : self); end" - parses "macro foo;bar{% for x, y in z %}body{% end %}baz;end" parses "macro foo;bar{% for x, y in z %}body{% end %}baz;end" - says syntax error on "A = foo(B = 1)" says syntax error on "A = foo(B = 1)" - parses "::A::B" parses "::A::B" - says syntax error on "foo { |break| }" says syntax error on "foo { |break| }" - says syntax error on "self = 1" says syntax error on "self = 1" - parses "foo.<= do end" parses "foo.<= do end" - parses "def foo; yield(1); end" parses "def foo; yield(1); end" - parses "foo\n.bar" parses "foo\n.bar" - parses "foo(n &- 2)" parses "foo(n &- 2)" - parses "foo.bar 1, 2" parses "foo.bar 1, 2" - parses "{\n{1}\n}" parses "{\n{1}\n}" - parses "%q{hello \\n world}" parses "%q{hello \\n world}" - parses "macro !=;end" parses "macro !=;end" - parses "until true; 1; end;" parses "until true; 1; end;" - parses "->Foo.>(Int32)" parses "->Foo.>(Int32)" - parses "def foo(@@private); end" parses "def foo(@@private); end" - parses "2 * (3 + 4)" parses "2 * (3 + 4)" - parses "a[], a[] = 1, 2" parses "a[], a[] = 1, 2" - parses "def <<(); end" parses "def <<(); end" - parses "{% begin %}%i( %s ){% end %}" parses "{% begin %}%i( %s ){% end %}" - says syntax error on "def foo(foo module); end" says syntax error on "def foo(foo module); end" - parses "foo(z: 0, a: n == 2)" parses "foo(z: 0, a: n == 2)" - parses "def foo; a; end" parses "def foo; a; end" - parses "def foo(var : self?); end" parses "def foo(var : self?); end" - parses "a @b-1\nc" parses "a @b-1\nc" - says syntax error on "foo { |(sizeof)| }" says syntax error on "foo { |(sizeof)| }" - says syntax error on "next &- 1" says syntax error on "next &- 1" - parses "def foo(x @alias); end" parses "def foo(x @alias); end" - parses "a = 1; a /=\n1" parses "a = 1; a /=\n1" - says syntax error on "def self.as?; end" says syntax error on "def self.as?; end" - says syntax error on "next === 1" says syntax error on "next === 1" - says syntax error on "foo { |end| }" says syntax error on "foo { |end| }" - parses "def foo(@@break); end" parses "def foo(@@break); end" - parses "def foo(asm foo); end" parses "def foo(asm foo); end" - parses "a = 1; a |=\n1" parses "a = 1; a |=\n1" - parses "foo(z: 0, a: n &* 2)" parses "foo(z: 0, a: n &* 2)" + parses "macro foo(@[Foo] outer inner);end" parses "macro foo(@[Foo] outer inner);end" + parses "return {1 => 2}" parses "return {1 => 2}" parses "foo &.%(1)" parses "foo &.%(1)" - says syntax error on "break[0]" says syntax error on "break[0]" - says syntax error on "fun foo(Int32); end" says syntax error on "fun foo(Int32); end" - parses "property ensure : Int32" parses "property ensure : Int32" - parses "def !=(*args, **opts, &); end" parses "def !=(*args, **opts, &); end" - says syntax error on "next .. 1" says syntax error on "next .. 1" - says syntax error on "foo { |asm| }" says syntax error on "foo { |asm| }" - parses "foo.**" parses "foo.**" - parses "macro foo;bar{% for x in y %}body{% end %}baz;end" parses "macro foo;bar{% for x in y %}body{% end %}baz;end" - parses "lib LibC\n@[Bar]; end" parses "lib LibC\n@[Bar]; end" - parses "foo(0, n - 2)" parses "foo(0, n - 2)" + parses "foo % q()" parses "foo % q()" + parses "1 <= 2" parses "1 <= 2" + parses "Foo?" parses "Foo?" + says syntax error on "a, b.<=" says syntax error on "a, b.<=" + parses "foo Bar { 1 }" parses "foo Bar { 1 }" + parses "{% begin %}%( %s ){% end %}" parses "{% begin %}%( %s ){% end %}" + parses "n % 2" parses "n % 2" + parses ":[]?" parses ":[]?" + parses "foo[0] = 1" parses "foo[0] = 1" + says syntax error on "return[]" says syntax error on "return[]" + parses "foo(&.as(T).bar)" parses "foo(&.as(T).bar)" + parses "def foo(@@enum); end" parses "def foo(@@enum); end" + parses "self" parses "self" + says syntax error on "def foo() :String\nend" says syntax error on "def foo() :String\nend" + says syntax error on "foo[1] = break" says syntax error on "foo[1] = break" + parses "property instance_sizeof : Int32" parses "property instance_sizeof : Int32" + parses "def <=; end;" parses "def <=; end;" + parses "def &+(); end" parses "def &+(); end" + parses "{% begin %}%w| %s |{% end %}" parses "{% begin %}%w| %s |{% end %}" + parses "1_u128" parses "1_u128" + parses "foo begin\nbar do\nend\nend" parses "foo begin\nbar do\nend\nend" + sets correct location of parameter in proc literal sets correct location of parameter in proc literal + parses "def foo(pointerof foo); end" parses "def foo(pointerof foo); end" + parses "def foo(x @false); end" parses "def foo(x @false); end" + says syntax error on "foo { |(alias)| }" says syntax error on "foo { |(alias)| }" + parses "def =~; end" parses "def =~; end" + parses "foo %r" parses "foo %r" + parses "def foo(@@alias); end" parses "def foo(@@alias); end" + says syntax error on "def foo(self); end" says syntax error on "def foo(self); end" + parses "def foo(@@extend); end" parses "def foo(@@extend); end" parses "def foo(begin foo); end" parses "def foo(begin foo); end" - says syntax error on "return | 1" says syntax error on "return | 1" - parses "1 / -2" parses "1 / -2" - says syntax error on "def foo\nalias\nend" says syntax error on "def foo\nalias\nend" - parses "def foo(x @fun); end" parses "def foo(x @fun); end" - says syntax error on "@foo :: Foo" says syntax error on "@foo :: Foo" - says syntax error on "def foo(case); end" says syntax error on "def foo(case); end" - says syntax error on "def foo\nabstract\nend" says syntax error on "def foo\nabstract\nend" - says syntax error on "def foo(fun); end" says syntax error on "def foo(fun); end" - parses "def !=(); end;" parses "def !=(); end;" + parses "asm(\n\"nop\"\n:\n\"a\"(0),\n\"b\"(1)\n:\n\"c\"(2),\n\"d\"(3)\n)" parses "asm(\n\"nop\"\n:\n\"a\"(0),\n\"b\"(1)\n:\n\"c\"(2),\n\"d\"(3)\n)" + parses "foo = 1; ->foo.&**(Int32)" parses "foo = 1; ->foo.&**(Int32)" + parses "case \nwhen 1\n2\nend" parses "case \nwhen 1\n2\nend" parses "->::Foo.foo!" parses "->::Foo.foo!" - parses "case 1; when 2 then /foo/; end" parses "case 1; when 2 then /foo/; end" - parses "1 > 2" parses "1 > 2" - parses "1 =~ 2" parses "1 =~ 2" - says syntax error on "[\n\"foo\"\n\"bar\"\n]" says syntax error on "[\n\"foo\"\n\"bar\"\n]" - parses "foo.bar.as(Bar)" parses "foo.bar.as(Bar)" - parses "asm : Int32" parses "asm : Int32" - parses "foo.**(1, 2) { 3 }" parses "foo.**(1, 2) { 3 }" - parses "foo(z: 0, a: n !~ 2)" parses "foo(z: 0, a: n !~ 2)" + parses "struct Foo; end" parses "struct Foo; end" + parses "def foo(x @@private); end" parses "def foo(x @@private); end" + parses "def !~; end;" parses "def !~; end;" + parses "1 >> 2" parses "1 >> 2" + says syntax error on "foo { |(include)| }" says syntax error on "foo { |(include)| }" + parses "case 1\nwhen .as?(T)\n2\nend" parses "case 1\nwhen .as?(T)\n2\nend" + says syntax error on "def foo\ndef\nend" says syntax error on "def foo\ndef\nend" + parses "[] of {String, ->}" parses "[] of {String, ->}" + parses "sizeof(X)" parses "sizeof(X)" + parses ":\"\\a\\b\\n\\r\\t\\v\\f\\e\"" parses ":\"\\a\\b\\n\\r\\t\\v\\f\\e\"" + parses "foo /a/" parses "foo /a/" + parses "def ===(); end;" parses "def ===(); end;" + parses "foo.** do end" parses "foo.** do end" + says syntax error on "1 while 3" says syntax error on "1 while 3" + parses "foo(n &* 2)" parses "foo(n &* 2)" + parses "def self.[]; end" parses "def self.[]; end" + parses "foo = 1; ->foo.foo?" parses "foo = 1; ->foo.foo?" + parses "def foo(include foo); end" parses "def foo(include foo); end" + parses "Foo({*X, *{Y}})" parses "Foo({*X, *{Y}})" + parses "foo(1, **bar, &block)" parses "foo(1, **bar, &block)" + parses "def foo(@@def); end" parses "def foo(@@def); end" + parses "def foo(var : Char[256]); end" parses "def foo(var : Char[256]); end" + parses "asm(\"nop\" : \"a\"(0), \"b\"(1) : \"c\"(2), \"d\"(3))" parses "asm(\"nop\" : \"a\"(0), \"b\"(1) : \"c\"(2), \"d\"(3))" + says syntax error on "{% unless 1 %} 2 {% elsif 3 %} 3 {% end %}" says syntax error on "{% unless 1 %} 2 {% elsif 3 %} 3 {% end %}" + parses "def foo(typeof foo); end" parses "def foo(typeof foo); end" says syntax error on "break / 1" says syntax error on "break / 1" - parses "a.foo(&block)" parses "a.foo(&block)" - parses "(1 .. )" parses "(1 .. )" - parses "@@foo" parses "@@foo" - parses "a.b -=\n1" parses "a.b -=\n1" - says syntax error on "x : String, a = 4" says syntax error on "x : String, a = 4" - parses "foo.|" parses "foo.|" - parses "\"hello \\\n world\"" parses "\"hello \\\n world\"" - parses "macro foo;if var;true;end;end" parses "macro foo;if var;true;end;end" - parses "foo()" parses "foo()" - parses "foo +1_i64" parses "foo +1_i64" - parses "def foo(x @with); end" parses "def foo(x @with); end" - parses "macro <=;end" parses "macro <=;end" - parses "def foo; a = 1; a {}; end" parses "def foo; a = 1; a {}; end" - says syntax error on "def foo(abstract); end" says syntax error on "def foo(abstract); end" - parses "foo &.bar.baz" parses "foo &.bar.baz" + parses "foo %w()" parses "foo %w()" + parses "def =~(); end;" parses "def =~(); end;" + says syntax error on "return.foo" says syntax error on "return.foo" + parses "{% begin %}%i< %s >{% end %}" parses "{% begin %}%i< %s >{% end %}" + parses "unless : Int32" parses "unless : Int32" + parses "macro foo; 1 + 2 {{ foo }} 3 + 4; end" parses "macro foo; 1 + 2 {{ foo }} 3 + 4; end" + parses "class Foo < self; end" parses "class Foo < self; end" + says syntax error on "Hash{\"foo\": 1}" says syntax error on "Hash{\"foo\": 1}" + parses "~ 1" parses "~ 1" + parses "def foo(with foo); end" parses "def foo(with foo); end" + says syntax error on "1 foo" says syntax error on "1 foo" + parses "f.x **= 2" parses "f.x **= 2" + parses "f.x ^= 2" parses "f.x ^= 2" + parses "-1.0_f32" parses "-1.0_f32" + parses "instance_alignof(X)" parses "instance_alignof(X)" + parses "foo(z: 0, a: n == 2)" parses "foo(z: 0, a: n == 2)" + parses "macro `;end" parses "macro `;end" + says syntax error on "def foo(with); end" says syntax error on "def foo(with); end" + parses "def foo(x @while); end" parses "def foo(x @while); end" + parses "[] of Int" parses "[] of Int" + parses "Foo(\nT\n)" parses "Foo(\nT\n)" + parses "foo 1" parses "foo 1" + parses "x([] of Foo, Bar.new)" parses "x([] of Foo, Bar.new)" parses "{% begin %}%q| %s |{% end %}" parses "{% begin %}%q| %s |{% end %}" - parses "def **(); end" parses "def **(); end" - parses "def foo(x @@false); end" parses "def foo(x @@false); end" - parses "abstract def foo(x) : Int32" parses "abstract def foo(x) : Int32" - parses "macro foo;if %var;true;end;end" parses "macro foo;if %var;true;end;end" - parses "Foo(T, U, 1)" parses "Foo(T, U, 1)" - says syntax error on "return[]" says syntax error on "return[]" - parses "foo(0, n <= 2)" parses "foo(0, n <= 2)" - parses "a.b /=\n1" parses "a.b /=\n1" - parses "def foo(x, *, y); 1; end" parses "def foo(x, *, y); 1; end" - parses "case when 1\n2\nend" parses "case when 1\n2\nend" - parses "yield if true" parses "yield if true" - says syntax error on "Foo(\"\": T)" says syntax error on "Foo(\"\": T)" - parses "class Foo; end\nwhile true; end" parses "class Foo; end\nwhile true; end" - parses "abstract def foo\n1" parses "abstract def foo\n1" - says syntax error on "a = return" says syntax error on "a = return" - says syntax error on "def foo(foo case); end" says syntax error on "def foo(foo case); end" - says syntax error on "def foo(typeof); end" says syntax error on "def foo(typeof); end" - parses "f.x Foo.new" parses "f.x Foo.new" - parses "a { |x| x } / b" parses "a { |x| x } / b" - parses "1.!(\n)" parses "1.!(\n)" - parses "->::foo?" parses "->::foo?" - parses "case {1}\nin {nil}; 2; end" parses "case {1}\nin {nil}; 2; end" - parses "def foo(abstract foo); end" parses "def foo(abstract foo); end" - parses "<<-HERE\n \#{1} \\n \#{2}\n HERE" parses "<<-HERE\n \#{1} \\n \#{2}\n HERE" - parses "macro foo(x, *y);end" parses "macro foo(x, *y);end" - parses "foo(z: 0, a: n <= 2)" parses "foo(z: 0, a: n <= 2)" - parses "def foo(x : U) forall U; end" parses "def foo(x : U) forall U; end" - parses "def ==(); end" parses "def ==(); end" - parses "a = 1; yield a ensure a" parses "a = 1; yield a ensure a" - parses "macro []?;end" parses "macro []?;end" - parses "foo.% 1, 2" parses "foo.% 1, 2" - parses "foo { |a, b| 1 }" parses "foo { |a, b| 1 }" - parses "yield 1" parses "yield 1" - parses "def foo(@out); end" parses "def foo(@out); end" - parses ":/" parses ":/" - parses "foo = 1; ->foo.<(Int32)" parses "foo = 1; ->foo.<(Int32)" - says syntax error on "{\"foo\" => 1, \"bar\": 2}" says syntax error on "{\"foo\" => 1, \"bar\": 2}" - parses "def foo(x @@abstract); end" parses "def foo(x @@abstract); end" - says syntax error on "return ^ 1" says syntax error on "return ^ 1" - says syntax error on "foo { |in| }" says syntax error on "foo { |in| }" - parses "def foo(x @macro); end" parses "def foo(x @macro); end" - says syntax error on "def foo(foo instance_sizeof); end" says syntax error on "def foo(foo instance_sizeof); end" - parses "1 &+ 2" parses "1 &+ 2" - parses "a, *b = 1, 2" parses "a, *b = 1, 2" - says syntax error on ":bar foo" says syntax error on ":bar foo" - parses "yield 1 if true" parses "yield 1 if true" - parses "def >=(); end;" parses "def >=(); end;" - parses "def self.^; end;" parses "def self.^; end;" - says syntax error on "A = (B = 1)" says syntax error on "A = (B = 1)" - parses ":!~" parses ":!~" - parses "foo.+ 1, 2" parses "foo.+ 1, 2" - says syntax error on "macro foo x; 1 + 2; end" says syntax error on "macro foo x; 1 + 2; end" - parses "foo(0, n << 2)" parses "foo(0, n << 2)" - parses "def foo(x @@fun); end" parses "def foo(x @@fun); end" - says syntax error on "foo { |true| }" says syntax error on "foo { |true| }" - parses "@foo/2" parses "@foo/2" - parses "def foo;bar(end: 1);end" parses "def foo;bar(end: 1);end" - parses "macro foo\n <<-FOO\n \#{ %var }\n FOO\nend" parses "macro foo\n <<-FOO\n \#{ %var }\n FOO\nend" - parses "foo[*baz]" parses "foo[*baz]" - parses "foo(1, **bar, &block)" parses "foo(1, **bar, &block)" - parses "@[Foo(\"hello\")]" parses "@[Foo(\"hello\")]" - parses "Foo({\"foo\": X, \"bar\": Y})" parses "Foo({\"foo\": X, \"bar\": Y})" - parses "1 ** 2" parses "1 ** 2" - parses "def foo(end foo); end" parses "def foo(end foo); end" - says syntax error on "def foo(var = x : Int); end" says syntax error on "def foo(var = x : Int); end" - says syntax error on "foo { |(protected)| }" says syntax error on "foo { |(protected)| }" - parses "foo %i" parses "foo %i" - parses "{% begin %}%w< %s >{% end %}" parses "{% begin %}%w< %s >{% end %}" - parses "a = 1; a &+= 1" parses "a = 1; a &+= 1" - parses "foo = 1; ->foo.-(Int32)" parses "foo = 1; ->foo.-(Int32)" - parses "puts ~1" parses "puts ~1" - parses "a = 1; a +=\n1" parses "a = 1; a +=\n1" - parses "def foo(); 1; rescue; 2; end" parses "def foo(); 1; rescue; 2; end" - parses "def foo(x @select); end" parses "def foo(x @select); end" - says syntax error on "{one: :two, three: :four} of Symbol => Symbol" says syntax error on "{one: :two, three: :four} of Symbol => Symbol" - parses "foo.** do end" parses "foo.** do end" - says syntax error on "def foo(foo abstract); end" says syntax error on "def foo(foo abstract); end" - parses "a = 1; a &*= 1" parses "a = 1; a &*= 1" - parses "\"hello \" \\\n \"world\"" parses "\"hello \" \\\n \"world\"" + says syntax error on "foo { |(x, x)| }" says syntax error on "foo { |(x, x)| }" + says syntax error on "1 if next" says syntax error on "1 if next" + says syntax error on "break &+ 1" says syntax error on "break &+ 1" + parses "foo(z: 0, a: n > 2)" parses "foo(z: 0, a: n > 2)" + parses "foo do; 1; end" parses "foo do; 1; end" + parses "__DIR__" parses "__DIR__" + parses "*a, b = 1" parses "*a, b = 1" + parses "case 1\nwhen .foo\n2\nend" parses "case 1\nwhen .foo\n2\nend" + says syntax error on "next ^ 1" says syntax error on "next ^ 1" + parses "foo(n !~ 2)" parses "foo(n !~ 2)" + sets correct location of argument in named tuple type sets correct location of argument in named tuple type + parses "foo.bar.as(Bar)" parses "foo.bar.as(Bar)" + says syntax error on "def foo=(*args); end" says syntax error on "def foo=(*args); end" + parses "macro &-;end" parses "macro &-;end" + says syntax error on "foo { |(case)| }" says syntax error on "foo { |(case)| }" + says syntax error on "def foo(foo select); end" says syntax error on "def foo(foo select); end" + parses "def <=(*args, **opts, &); end" parses "def <=(*args, **opts, &); end" + parses "def foo(x) : Int32\n1\nend" parses "def foo(x) : Int32\n1\nend" + parses "foo a: b(1) do\nend" parses "foo a: b(1) do\nend" parses "foo &block" parses "foo &block" - parses "a; unless / /; / /; else; / /; end" parses "a; unless / /; / /; else; / /; end" - parses "a = 1; a[2] ||= 3" parses "a = 1; a[2] ||= 3" - parses "foo.bar.baz" parses "foo.bar.baz" - parses "->::Foo.foo?" parses "->::Foo.foo?" - parses "(1)\nif true; end" parses "(1)\nif true; end" - says syntax error on "@[Foo(\"\": 1)]" says syntax error on "@[Foo(\"\": 1)]" - parses "foo = 1; ->foo.foo!" parses "foo = 1; ->foo.foo!" - says syntax error on "def foo\nlib\nend" says syntax error on "def foo\nlib\nend" - says syntax error on "next // 1" says syntax error on "next // 1" - parses "def foo(select foo); end" parses "def foo(select foo); end" - parses "case {1}\nin {Int32.class}; 2; end" parses "case {1}\nin {Int32.class}; 2; end" - parses "def foo(@def); end" parses "def foo(@def); end" - parses "foo.>" parses "foo.>" - says syntax error on "def foo(true); end" says syntax error on "def foo(true); end" - parses "x[+ 1]" parses "x[+ 1]" - parses "foo(a: n & 2)" parses "foo(a: n & 2)" - parses "def foo(@@with); end" parses "def foo(@@with); end" - parses "_, _ = 1, 2" parses "_, _ = 1, 2" - parses "case foo; end" parses "case foo; end" - parses "<<-HERE\n One\n \n Zero\n HERE" parses "<<-HERE\n One\n \n Zero\n HERE" - parses "property include : Int32" parses "property include : Int32" - says syntax error on "return &+ 1" says syntax error on "return &+ 1" - parses "foo%r" parses "foo%r" - parses "&+ 1" parses "&+ 1" - parses "def self.>=; end;" parses "def self.>=; end;" - parses "asm(\"nop\" \n)" parses "asm(\"nop\" \n)" - parses "a = 1; b = 2; c = 3; a-b -c" parses "a = 1; b = 2; c = 3; a-b -c" - parses "def foo(if foo); end" parses "def foo(if foo); end" - parses "foo./ do end" parses "foo./ do end" - says syntax error on "def foo(select); end" says syntax error on "def foo(select); end" - parses "struct Foo; end" parses "struct Foo; end" - says syntax error on "+break" says syntax error on "+break" - parses "foo = 1; ->foo.!~(Int32)" parses "foo = 1; ->foo.!~(Int32)" - says syntax error on "->::foo.foo" says syntax error on "->::foo.foo" - parses "1_i64" parses "1_i64" - parses "foo.!.!" parses "foo.!.!" - parses "def =~(); end;" parses "def =~(); end;" - says syntax error on "[\n]" says syntax error on "[\n]" + parses "case 1\nin Int32; 2; end" parses "case 1\nin Int32; 2; end" + parses "def foo(bar = 1\n); 2; end" parses "def foo(bar = 1\n); 2; end" + parses "qux \"foo\#{bar do end}baz\"" parses "qux \"foo\#{bar do end}baz\"" + says syntax error on "next / 1" says syntax error on "next / 1" + says syntax error on "A = begin; 1; rescue; B = 1; end" says syntax error on "A = begin; 1; rescue; B = 1; end" + parses "def <(); end;" parses "def <(); end;" + parses "while true; 1; end;" parses "while true; 1; end;" + parses "foo.===(1, 2) { 3 }" parses "foo.===(1, 2) { 3 }" + parses "foo(n ^ 2)" parses "foo(n ^ 2)" + parses "foo(0, n % 2)" parses "foo(0, n % 2)" + parses "macro foo; 1 + 2 {{foo}}\\ 3 + 4; end" parses "macro foo; 1 + 2 {{foo}}\\ 3 + 4; end" + parses "foo(n > 2)" parses "foo(n > 2)" + says syntax error on "case {1, 2}; when {3}; 4; end" says syntax error on "case {1, 2}; when {3}; 4; end" + parses "def foo(@require); end" parses "def foo(@require); end" + says syntax error on "foo { |(fun)| }" says syntax error on "foo { |(fun)| }" + parses "a : Foo()*" parses "a : Foo()*" + parses "foo out _" parses "foo out _" + says syntax error on "next === 1" says syntax error on "next === 1" + parses "property private : Int32" parses "property private : Int32" + says syntax error on "next * 1" says syntax error on "next * 1" + says syntax error on "return ? 1 : 2" says syntax error on "return ? 1 : 2" + says syntax error on "def foo(foo while); end" says syntax error on "def foo(foo while); end" + parses "case {1}\nin {.bar?}; 2; end" parses "case {1}\nin {.bar?}; 2; end" + parses "a = 1; a *=\n1" parses "a = 1; a *=\n1" + parses "1\n+2" parses "1\n+2" + parses "->Foo.foo=" parses "->Foo.foo=" + parses "lib LibC\n@[Bar]; end" parses "lib LibC\n@[Bar]; end" + parses "1 || 2" parses "1 || 2" + says syntax error on "return <= 1" says syntax error on "return <= 1" + parses "->Foo./(Int32)" parses "->Foo./(Int32)" + parses "foo x do\nend" parses "foo x do\nend" + says syntax error on "{foo: 1\nbar: 2}" says syntax error on "{foo: 1\nbar: 2}" + parses "alias : Int32" parses "alias : Int32" parses "def foo(@@return); end" parses "def foo(@@return); end" + parses "foo.== 1, 2" parses "foo.== 1, 2" + parses "yield;" parses "yield;" + says syntax error on "Hash{\"foo\": 1, \"bar\": 2}" says syntax error on "Hash{\"foo\": 1, \"bar\": 2}" + parses "break *1, 2" parses "break *1, 2" + parses "Foo(X, offsetof(Foo, @a))" parses "Foo(X, offsetof(Foo, @a))" + parses "def foo(var : Int**); end" parses "def foo(var : Int**); end" + says syntax error on "module Foo; require \"bar\"; end" says syntax error on "module Foo; require \"bar\"; end" + parses "property if : Int32" parses "property if : Int32" + says syntax error on "break <= 1" says syntax error on "break <= 1" + parses "return : Int32" parses "return : Int32" + parses "+1_i64" parses "+1_i64" + parses "->foo" parses "->foo" parses "foo &.baz.qux do\nend" parses "foo &.baz.qux do\nend" - says syntax error on "foo { |x, (x)| }" says syntax error on "foo { |x, (x)| }" - parses "macro foo\n'\\''\nend" parses "macro foo\n'\\''\nend" - parses "foo do\n//\nend" parses "foo do\n//\nend" - parses "foo.nil?" parses "foo.nil?" - says syntax error on "def self.as; end" says syntax error on "def self.as; end" - parses "def foo(self foo); end" parses "def foo(self foo); end" - says syntax error on "def foo(alias); end" says syntax error on "def foo(alias); end" - parses "@@a = uninitialized Foo" parses "@@a = uninitialized Foo" - parses "1 >> 2" parses "1 >> 2" - parses "is_a?(Const)" parses "is_a?(Const)" - parses "foo.<(1, 2) { 3 }" parses "foo.<(1, 2) { 3 }" - parses "2 * 3 + 4 * 5" parses "2 * 3 + 4 * 5" - parses "property fun : Int32" parses "property fun : Int32" - parses "1_u128" parses "1_u128" + parses "foo.=~(1, 2)" parses "foo.=~(1, 2)" + parses "lib LibC\nfun getchar(Int, Float)\nend" parses "lib LibC\nfun getchar(Int, Float)\nend" + parses "property class : Int32" parses "property class : Int32" + parses "return;" parses "return;" + says syntax error on "{one: :two, three: :four} of Symbol => Symbol" says syntax error on "{one: :two, three: :four} of Symbol => Symbol" + parses "def foo(private foo); end" parses "def foo(private foo); end" + parses "foo(n =~ 2)" parses "foo(n =~ 2)" + parses "if : Int32" parses "if : Int32" + says syntax error on "foo { |(protected)| }" says syntax error on "foo { |(protected)| }" + parses "<<-FOO\n \t1\n \tFOO" parses "<<-FOO\n \t1\n \tFOO" + parses "def foo(a, &block : Int -> ); end" parses "def foo(a, &block : Int -> ); end" + parses "def ===(*args, **opts); end" parses "def ===(*args, **opts); end" + parses "module Foo\ndef foo; end; end" parses "module Foo\ndef foo; end; end" + parses "Foo({X: X, Y: Y})" parses "Foo({X: X, Y: Y})" + says syntax error on "def foo(\"bar \#{1} qux\" y); y; end" says syntax error on "def foo(\"bar \#{1} qux\" y); y; end" + says syntax error on "foo { |extend| }" says syntax error on "foo { |extend| }" + parses "foo(x: result : Int32); result" parses "foo(x: result : Int32); result" + parses "def foo(@in); end" parses "def foo(@in); end" + says syntax error on "until break; end" says syntax error on "until break; end" + parses "def foo(x @lib); end" parses "def foo(x @lib); end" + parses "def foo(@yield); end" parses "def foo(@yield); end" + parses "a = 1; a &-=\n1" parses "a = 1; a &-=\n1" + parses "foo(x:\n begin\n result : Int32 = 1\n result\n end\n )" parses "foo(x:\n begin\n result : Int32 = 1\n result\n end\n )" + parses "{1 => 2 / 3}" parses "{1 => 2 / 3}" + says syntax error on "next - 1" says syntax error on "next - 1" + parses "return *1, 2" parses "return *1, 2" + parses "<<-HERE\n \#{1}One\n \#{2}Zero\n HERE" parses "<<-HERE\n \#{1}One\n \#{2}Zero\n HERE" + parses "def foo(x @protected); end" parses "def foo(x @protected); end" + parses "lib LibC; fun foo : Int**; end" parses "lib LibC; fun foo : Int**; end" + parses "a = 1; a //=\n1" parses "a = 1; a //=\n1" + says syntax error on "a.b {}, c = 1" says syntax error on "a.b {}, c = 1" + parses "def >=(other, file = 1); end" parses "def >=(other, file = 1); end" + parses "foo(n < 2)" parses "foo(n < 2)" + parses "foo(n >= 2)" parses "foo(n >= 2)" + parses "var.@foo" parses "var.@foo" + parses "foo [1]" parses "foo [1]" + parses "Set {1, 2, 3}" parses "Set {1, 2, 3}" + says syntax error on "def foo=(**kwargs); end" says syntax error on "def foo=(**kwargs); end" + says syntax error on "1 unless return" says syntax error on "1 unless return" + parses "def foo(a, &block : -> Double); end" parses "def foo(a, &block : -> Double); end" + says syntax error on "Foo(T, U V)" says syntax error on "Foo(T, U V)" + parses "1 * 2" parses "1 * 2" + parses "1 !~ 2" parses "1 !~ 2" + says syntax error on "def foo(foo lib); end" says syntax error on "def foo(foo lib); end" + parses "foo(a: n ^ 2)" parses "foo(a: n ^ 2)" + says syntax error on "return 1 foo" says syntax error on "return 1 foo" + says syntax error on "class Foo(T U)" says syntax error on "class Foo(T U)" + parses "macro foo;bar{% if x %}body{% elsif y %}body2{%end%}baz;end" parses "macro foo;bar{% if x %}body{% elsif y %}body2{%end%}baz;end" + parses "puts _" parses "puts _" + says syntax error on "if return; end" says syntax error on "if return; end" + says syntax error on "return &- 1" says syntax error on "return &- 1" + parses "a[], a[] = 1, 2" parses "a[], a[] = 1, 2" + parses "1 -2" parses "1 -2" + parses "1 ... 2" parses "1 ... 2" + parses "macro >>;end" parses "macro >>;end" + parses "/foo/x" parses "/foo/x" + parses "fun foo(x : Int32) : Int64\nx\nend" parses "fun foo(x : Int32) : Int64\nx\nend" + parses "class Foo; end\nwhile true; end" parses "class Foo; end\nwhile true; end" + says syntax error on "foo { |(macro)| }" says syntax error on "foo { |(macro)| }" + says syntax error on "macro is_a?; end" says syntax error on "macro is_a?; end" + parses ":\"\\u{61}\"" parses ":\"\\u{61}\"" + parses "Foo(X, sizeof(Int32))" parses "Foo(X, sizeof(Int32))" + parses "def foo(x @module); end" parses "def foo(x @module); end" + says syntax error on "macro foo&&;end" says syntax error on "macro foo&&;end" + parses "->Foo.===(Int32)" parses "->Foo.===(Int32)" + parses "enum Foo::Bar; A = 1; end" parses "enum Foo::Bar; A = 1; end" + parses "macro ^;end" parses "macro ^;end" + parses ":>=" parses ":>=" + parses "def self.==(); end;" parses "def self.==(); end;" + parses "lib LibC\n$errno : B, C -> D\nend" parses "lib LibC\n$errno : B, C -> D\nend" + parses "next {1, 2}" parses "next {1, 2}" + parses "{% begin %}%q< %s >{% end %}" parses "{% begin %}%q< %s >{% end %}" + parses "def foo(x @@unless); end" parses "def foo(x @@unless); end" + says syntax error on "case 1\nin .nil?; 2" says syntax error on "case 1\nin .nil?; 2" + parses "foo(/ /, / /)" parses "foo(/ /, / /)" + parses "@@foo/2" parses "@@foo/2" + parses "def foo; a = 1; with a yield a; end" parses "def foo; a = 1; with a yield a; end" + parses "def >=(*args, **opts); end" parses "def >=(*args, **opts); end" + parses "def self.|(); end;" parses "def self.|(); end;" + parses "call(foo.as Bar, Baz)" parses "call(foo.as Bar, Baz)" + parses "pointerof : Int32" parses "pointerof : Int32" + says syntax error on "{\"x\": [] of Int32,\n}\n1.foo(" says syntax error on "{\"x\": [] of Int32,\n}\n1.foo(" + parses "puts {{**1}}" parses "puts {{**1}}" + says syntax error on "case 1 == 1; when 2 a; end" says syntax error on "case 1 == 1; when 2 a; end" + says syntax error on "{a: 1, b: 2 c: 3}" says syntax error on "{a: 1, b: 2 c: 3}" end locations - gets corrects end location for "if 1; elseif; 2; end" gets corrects end location for "if 1; elseif; 2; end" - gets corrects end location for "extend Foo" gets corrects end location for "extend Foo" - gets corrects end location for var gets corrects end location for var - sets correct location of proc literal sets correct location of proc literal - gets corrects end location for "1 ensure 2" gets corrects end location for "1 ensure 2" - says syntax error on "%Q(" says syntax error on "%Q(" - gets corrects end location for "@foo" gets corrects end location for "@foo" - sets correct location of var in type declaration sets correct location of var in type declaration - gets corrects end location for "/foo/" gets corrects end location for "/foo/" - gets corrects end location for "foo ->@bar.baz" gets corrects end location for "foo ->@bar.baz" - says syntax error on "case x; when /x/; 2; when /x/; end" says syntax error on "case x; when /x/; 2; when /x/; end" + says syntax error on "case x; when X; 2; when X; end" says syntax error on "case x; when X; 2; when X; end" gets correct location of empty exception handler inside def gets correct location of empty exception handler inside def - gets corrects end location for "[1, 2,]" gets corrects end location for "[1, 2,]" - says syntax error on "<<-HEREDOC\n" says syntax error on "<<-HEREDOC\n" - sets correct locations of macro if / elsif sets correct locations of macro if / elsif - says syntax error on "%r(" says syntax error on "%r(" - sets location of enum method sets location of enum method - gets corrects end location for "abstract def foo(x)" gets corrects end location for "abstract def foo(x)" + parses "%i(one\\ two)" parses "%i(one\\ two)" + sets location of lib fun name sets location of lib fun name says syntax error on "%w{{one}" says syntax error on "%w{{one}" - gets corrects end location for "foo" gets corrects end location for "foo" + parses "%w{one two}" parses "%w{one two}" + sets location of enum method sets location of enum method + gets corrects end location for "foo.responds_to? :foo" gets corrects end location for "foo.responds_to? :foo" + gets corrects of ~ gets corrects of ~ + gets corrects end location for "yield 1" gets corrects end location for "yield 1" + parses "%w{one\\ two}" parses "%w{one\\ two}" + gets corrects end location for "foo ->bar=" gets corrects end location for "foo ->bar=" + gets corrects end location for "x : Foo ->" gets corrects end location for "x : Foo ->" + gets corrects end location for "begin; 1; 2; 3; end" gets corrects end location for "begin; 1; 2; 3; end" + gets corrects end location for "::foo" gets corrects end location for "::foo" + gets corrects end location for "foo(\n &.block\n)" gets corrects end location for "foo(\n &.block\n)" + says syntax error on "{\"a\" : 1}" says syntax error on "{\"a\" : 1}" says syntax error on "{\"a\": 1, \"b\" : 2}" says syntax error on "{\"a\": 1, \"b\" : 2}" - gets corrects end location for block with do ... end gets corrects end location for block with do ... end - sets correct location and end location of `begin` block sets correct location and end location of `begin` block - parses "%i((one two))" parses "%i((one two))" - says syntax error on "<<-HEREDOC" says syntax error on "<<-HEREDOC" - gets corrects end location for "@@foo" gets corrects end location for "@@foo" - gets corrects end location for "offsetof({X, Y}, 1)" gets corrects end location for "offsetof({X, Y}, 1)" - parses "annotation Foo\n\nend" parses "annotation Foo\n\nend" - sets correct location of trailing ensure sets correct location of trailing ensure - says syntax error on "foo(a: 1\n,b: 2)" says syntax error on "foo(a: 1\n,b: 2)" - says syntax error on "case x; when _; end" says syntax error on "case x; when _; end" - gets corrects end location for "a = 123" gets corrects end location for "a = 123" - parses "%w{one{} two}" parses "%w{one{} two}" - says syntax error on "%i(" says syntax error on "%i(" - sets correct location and end location of parenthesized block sets correct location and end location of parenthesized block - gets corrects end location for ":foo" gets corrects end location for ":foo" - gets corrects end location for block with { ... } gets corrects end location for block with { ... } - gets corrects end location for "module Foo; end" gets corrects end location for "module Foo; end" + gets corrects end location for "[1, 2,]" gets corrects end location for "[1, 2,]" + sets correct locations of macro if / elsif sets correct locations of macro if / elsif gets correct location with (#1558) gets correct location with (#1558) + gets corrects end location for "a && b" gets corrects end location for "a && b" + parses "%i((one two))" parses "%i((one two))" + gets corrects end location for "{} of Int32 => String" gets corrects end location for "{} of Int32 => String" + says syntax error on "def foo(x : {Int32, (Int32, Int32)}); end" says syntax error on "def foo(x : {Int32, (Int32, Int32)}); end" + gets corrects end location for "foo : Foo.class" gets corrects end location for "foo : Foo.class" + gets corrects end location for "yield" gets corrects end location for "yield" + gets correct location after macro with yield gets correct location after macro with yield gets corrects end location for "1 rescue 2" gets corrects end location for "1 rescue 2" - gets corrects end location for "sizeof(Foo)" gets corrects end location for "sizeof(Foo)" - gets corrects end location for "foo *bar" gets corrects end location for "foo *bar" - says syntax error on "{1\n,2}" says syntax error on "{1\n,2}" - gets corrects end location for "@@a = uninitialized Foo" gets corrects end location for "@@a = uninitialized Foo" - doesn't override yield with macro yield doesn't override yield with macro yield - gets corrects end location for "1 if 2" gets corrects end location for "1 if 2" - gets corrects end location for "foo ->bar(Baz)" gets corrects end location for "foo ->bar(Baz)" - parses "annotation Foo\nend\nrequire \"bar\"" parses "annotation Foo\nend\nrequire \"bar\"" - gets corrects end location for "def foo; 1; end" gets corrects end location for "def foo; 1; end" - gets corrects end location for "return 1" gets corrects end location for "return 1" + parses "%w{one{} two}" parses "%w{one{} two}" + gets corrects end location for "->{ }" gets corrects end location for "->{ }" + correctly computes line number after `\{% +` (#9857) correctly computes line number after `\{% +` (#9857) + says syntax error on "foo(a: 1\n,b: 2)" says syntax error on "foo(a: 1\n,b: 2)" + says syntax error on "%w{one}}" says syntax error on "%w{one}}" + gets corrects end location for "Int[8]?" gets corrects end location for "Int[8]?" + gets corrects end location for "1 ensure 2" gets corrects end location for "1 ensure 2" gets corrects end location for "alias Foo = Bar" gets corrects end location for "alias Foo = Bar" - gets corrects end location for "def foo; end" gets corrects end location for "def foo; end" + gets corrects end location for "offsetof({X, Y}, 1)" gets corrects end location for "offsetof({X, Y}, 1)" + gets corrects end location for "foo ->@bar.baz" gets corrects end location for "foo ->@bar.baz" + gets corrects end location for "foo.!" gets corrects end location for "foo.!" + says syntax error on "%i{one}}" says syntax error on "%i{one}}" + sets location of += sets location of += + sets correct location for fun def with body sets correct location for fun def with body + gets corrects end location for "foo 1, 2" gets corrects end location for "foo 1, 2" + says syntax error on "case x; when {1, 2}; 2; when {1, 2}; end" says syntax error on "case x; when {1, 2}; 2; when {1, 2}; end" + sets correct location and end location of `begin` block sets correct location and end location of `begin` block + gets corrects end location for "'a'" gets corrects end location for "'a'" gets corrects end location for "a, b = 1, 2" gets corrects end location for "a, b = 1, 2" - sets correct location of `else` of if statement sets correct location of `else` of if statement + sets correct location of vars in C struct sets correct location of vars in C struct + parses "%w{one\ntwo}" parses "%w{one\ntwo}" + parses "annotation Foo\nend\nrequire \"bar\"" parses "annotation Foo\nend\nrequire \"bar\"" + gets corrects end location for "foo.responds_to?(:foo)" gets corrects end location for "foo.responds_to?(:foo)" + gets corrects end location for "\"hello\"" gets corrects end location for "\"hello\"" + sets correct location of implicit tuple literal of multi-return sets correct location of implicit tuple literal of multi-return + gets corrects end location for "foo ->bar" gets corrects end location for "foo ->bar" + gets corrects end location for "Foo(A)" gets corrects end location for "Foo(A)" + gets corrects end location for "x : Foo -> Bar" gets corrects end location for "x : Foo -> Bar" + says syntax error on "%Q(" says syntax error on "%Q(" + says syntax error on "case x; when true; 2; when true; end" says syntax error on "case x; when true; 2; when true; end" + gets corrects end location for "@foo" gets corrects end location for "@foo" + parses "annotation Foo\n\nend" parses "annotation Foo\n\nend" + says syntax error on "def foo(x : Int32 | (Int32, Int32)); end" says syntax error on "def foo(x : Int32 | (Int32, Int32)); end" + says syntax error on "<<-HEREDOC\n" says syntax error on "<<-HEREDOC\n" + sets correct location of var in type declaration sets correct location of var in type declaration + parses "%i(foo(bar) baz)" parses "%i(foo(bar) baz)" + sets correct location and end location of parenthesized empty block sets correct location and end location of parenthesized empty block says syntax error on "def foo(x : (Int32, Int32) | Int32); end" says syntax error on "def foo(x : (Int32, Int32) | Int32); end" - parses "%i(one\\ two)" parses "%i(one\\ two)" - gets corrects end location for "foo.nil?( )" gets corrects end location for "foo.nil?( )" - gets corrects end location for "begin; 1; 2; 3; end" gets corrects end location for "begin; 1; 2; 3; end" - parses "%i{foo\\nbar baz}" parses "%i{foo\\nbar baz}" - gets corrects end location for "if 1; else; 2; end" gets corrects end location for "if 1; else; 2; end" - gets corrects end location for "foo ->Bar.baz=" gets corrects end location for "foo ->Bar.baz=" - says syntax error on "def foo(x : Int32, Int32); end" says syntax error on "def foo(x : Int32, Int32); end" - says syntax error on "def foo(x\n,y); 1; end" says syntax error on "def foo(x\n,y); 1; end" - says syntax error on "case x; when [1, 2]; 2; when [1, 2]; end" says syntax error on "case x; when [1, 2]; 2; when [1, 2]; end" - gets corrects end location for "Foo?" gets corrects end location for "Foo?" - says syntax error on "def foo(x : *Int32); end" says syntax error on "def foo(x : *Int32); end" + parses "annotation Foo::Bar\n\nend" parses "annotation Foo::Bar\n\nend" + gets corrects end location for "foo.@foo" gets corrects end location for "foo.@foo" + gets corrects end location for block with do ... end gets corrects end location for block with do ... end + says syntax error on "%w(" says syntax error on "%w(" + gets corrects end location for "sizeof(Foo)" gets corrects end location for "sizeof(Foo)" + says syntax error on "case x; when 1; 2; when 1; end" says syntax error on "case x; when 1; 2; when 1; end" + says syntax error on "{1 => 2\n,3 => 4}" says syntax error on "{1 => 2\n,3 => 4}" gets corrects end location for "foo(1, 2)" gets corrects end location for "foo(1, 2)" - gets correct location after macro with yield gets correct location after macro with yield - gets corrects end location for "a && b" gets corrects end location for "a && b" gets corrects end location for "!foo" gets corrects end location for "!foo" - gets corrects end location for "x : Foo -> Bar" gets corrects end location for "x : Foo -> Bar" - says syntax error on "def foo(x : {Int32, (Int32, Int32)}); end" says syntax error on "def foo(x : {Int32, (Int32, Int32)}); end" - gets corrects end location for "foo : Foo?" gets corrects end location for "foo : Foo?" - says syntax error on "def foo(x : Array({sizeof(Int32), 2})); end" says syntax error on "def foo(x : Array({sizeof(Int32), 2})); end" - says syntax error on "case x; when 1..2; 2; when 1..2; end" says syntax error on "case x; when 1..2; 2; when 1..2; end" - gets corrects end location for "foo ->bar=" gets corrects end location for "foo ->bar=" - sets correct location for fun def on multiple lines sets correct location for fun def on multiple lines - says syntax error on "case x; when 1; when _; end" says syntax error on "case x; when 1; when _; end" - says syntax error on "Foo(X\n,Y)" says syntax error on "Foo(X\n,Y)" - parses "%w{one\ttwo}" parses "%w{one\ttwo}" - gets corrects end location for "macro foo;end" gets corrects end location for "macro foo;end" - gets corrects of ~ gets corrects of ~ - says syntax error on "[1\n,2]" says syntax error on "[1\n,2]" - sets correct location of trailing rescue sets correct location of trailing rescue - says syntax error on "def foo(x : {sizeof(Int32), 2}); end" says syntax error on "def foo(x : {sizeof(Int32), 2}); end" - parses "annotation Foo::Bar\n\nend" parses "annotation Foo::Bar\n\nend" - says syntax error on "case x; when nil; 2; when nil; end" says syntax error on "case x; when nil; 2; when nil; end" - sets correct locations of keywords of exception handler sets correct locations of keywords of exception handler - gets corrects end location for "foo.[0] = 1" gets corrects end location for "foo.[0] = 1" - says syntax error on "%w(" says syntax error on "%w(" - sets location of += sets location of += - gets corrects end location for "foo.bar(x) do; end" gets corrects end location for "foo.bar(x) do; end" - parses "%w{one\ntwo}" parses "%w{one\ntwo}" - says syntax error on "%i{one}}" says syntax error on "%i{one}}" - says syntax error on "case x; when :a; 2; when :a; end" says syntax error on "case x; when :a; 2; when :a; end" + parses "%w{\n}" parses "%w{\n}" + gets corrects end location for "false" gets corrects end location for "false" + gets corrects end location for "[1, 2]" gets corrects end location for "[1, 2]" + gets corrects end location for block with { ... } gets corrects end location for block with { ... } + gets corrects end location for "foo ->self.bar" gets corrects end location for "foo ->self.bar" says syntax error on "foo(1\n,2)" says syntax error on "foo(1\n,2)" - says syntax error on "{1 => 2\n,3 => 4}" says syntax error on "{1 => 2\n,3 => 4}" + gets corrects end location for "puts obj.foo" gets corrects end location for "puts obj.foo" + gets corrects end location for "foo ->bar(Baz)" gets corrects end location for "foo ->bar(Baz)" + gets corrects end location for "foo ->@@bar.baz" gets corrects end location for "foo ->@@bar.baz" + sets correct locations of macro if / else sets correct locations of macro if / else + gets corrects end location for "extend Foo" gets corrects end location for "extend Foo" + says syntax error on "case x; when nil; 2; when nil; end" says syntax error on "case x; when nil; 2; when nil; end" + says syntax error on "case x; when \"a\"; 2; when \"a\"; end" says syntax error on "case x; when \"a\"; 2; when \"a\"; end" + gets corrects end location for "123.45" gets corrects end location for "123.45" + gets corrects end location for "begin; 1; end" gets corrects end location for "begin; 1; end" + sets correct location of `else` of if statement sets correct location of `else` of if statement + sets correct location of proc literal sets correct location of proc literal gets corrects end location for "foo ->@@bar.baz=" gets corrects end location for "foo ->@@bar.baz=" - says syntax error on "def foo(x : (Int32, Int32)); end" says syntax error on "def foo(x : (Int32, Int32)); end" - gets corrects end location for "foo.@foo" gets corrects end location for "foo.@foo" gets corrects end location for "f.x = foo" gets corrects end location for "f.x = foo" - gets corrects end location for "Foo(A)" gets corrects end location for "Foo(A)" + says syntax error on "case x; when 1, _; end" says syntax error on "case x; when 1, _; end" + says syntax error on "%i{{one}" says syntax error on "%i{{one}" + gets corrects end location for "abstract def foo" gets corrects end location for "abstract def foo" + gets corrects end location for "Foo { 1 }" gets corrects end location for "Foo { 1 }" + gets corrects end location for "foo *bar" gets corrects end location for "foo *bar" + says syntax error on "def foo(x : (Int32, Int32)); end" says syntax error on "def foo(x : (Int32, Int32)); end" + sets correct locations of keywords of exception handler sets correct locations of keywords of exception handler + gets corrects end location for "@@foo" gets corrects end location for "@@foo" + gets corrects end location for "pointerof(@foo)" gets corrects end location for "pointerof(@foo)" + doesn't override yield with macro yield doesn't override yield with macro yield + sets correct location of trailing rescue sets correct location of trailing rescue + gets corrects end location for "Foo?" gets corrects end location for "Foo?" + gets corrects end location for "123" gets corrects end location for "123" + gets corrects end location for ":foo" gets corrects end location for ":foo" + gets corrects end location for "foo.bar(x) do; end" gets corrects end location for "foo.bar(x) do; end" + gets corrects end location for "foo ->Bar.baz=" gets corrects end location for "foo ->Bar.baz=" + gets corrects end location for "def foo; end" gets corrects end location for "def foo; end" + gets corrects end location for "foo : Foo[42]" gets corrects end location for "foo : Foo[42]" + gets corrects end location for "foo bar, out baz" gets corrects end location for "foo bar, out baz" + gets corrects end location for "{a: 1}" gets corrects end location for "{a: 1}" + gets corrects end location for "foo : Foo*" gets corrects end location for "foo : Foo*" + gets corrects end location for "Foo" gets corrects end location for "Foo" + says syntax error on "%q(" says syntax error on "%q(" + sets correct location of `elsif` of if statement sets correct location of `elsif` of if statement + says syntax error on "%x(" says syntax error on "%x(" + gets corrects end location for "macro foo; 123; end" gets corrects end location for "macro foo; 123; end" + gets corrects end location for "def foo; 1; end" gets corrects end location for "def foo; 1; end" + gets corrects end location for "typeof(1)" gets corrects end location for "typeof(1)" + sets correct location for fun def sets correct location for fun def + says syntax error on "[1\n,2]" says syntax error on "[1\n,2]" + says syntax error on "def foo(x : 1); end" says syntax error on "def foo(x : 1); end" + says syntax error on "Foo(X\n,Y)" says syntax error on "Foo(X\n,Y)" + gets corrects end location for "1 if 2" gets corrects end location for "1 if 2" + says syntax error on "def foo(x : Array({sizeof(Int32), 2})); end" says syntax error on "def foo(x : Array({sizeof(Int32), 2})); end" + gets corrects end location for "foo.!()" gets corrects end location for "foo.!()" + gets corrects end location for "require \"foo\"" gets corrects end location for "require \"foo\"" + gets corrects end location for "@a = uninitialized Foo" gets corrects end location for "@a = uninitialized Foo" + says syntax error on "{1\n,2}" says syntax error on "{1\n,2}" + sets correct location of `else` of unless statement sets correct location of `else` of unless statement + says syntax error on "<<-HEREDOC" says syntax error on "<<-HEREDOC" + gets corrects end location for "{%\nif foo\n bar\n end\n%}" gets corrects end location for "{%\nif foo\n bar\n end\n%}" + gets corrects end location for "foo.[0] = 1" gets corrects end location for "foo.[0] = 1" + gets corrects end location for "unless 1; 2; end" gets corrects end location for "unless 1; 2; end" + gets corrects end location for "if 1; elseif; 2; end" gets corrects end location for "if 1; elseif; 2; end" sets correct location of var in proc pointer sets correct location of var in proc pointer - gets corrects end location for "f.x=(*foo)" gets corrects end location for "f.x=(*foo)" - says syntax error on "case x; when X; 2; when X; end" says syntax error on "case x; when X; 2; when X; end" - gets corrects end location for "while 1; end" gets corrects end location for "while 1; end" - gets corrects end location for "puts obj.foo" gets corrects end location for "puts obj.foo" gets corrects end location for "foo ->@bar.baz=" gets corrects end location for "foo ->@bar.baz=" - gets corrects end location for "foo.!" gets corrects end location for "foo.!" - says syntax error on "case x; when \"a\"; 2; when \"a\"; end" says syntax error on "case x; when \"a\"; 2; when \"a\"; end" - gets corrects end location for "return" gets corrects end location for "return" + says syntax error on "case x; when 'a'; 2; when 'a'; end" says syntax error on "case x; when 'a'; 2; when 'a'; end" + gets corrects end location for "foo.bar= *baz" gets corrects end location for "foo.bar= *baz" + sets correct location of element in array literal sets correct location of element in array literal + gets corrects end location for var + var gets corrects end location for var + var + gets corrects end location for "%w(one two)" gets corrects end location for "%w(one two)" + says syntax error on "class Foo(X\n,Y); 1; end" says syntax error on "class Foo(X\n,Y); 1; end" + says syntax error on "def foo(x : {sizeof(Int32), 2}); end" says syntax error on "def foo(x : {sizeof(Int32), 2}); end" + says syntax error on "def foo(x : Int32, Int32); end" says syntax error on "def foo(x : Int32, Int32); end" sets correct location for fun def with return type sets correct location for fun def with return type - gets corrects end location for "nil" gets corrects end location for "nil" + sets correct location for fun def on multiple lines sets correct location for fun def on multiple lines + gets corrects end location for "offsetof(Foo, @a)" gets corrects end location for "offsetof(Foo, @a)" + says syntax error on "%i(" says syntax error on "%i(" + gets corrects end location for "/foo/" gets corrects end location for "/foo/" + sets correct location and end location of parenthesized block sets correct location and end location of parenthesized block + gets corrects end location for "def foo; rescue ex; end" gets corrects end location for "def foo; rescue ex; end" gets corrects end location for "a || b" gets corrects end location for "a || b" - gets corrects end location for "foo(\n &.block\n)" gets corrects end location for "foo(\n &.block\n)" - sets correct location of vars in C struct sets correct location of vars in C struct - gets corrects end location for "1..3" gets corrects end location for "1..3" - gets corrects end location for "Foo" gets corrects end location for "Foo" - says syntax error on "def foo(x : Int32 | (Int32, Int32)); end" says syntax error on "def foo(x : Int32 | (Int32, Int32)); end" - gets corrects end location for "123" gets corrects end location for "123" - says syntax error on "{1, 2\n,3}" says syntax error on "{1, 2\n,3}" - sets location of obj.x += as call sets location of obj.x += as call - gets corrects end location for "%w(one two)" gets corrects end location for "%w(one two)" + gets corrects end location for "f.x=(*foo)" gets corrects end location for "f.x=(*foo)" + gets corrects end location for "return 1" gets corrects end location for "return 1" + says syntax error on "Foo(x: X\n,y: Y)" says syntax error on "Foo(x: X\n,y: Y)" + says syntax error on "case x; when [1, 2]; 2; when [1, 2]; end" says syntax error on "case x; when [1, 2]; 2; when [1, 2]; end" + says syntax error on "%r(" says syntax error on "%r(" + says syntax error on "case x; when 1..2; 2; when 1..2; end" says syntax error on "case x; when 1..2; 2; when 1..2; end" + says syntax error on "def foo(x\n,y); 1; end" says syntax error on "def foo(x\n,y); 1; end" gets corrects end location for "{1, 2}" gets corrects end location for "{1, 2}" - gets corrects end location for "x : Foo(A, *B, C)" gets corrects end location for "x : Foo(A, *B, C)" - says syntax error on "%q(" says syntax error on "%q(" - gets corrects end location for "foo ->self.bar" gets corrects end location for "foo ->self.bar" - sets correct locations of macro if / else / elsif sets correct locations of macro if / else / elsif - gets corrects end location for "[1, 2]" gets corrects end location for "[1, 2]" - gets corrects end location for "foo.responds_to? :foo" gets corrects end location for "foo.responds_to? :foo" - sets correct location and end location of parenthesized empty block sets correct location and end location of parenthesized empty block + gets corrects end location for "foo **bar" gets corrects end location for "foo **bar" + says syntax error on "{1, 2\n,3}" says syntax error on "{1, 2\n,3}" + gets corrects end location for "[] of Int32" gets corrects end location for "[] of Int32" + gets corrects end location for "module Foo; end" gets corrects end location for "module Foo; end" parses "%w{one\\}}" parses "%w{one\\}}" - gets corrects end location for "{} of Int32 => String" gets corrects end location for "{} of Int32 => String" - sets correct locations of macro if / else sets correct locations of macro if / else + gets corrects end location for "struct Foo; end" gets corrects end location for "struct Foo; end" + sets correct location of receiver var in method def sets correct location of receiver var in method def + sets correct location of call name sets correct location of call name + parses "annotation Foo; end" parses "annotation Foo; end" + sets correct location of call name in operator assignment sets correct location of call name in operator assignment + gets corrects end location for "foo ->Bar.baz" gets corrects end location for "foo ->Bar.baz" + says syntax error on "case x; when 1; when _; end" says syntax error on "case x; when 1; when _; end" + gets corrects end location for "if 1; else; 2; end" gets corrects end location for "if 1; else; 2; end" + gets corrects end location for var gets corrects end location for var + gets corrects end location for "foo" gets corrects end location for "foo" + sets correct location of var in macro for loop sets correct location of var in macro for loop + gets corrects end location for "foo.nil?( )" gets corrects end location for "foo.nil?( )" + parses "%i{foo\\nbar baz}" parses "%i{foo\\nbar baz}" + says syntax error on "def foo(x : *Int32); end" says syntax error on "def foo(x : *Int32); end" gets corrects end location for "class Foo; end" gets corrects end location for "class Foo; end" - gets corrects end location for "begin; 1; end" gets corrects end location for "begin; 1; end" - gets corrects end location for "foo **bar" gets corrects end location for "foo **bar" - says syntax error on "def foo(x : (*Int32)); end" says syntax error on "def foo(x : (*Int32)); end" - gets corrects end location for "foo.!()" gets corrects end location for "foo.!()" - says syntax error on "case x; when {1, 2}; 2; when {1, 2}; end" says syntax error on "case x; when {1, 2}; 2; when {1, 2}; end" - gets corrects end location for "yield 1" gets corrects end location for "yield 1" + says syntax error on "case x; when _; end" says syntax error on "case x; when _; end" parses "%i{(one two)}" parses "%i{(one two)}" - says syntax error on "%w{one}}" says syntax error on "%w{one}}" - gets corrects end location for "false" gets corrects end location for "false" - gets corrects end location for "@a = uninitialized Foo" gets corrects end location for "@a = uninitialized Foo" - gets corrects end location for "require \"foo\"" gets corrects end location for "require \"foo\"" - says syntax error on "def foo(x : 1); end" says syntax error on "def foo(x : 1); end" - sets correct location of `elsif` of if statement sets correct location of `elsif` of if statement - gets corrects end location for "Foo { 1 }" gets corrects end location for "Foo { 1 }" - says syntax error on "case x; when true; 2; when true; end" says syntax error on "case x; when true; 2; when true; end" gets corrects end location for "a, b = 1, 2 if 3" gets corrects end location for "a, b = 1, 2 if 3" - sets correct location of `else` of unless statement sets correct location of `else` of unless statement - gets corrects end location for "foo : Foo*" gets corrects end location for "foo : Foo*" - says syntax error on "%x(" says syntax error on "%x(" + gets corrects end location for "x : Foo(A, *B, C)" gets corrects end location for "x : Foo(A, *B, C)" + gets corrects end location for "1.as(Int32)" gets corrects end location for "1.as(Int32)" + says syntax error on "macro foo(x\n,y); 1; end" says syntax error on "macro foo(x\n,y); 1; end" + gets correct location after macro with yield gets correct location after macro with yield gets corrects end location for "foo : Foo**" gets corrects end location for "foo : Foo**" - gets corrects end location for "def foo; rescue ex; end" gets corrects end location for "def foo; rescue ex; end" - gets corrects end location for "abstract def foo" gets corrects end location for "abstract def foo" - gets corrects end location for "unless 1; 2; end" gets corrects end location for "unless 1; 2; end" - gets corrects end location for "foo bar, out baz" gets corrects end location for "foo bar, out baz" - parses "%w{one two}" parses "%w{one two}" + says syntax error on "def foo(x : (*Int32)); end" says syntax error on "def foo(x : (*Int32)); end" + says syntax error on "case x; when :a; 2; when :a; end" says syntax error on "case x; when :a; 2; when :a; end" + sets location of obj.x += as call sets location of obj.x += as call + sets correct location of trailing ensure sets correct location of trailing ensure + gets corrects end location for "macro foo;end" gets corrects end location for "macro foo;end" gets corrects end location for "foo.nil?" gets corrects end location for "foo.nil?" - gets corrects end location for "1.." gets corrects end location for "1.." - says syntax error on "class Foo(X\n,Y); 1; end" says syntax error on "class Foo(X\n,Y); 1; end" - gets corrects end location for "macro foo; 123; end" gets corrects end location for "macro foo; 123; end" - gets corrects end location for "Int[8]?" gets corrects end location for "Int[8]?" - parses "annotation Foo; end" parses "annotation Foo; end" - gets corrects end location for "foo 1, 2" gets corrects end location for "foo 1, 2" - parses "%w{one\\ two}" parses "%w{one\\ two}" - gets corrects end location for "foo.responds_to?(:foo)" gets corrects end location for "foo.responds_to?(:foo)" - gets corrects end location for "yield" gets corrects end location for "yield" - correctly computes line number after `\{% -` (#9857) correctly computes line number after `\{% -` (#9857) + gets corrects end location for "abstract def foo(x)" gets corrects end location for "abstract def foo(x)" + sets correct locations of macro if / else / elsif sets correct locations of macro if / else / elsif gets corrects end location for "foo ->self.bar=" gets corrects end location for "foo ->self.bar=" - says syntax error on "%i{{one}" says syntax error on "%i{{one}" - gets corrects end location for "x : Foo ->" gets corrects end location for "x : Foo ->" + gets corrects end location for "abstract def foo : Int32" gets corrects end location for "abstract def foo : Int32" gets corrects end location for "include Foo" gets corrects end location for "include Foo" - gets corrects end location for "struct Foo; end" gets corrects end location for "struct Foo; end" - gets corrects end location for "123.45" gets corrects end location for "123.45" - gets corrects end location for "offsetof(Foo, @a)" gets corrects end location for "offsetof(Foo, @a)" - sets correct location of element in array literal sets correct location of element in array literal - gets corrects end location for "::foo" gets corrects end location for "::foo" - sets correct location for fun def sets correct location for fun def - gets corrects end location for "foo.bar= *baz" gets corrects end location for "foo.bar= *baz" - gets corrects end location for "\"hello\"" gets corrects end location for "\"hello\"" - sets location of lib fun name sets location of lib fun name - gets corrects end location for "f.x=(foo).bar" gets corrects end location for "f.x=(foo).bar" - gets corrects end location for "{%\nif foo\n bar\n end\n%}" gets corrects end location for "{%\nif foo\n bar\n end\n%}" - gets corrects end location for "foo ->bar" gets corrects end location for "foo ->bar" - says syntax error on "Foo(x: X\n,y: Y)" says syntax error on "Foo(x: X\n,y: Y)" - gets corrects end location for "foo ->Bar.baz" gets corrects end location for "foo ->Bar.baz" - says syntax error on "case x; when 1; 2; when 1; end" says syntax error on "case x; when 1; 2; when 1; end" - sets correct location of receiver var in method def sets correct location of receiver var in method def + gets corrects end location for "@@a = uninitialized Foo" gets corrects end location for "@@a = uninitialized Foo" parses "%w{\\{one}" parses "%w{\\{one}" - gets corrects end location for "[] of Int32" gets corrects end location for "[] of Int32" - says syntax error on "case x; when 'a'; 2; when 'a'; end" says syntax error on "case x; when 'a'; 2; when 'a'; end" - says syntax error on "{\"a\" : 1}" says syntax error on "{\"a\" : 1}" - gets corrects end location for "foo : Foo[42]" gets corrects end location for "foo : Foo[42]" - sets correct location of var in macro for loop sets correct location of var in macro for loop - sets correct location of implicit tuple literal of multi-return sets correct location of implicit tuple literal of multi-return - gets corrects end location for "foo ->@@bar.baz" gets corrects end location for "foo ->@@bar.baz" - gets corrects end location for "'a'" gets corrects end location for "'a'" - says syntax error on "case x; when 1, _; end" says syntax error on "case x; when 1, _; end" - parses "%i(foo(bar) baz)" parses "%i(foo(bar) baz)" - parses "%w{\n}" parses "%w{\n}" - sets correct location of call name in operator assignment sets correct location of call name in operator assignment - sets correct location of call name sets correct location of call name - gets corrects end location for "abstract def foo : Int32" gets corrects end location for "abstract def foo : Int32" - gets corrects end location for "->{ }" gets corrects end location for "->{ }" - gets correct location after macro with yield gets correct location after macro with yield - gets corrects end location for "1.as(Int32)" gets corrects end location for "1.as(Int32)" - gets corrects end location for "pointerof(@foo)" gets corrects end location for "pointerof(@foo)" - gets corrects end location for "typeof(1)" gets corrects end location for "typeof(1)" - gets corrects end location for var + var gets corrects end location for var + var - says syntax error on "macro foo(x\n,y); 1; end" says syntax error on "macro foo(x\n,y); 1; end" + gets corrects end location for "1.." gets corrects end location for "1.." + gets corrects end location for "a = 123" gets corrects end location for "a = 123" + gets corrects end location for "foo : Foo?" gets corrects end location for "foo : Foo?" + gets corrects end location for "while 1; end" gets corrects end location for "while 1; end" + parses "%w{one\ttwo}" parses "%w{one\ttwo}" + gets corrects end location for "nil" gets corrects end location for "nil" sets location of top-level fun name sets location of top-level fun name - sets correct location for fun def with body sets correct location for fun def with body - gets corrects end location for "foo : Foo.class" gets corrects end location for "foo : Foo.class" - gets corrects end location for "{a: 1}" gets corrects end location for "{a: 1}" - parses "<<-EOF.x\n foo\nEOF" parses "<<-EOF.x\n foo\nEOF" - parses "Foo(X, sizeof(Int32))" parses "Foo(X, sizeof(Int32))" - says syntax error on "foo.||" says syntax error on "foo.||" - parses "class Foo(T1); end" parses "class Foo(T1); end" - says syntax error on "unless return; end" says syntax error on "unless return; end" - parses "def foo(x @@sizeof); end" parses "def foo(x @@sizeof); end" - parses "def []=(value); end" parses "def []=(value); end" - parses "foo if 3" parses "foo if 3" - says syntax error on "def responds_to?; end" says syntax error on "def responds_to?; end" - parses "foo.<" parses "foo.<" - parses "foo(z: 0, a: n << 2)" parses "foo(z: 0, a: n << 2)" - parses "{% begin %}%Q| %s |{% end %}" parses "{% begin %}%Q| %s |{% end %}" - says syntax error on "break when true" says syntax error on "break when true" - parses ":~" parses ":~" - parses "foo %i()" parses "foo %i()" - says syntax error on "foo.||()" says syntax error on "foo.||()" - parses "foo(0, n * 2)" parses "foo(0, n * 2)" - parses "def foo(x @@next); end" parses "def foo(x @@next); end" - parses "foo(n - 2)" parses "foo(n - 2)" - parses "{% begin %}%w{ %s }{% end %}" parses "{% begin %}%w{ %s }{% end %}" - says syntax error on "*a == 1" says syntax error on "*a == 1" + gets corrects end location for "1..3" gets corrects end location for "1..3" + says syntax error on "case x; when /x/; 2; when /x/; end" says syntax error on "case x; when /x/; 2; when /x/; end" + gets corrects end location for "return" gets corrects end location for "return" + gets corrects end location for "f.x=(foo).bar" gets corrects end location for "f.x=(foo).bar" + says syntax error on "def foo; require \"bar\"; end" says syntax error on "def foo; require \"bar\"; end" + parses "def foo(x); end; x" parses "def foo(x); end; x" + parses "@[Foo(1, foo: 2\n)]" parses "@[Foo(1, foo: 2\n)]" + parses "foo.==(1, 2)" parses "foo.==(1, 2)" + parses "foo { |(_, c, )| c }" parses "foo { |(_, c, )| c }" + parses "macro +;end" parses "macro +;end" + parses "def foo(x @class); end" parses "def foo(x @class); end" + says syntax error on "x { |*a, *b| }" says syntax error on "x { |*a, *b| }" + says syntax error on "def foo(lib); end" says syntax error on "def foo(lib); end" + parses "def foo(protected foo); end" parses "def foo(protected foo); end" + parses "foo(**bar)" parses "foo(**bar)" + parses "foo(a: n & 2)" parses "foo(a: n & 2)" + parses "macro !=;end" parses "macro !=;end" + says syntax error on "a, B = 1, 2" says syntax error on "a, B = 1, 2" + says syntax error on "def foo(typeof); end" says syntax error on "def foo(typeof); end" + says syntax error on "next.as(Int32)" says syntax error on "next.as(Int32)" + parses "foo(n >> 2)" parses "foo(n >> 2)" + parses "def ^(); end;" parses "def ^(); end;" + parses "def +(); end;" parses "def +(); end;" + says syntax error on "if next; end" says syntax error on "if next; end" + says syntax error on "a = 1; a += break" says syntax error on "a = 1; a += break" + parses "macro >;end" parses "macro >;end" + parses "foo.& do end" parses "foo.& do end" + parses "def self.**; end;" parses "def self.**; end;" + parses "def foo(x = __LINE__); end" parses "def foo(x = __LINE__); end" + parses "->::Foo.foo?" parses "->::Foo.foo?" + parses "lib LibC; {{ 1 }}; end" parses "lib LibC; {{ 1 }}; end" + says syntax error on "*a if true" says syntax error on "*a if true" + says syntax error on "{1, ->{ |_| x } }" says syntax error on "{1, ->{ |_| x } }" parses "n &- 2" parses "n &- 2" - parses "foo 1, a: 1, b: 2" parses "foo 1, a: 1, b: 2" - parses "f.x -= 2" parses "f.x -= 2" - parses "def self.===; end;" parses "def self.===; end;" - parses "property while : Int32" parses "property while : Int32" - parses "def foo(@@if); end" parses "def foo(@@if); end" - parses "Foo(typeof(1), typeof(2))" parses "Foo(typeof(1), typeof(2))" - says syntax error on "return >= 1" says syntax error on "return >= 1" - says syntax error on "Foo(T, x: U)" says syntax error on "Foo(T, x: U)" - parses "{{ nil?(foo) }}" parses "{{ nil?(foo) }}" - parses "Foo({X: X, Y: Y})" parses "Foo({X: X, Y: Y})" - parses ":*" parses ":*" - parses "def foo(in foo); end" parses "def foo(in foo); end" - parses "macro **;end" parses "macro **;end" - parses "lib LibC; type A = B; end" parses "lib LibC; type A = B; end" - parses "foo(1 + 2)" parses "foo(1 + 2)" - parses "def foo(@yield); end" parses "def foo(@yield); end" - says syntax error on "break ** 1" says syntax error on "break ** 1" - parses "def >=(other, file = 1); end" parses "def >=(other, file = 1); end" - parses "class Foo(Type); end" parses "class Foo(Type); end" - parses "def foo(def foo); end" parses "def foo(def foo); end" - parses "def foo(x @@offsetof); end" parses "def foo(x @@offsetof); end" - parses "foo(n &+ 2)" parses "foo(n &+ 2)" - parses "rescue : Int32" parses "rescue : Int32" - says syntax error on "def foo(out); end" says syntax error on "def foo(out); end" - parses "1 &- 2" parses "1 &- 2" - parses "lib LibC; struct Foo; x : Int; y : Float; end end" parses "lib LibC; struct Foo; x : Int; y : Float; end end" - parses "def |; end;" parses "def |; end;" - parses "[/ /, / /]" parses "[/ /, / /]" - parses "yield foo do\nend" parses "yield foo do\nend" - parses "def foo(a, &block : Int -> Double); end" parses "def foo(a, &block : Int -> Double); end" - says syntax error on "unless 1 == 1 a; end" says syntax error on "unless 1 == 1 a; end" - parses "def foo(var : Int); end" parses "def foo(var : Int); end" - parses "def foo(x @struct); end" parses "def foo(x @struct); end" - parses "def self.=~; end;" parses "def self.=~; end;" - parses "foo &.!" parses "foo &.!" - parses "def foo(x @@begin); end" parses "def foo(x @@begin); end" - parses "foo (1 + 2), 3" parses "foo (1 + 2), 3" - parses "1.[]?(2)" parses "1.[]?(2)" - parses "->Foo.^(Int32)" parses "->Foo.^(Int32)" - parses "def foo(@@offsetof); end" parses "def foo(@@offsetof); end" - parses "def foo(false foo); end" parses "def foo(false foo); end" - parses "next if true" parses "next if true" - says syntax error on "next[]" says syntax error on "next[]" - parses "case\nwhen true\n1\nend" parses "case\nwhen true\n1\nend" + says syntax error on "asm(\"\" : 1)" says syntax error on "asm(\"\" : 1)" + parses "macro foo\n\"\\\\\"\nend" parses "macro foo\n\"\\\\\"\nend" + parses "puts %w{one two}" parses "puts %w{one two}" + parses "def foo(x = __FILE__); end" parses "def foo(x = __FILE__); end" + parses "lib LibFoo\nend\nif true\nend" parses "lib LibFoo\nend\nif true\nend" + parses "var.@foo.@bar" parses "var.@foo.@bar" + parses "puts __FILE__" parses "puts __FILE__" + parses "property sizeof : Int32" parses "property sizeof : Int32" + says syntax error on "def foo(x x); 1; end" says syntax error on "def foo(x x); 1; end" + parses "Foo({X, Y})" parses "Foo({X, Y})" + parses "a()/3" parses "a()/3" + parses "->Foo.[](Int32)" parses "->Foo.[](Int32)" + says syntax error on "foo { |sizeof| }" says syntax error on "foo { |sizeof| }" + parses "1 &** 2" parses "1 &** 2" + parses "a = 1; a &+= 1" parses "a = 1; a &+= 1" + parses "a : Foo = 1" parses "a : Foo = 1" + parses "foo x do\n//\nend" parses "foo x do\n//\nend" + parses "{% begin %}%i[ %s ]{% end %}" parses "{% begin %}%i[ %s ]{% end %}" + parses "lib LibC\nfun getchar(a : Int, b : Float)\nend" parses "lib LibC\nfun getchar(a : Int, b : Float)\nend" + parses "foo = 1; ->foo.foo!" parses "foo = 1; ->foo.foo!" + parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\"\n: \"volatile\", \"alignstack\"\n,\n\"intel\"\n)" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\"\n: \"volatile\", \"alignstack\"\n,\n\"intel\"\n)" + says syntax error on "return >> 1" says syntax error on "return >> 1" + parses "foo.^" parses "foo.^" + parses "break 1 if true" parses "break 1 if true" + parses "a : Foo[12]" parses "a : Foo[12]" + parses "a = 1; a[2] ||= 3" parses "a = 1; a[2] ||= 3" + parses "x = 1; foo x {\n}" parses "x = 1; foo x {\n}" + parses "[\n1, 2]" parses "[\n1, 2]" + parses "foo%x" parses "foo%x" + says syntax error on "{1, ->{ |x| x } }" says syntax error on "{1, ->{ |x| x } }" + says syntax error on "foo { |nil| }" says syntax error on "foo { |nil| }" + parses "def !=(*args, **opts, &); end" parses "def !=(*args, **opts, &); end" + parses "def foo(if foo); end" parses "def foo(if foo); end" + parses "select\nwhen foo\n2\nelse\n3\nend" parses "select\nwhen foo\n2\nelse\n3\nend" + parses "foo = 1; ->foo.**(Int32)" parses "foo = 1; ->foo.**(Int32)" + parses "x.y=(1).to_s" parses "x.y=(1).to_s" + parses "\n class Foo\n def bar\n print as Foo\n end\n end\n " parses "\n class Foo\n def bar\n print as Foo\n end\n end\n " + says syntax error on "foo[1] = next" says syntax error on "foo[1] = next" + parses "begin; 1; rescue ex; 2; end" parses "begin; 1; rescue ex; 2; end" + parses "::T/1" parses "::T/1" + parses "foo.=~" parses "foo.=~" parses "macro >=;end" parses "macro >=;end" - parses "foo./ 1, 2" parses "foo./ 1, 2" - parses "foo /a/" parses "foo /a/" - parses "foo ..2" parses "foo ..2" - parses "foo.>=(1, 2) { 3 }" parses "foo.>=(1, 2) { 3 }" - says syntax error on "def =\nend" says syntax error on "def =\nend" - parses "def foo(x, **args)\n1\nend" parses "def foo(x, **args)\n1\nend" - says syntax error on "next ... 1" says syntax error on "next ... 1" - parses "def foo(a, &block : Int, self -> Double); end" parses "def foo(a, &block : Int, self -> Double); end" - parses "def foo(@while); end" parses "def foo(@while); end" - parses "foo(**bar)" parses "foo(**bar)" - says syntax error on "1 until 3" says syntax error on "1 until 3" - parses "foo \"foo bar\": 1, \"baz\": 2" parses "foo \"foo bar\": 1, \"baz\": 2" - parses "foo.> 1, 2" parses "foo.> 1, 2" - says syntax error on "\"foo\" \"bar\"" says syntax error on "\"foo\" \"bar\"" - says syntax error on "return - 1" says syntax error on "return - 1" - parses "->Foo.//(Int32)" parses "->Foo.//(Int32)" - parses "asm(\"nop\" : \"a\"(0) : \"b\"(1))" parses "asm(\"nop\" : \"a\"(0) : \"b\"(1))" + parses "def <=(); end" parses "def <=(); end" + parses "def foo(x : *T -> R); end" parses "def foo(x : *T -> R); end" + says syntax error on "next >> 1" says syntax error on "next >> 1" + parses "fun : Int32" parses "fun : Int32" + parses "def foo(x @return); end" parses "def foo(x @return); end" + says syntax error on "self += 1" says syntax error on "self += 1" parses "{\"\".id}" parses "{\"\".id}" - parses "def foo; yield 1; end" parses "def foo; yield 1; end" - says syntax error on "select\nwhen 1\n2\nend" says syntax error on "select\nwhen 1\n2\nend" - parses "1_i128" parses "1_i128" - parses "1 +\n2" parses "1 +\n2" - parses "def foo(@@next); end" parses "def foo(@@next); end" - parses "foo %w" parses "foo %w" - says syntax error on "1 unless return" says syntax error on "1 unless return" - says syntax error on "def foo(foo true); end" says syntax error on "def foo(foo true); end" - parses "foo = 1; ->foo.<=(Int32)" parses "foo = 1; ->foo.<=(Int32)" - parses "foo out x; x" parses "foo out x; x" - parses "1;-2" parses "1;-2" - parses "def foo(@@instance_sizeof); end" parses "def foo(@@instance_sizeof); end" - parses "lib LibC; {{ 1 }}; end" parses "lib LibC; {{ 1 }}; end" - parses "def ~(); end;" parses "def ~(); end;" - says syntax error on "{\"\": 1}" says syntax error on "{\"\": 1}" - parses "def foo; 1; 2; end" parses "def foo; 1; 2; end" - parses "case a\nwhen b\n/ /\n\nelse\n/ /\nend" parses "case a\nwhen b\n/ /\n\nelse\n/ /\nend" - says syntax error on "next == 1" says syntax error on "next == 1" - parses "def foo(x y); y; end" parses "def foo(x y); y; end" - parses "{% begin %}%x| %s |{% end %}" parses "{% begin %}%x| %s |{% end %}" - parses "def &; end;" parses "def &; end;" - says syntax error on "def foo(foo return); end" says syntax error on "def foo(foo return); end" - parses "foo.===" parses "foo.===" - parses "foo % r()" parses "foo % r()" - parses "{A::B}" parses "{A::B}" - parses "1 & 2" parses "1 & 2" - parses "Int[]" parses "Int[]" - parses "foo.*(1, 2) { 3 }" parses "foo.*(1, 2) { 3 }" - parses "def %(); end;" parses "def %(); end;" - parses "f.x = - 1" parses "f.x = - 1" - parses "lib LibC\nalias Foo = Bar\nend" parses "lib LibC\nalias Foo = Bar\nend" - says syntax error on "pointerof(self)" says syntax error on "pointerof(self)" + parses "foo = 1; b = 2; foo -b" parses "foo = 1; b = 2; foo -b" + says syntax error on "foo { |(lib)| }" says syntax error on "foo { |(lib)| }" + parses "foo.<=(1, 2) { 3 }" parses "foo.<=(1, 2) { 3 }" + parses "foo unless 3" parses "foo unless 3" + parses "def foo(@@while); end" parses "def foo(@@while); end" + parses "case 1; when 0, 1; 2; else; 3; end" parses "case 1; when 0, 1; 2; else; 3; end" + parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\" : \"volatile\", \"alignstack\", \"intel\")" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\" : \"volatile\", \"alignstack\", \"intel\")" + parses " def foo(\n @[Foo]\n id : Int32,\n @[Bar] name : String\n ); end" parses " def foo(\n @[Foo]\n id : Int32,\n @[Bar] name : String\n ); end" + says syntax error on "foo { |def| }" says syntax error on "foo { |def| }" + says syntax error on "foo { |require| }" says syntax error on "foo { |require| }" + parses "a = /=/" parses "a = /=/" + parses "as?(Bar)" parses "as?(Bar)" + parses "property offsetof : Int32" parses "property offsetof : Int32" + parses "foo = 1; ->foo.===(Int32)" parses "foo = 1; ->foo.===(Int32)" + parses "def foo(@[Foo] *args); end" parses "def foo(@[Foo] *args); end" + parses "1 >= 2" parses "1 >= 2" + parses "a = 1\nfoo - a" parses "a = 1\nfoo - a" + parses "Foo(Bar(T | U))" parses "Foo(Bar(T | U))" + parses "fun foo : Int32; 1; end; 2" parses "fun foo : Int32; 1; end; 2" + parses "a = 1; b = 2; c = 3; a-b-c" parses "a = 1; b = 2; c = 3; a-b-c" + parses "foo.responds_to?(:foo)" parses "foo.responds_to?(:foo)" + parses "def ==(); end;" parses "def ==(); end;" + says syntax error on "foo { |(def)| }" says syntax error on "foo { |(def)| }" + parses "def foo(a, b = a); end" parses "def foo(a, b = a); end" + parses "foo.!~ do end" parses "foo.!~ do end" + parses "->(x : Int32) : Int32 { }" parses "->(x : Int32) : Int32 { }" + parses "def foo(a, &block); end" parses "def foo(a, &block); end" parses "def foo(@case); end" parses "def foo(@case); end" - parses "if (\ntrue\n)\n1\nend" parses "if (\ntrue\n)\n1\nend" - parses "->Foo.foo!" parses "->Foo.foo!" - parses "case;end" parses "case;end" - parses "def foo(module foo); end" parses "def foo(module foo); end" - parses "def self.-(); end;" parses "def self.-(); end;" - says syntax error on "offsetof(X, 'c')" says syntax error on "offsetof(X, 'c')" - parses "1 + 2" parses "1 + 2" - parses "foo.^" parses "foo.^" - parses "property false : Int32" parses "property false : Int32" - parses "def foo; yield; end" parses "def foo; yield; end" - parses "foo.=== do end" parses "foo.=== do end" - parses "n < 2" parses "n < 2" - parses "macro `;end" parses "macro `;end" - parses "foo.- do end" parses "foo.- do end" - says syntax error on "->::@@foo.foo" says syntax error on "->::@@foo.foo" - parses "1 -2_i64" parses "1 -2_i64" - parses "->Foo.&+(Int32)" parses "->Foo.&+(Int32)" - parses "a() /3" parses "a() /3" - says syntax error on "{a: 1, \"\": 2}" says syntax error on "{a: 1, \"\": 2}" - parses "->(x : Int32) { x }" parses "->(x : Int32) { x }" - says syntax error on "1 ... break" says syntax error on "1 ... break" - parses "/\\//" parses "/\\//" - parses "enum Foo; protected def foo; 1; end; end" parses "enum Foo; protected def foo; 1; end; end" - parses "macro foo;bar{% for x in y %}\\ \n body{% end %}\\ baz;end" parses "macro foo;bar{% for x in y %}\\ \n body{% end %}\\ baz;end" - parses "def *; end;" parses "def *; end;" - says syntax error on "macro foo; {% foo = 1 }; end" says syntax error on "macro foo; {% foo = 1 }; end" - parses "def ^(); end" parses "def ^(); end" - parses "1 ? 2 : 3" parses "1 ? 2 : 3" - parses "def =~; end;" parses "def =~; end;" - parses "def foo(x @@out); end" parses "def foo(x @@out); end" - parses "1 + 2" parses "1 + 2" - parses "foo.is_a?(Const)" parses "foo.is_a?(Const)" - parses "foo &.as(T)" parses "foo &.as(T)" - parses "1.x; foo do\nend" parses "1.x; foo do\nend" - parses "a.b &*=\n1" parses "a.b &*=\n1" - says syntax error on "<<-HERE\n One\n \#{1}\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n HERE" - says syntax error on "break >> 1" says syntax error on "break >> 1" - parses "foo(&.responds_to?(:foo))" parses "foo(&.responds_to?(:foo))" - says syntax error on "while 1 == 1 a; end" says syntax error on "while 1 == 1 a; end" - parses "if : Int32" parses "if : Int32" - parses "Foo({X, Y,})" parses "Foo({X, Y,})" - parses "def foo(break foo); end" parses "def foo(break foo); end" - says syntax error on "macro nil?; end" says syntax error on "macro nil?; end" + parses "foo.!( )" parses "foo.!( )" + says syntax error on "def foo(foo macro); end" says syntax error on "def foo(foo macro); end" + parses "foo = 1; ->foo.+(Int32)" parses "foo = 1; ->foo.+(Int32)" + parses "def foo(x, *args, y = 2); 1; end" parses "def foo(x, *args, y = 2); 1; end" + parses "def foo(@@fun); end" parses "def foo(@@fun); end" + says syntax error on "return << 1" says syntax error on "return << 1" + says syntax error on "def foo(foo unless); end" says syntax error on "def foo(foo unless); end" parses "def foo(@[Foo] @var); end" parses "def foo(@[Foo] @var); end" - says syntax error on "macro foo(\"\" y); end" says syntax error on "macro foo(\"\" y); end" - says syntax error on "{% unless 1; 2; elsif 3; 4; end %}" says syntax error on "{% unless 1; 2; elsif 3; 4; end %}" - parses "def foo(x @abstract); end" parses "def foo(x @abstract); end" - parses "break *{1, 2}" parses "break *{1, 2}" - parses "def foo(a, &block : Int -> ); end" parses "def foo(a, &block : Int -> ); end" - parses "<<-HERE\n One\n Zero\n HERE" parses "<<-HERE\n One\n Zero\n HERE" - says syntax error on "foo { |(select)| }" says syntax error on "foo { |(select)| }" - parses "foo &.as(T).bar" parses "foo &.as(T).bar" - says syntax error on "return * 1" says syntax error on "return * 1" - parses "{% unless 1; 2; else 3; end %}" parses "{% unless 1; 2; else 3; end %}" - parses "instance_alignof(\n Int32\n)" parses "instance_alignof(\n Int32\n)" - parses "def foo(return foo); end" parses "def foo(return foo); end" - says syntax error on "foo { |private| }" says syntax error on "foo { |private| }" - parses "case a\nwhen b\n1 / 2\nelse\n1 / 2\nend" parses "case a\nwhen b\n1 / 2\nelse\n1 / 2\nend" - says syntax error on "def foo x y; end" says syntax error on "def foo x y; end" - parses "yield" parses "yield" - says syntax error on "def foo(**x, &x); end" says syntax error on "def foo(**x, &x); end" - parses "foo.bar = (1).abs" parses "foo.bar = (1).abs" - parses "def foo(x @out); end" parses "def foo(x @out); end" - parses "asm(\"nop\" ::: :)" parses "asm(\"nop\" ::: :)" - parses "foo(\"foo bar\": 1, \"baz\": 2)" parses "foo(\"foo bar\": 1, \"baz\": 2)" - parses "def foo(@@module); end" parses "def foo(@@module); end" - parses "a, *b = 1" parses "a, *b = 1" - parses "return" parses "return" - says syntax error on "foo { |false| }" says syntax error on "foo { |false| }" - sets correct location of private method in enum sets correct location of private method in enum - parses "module : Int32" parses "module : Int32" - parses "Foo?" parses "Foo?" - parses "self / number" parses "self / number" - parses "Foo(\n)" parses "Foo(\n)" - parses "enum Foo; A = 1\ndef self.foo; 1; end\nend" parses "enum Foo; A = 1\ndef self.foo; 1; end\nend" - parses "property nil : Int32" parses "property nil : Int32" - says syntax error on "def foo :String\nend" says syntax error on "def foo :String\nend" - parses "def foo(var = 1); end" parses "def foo(var = 1); end" - parses "def foo(@@var); 1; end" parses "def foo(@@var); 1; end" - parses "def self.[]; end" parses "def self.[]; end" - says syntax error on "asm(\"\" ::: \"\"(var))" says syntax error on "asm(\"\" ::: \"\"(var))" - parses "@[Foo()]" parses "@[Foo()]" - parses "{% begin %}%r<\\A>{% end %}" parses "{% begin %}%r<\\A>{% end %}" - parses "1 && 2" parses "1 && 2" - parses "foo [1]" parses "foo [1]" - parses "def foo(@[Foo] **args); end" parses "def foo(@[Foo] **args); end" - parses "foo.-" parses "foo.-" - parses ":\"\"" parses ":\"\"" - parses "property true : Int32" parses "property true : Int32" - parses "def =~; end" parses "def =~; end" - parses "def foo(x @@with); end" parses "def foo(x @@with); end" - parses "def =~(); end" parses "def =~(); end" - parses "foo(n & 2)" parses "foo(n & 2)" - parses "alias : Int32" parses "alias : Int32" - says syntax error on "@:Foo" says syntax error on "@:Foo" - parses "extend Foo\nif true; end" parses "extend Foo\nif true; end" - parses "f.x &= 2" parses "f.x &= 2" - parses "foo out _" parses "foo out _" - says syntax error on "1 as? Bar" says syntax error on "1 as? Bar" + parses "foo(n % 2)" parses "foo(n % 2)" + says syntax error on "until next; end" says syntax error on "until next; end" + says syntax error on "def nil?; end" says syntax error on "def nil?; end" + says syntax error on "->::@@foo.foo" says syntax error on "->::@@foo.foo" + parses "def foo(@alias); end" parses "def foo(@alias); end" + parses "def foo(x @@var); end" parses "def foo(x @@var); end" + parses "foo &.block = 0" parses "foo &.block = 0" + parses "lib LibC; struct Foo; include Bar; end; end" parses "lib LibC; struct Foo; include Bar; end; end" + parses "call \"foo\"" parses "call \"foo\"" + parses "->@@foo.foo" parses "->@@foo.foo" + parses "def foo(x @@begin); end" parses "def foo(x @@begin); end" + parses "asm(\"nop\" ::)" parses "asm(\"nop\" ::)" + parses ":<<" parses ":<<" + says syntax error on "def foo var; end" says syntax error on "def foo var; end" + says syntax error on "a = next" says syntax error on "a = next" + says syntax error on "while next; end" says syntax error on "while next; end" + parses "foo.+ 1, 2" parses "foo.+ 1, 2" says syntax error on "return[0]= 1" says syntax error on "return[0]= 1" - parses "nil?" parses "nil?" - parses "foo.+(1, 2) { 3 }" parses "foo.+(1, 2) { 3 }" - parses "foo.**(1, 2)" parses "foo.**(1, 2)" - says syntax error on "def foo=(&block); end" says syntax error on "def foo=(&block); end" - parses "Foo(1)" parses "Foo(1)" - parses "foo { |(_, c, )| c }" parses "foo { |(_, c, )| c }" - says syntax error on "foo(**bar, 1)" says syntax error on "foo(**bar, 1)" - parses "foo(a: n !~ 2)" parses "foo(a: n !~ 2)" - parses "Foo(X, alignof(Int32))" parses "Foo(X, alignof(Int32))" - says syntax error on "a.[]() += 1" says syntax error on "a.[]() += 1" - parses "nil : Int32" parses "nil : Int32" - parses "break 1, *2" parses "break 1, *2" - parses "a = 1; a *= 1" parses "a = 1; a *= 1" - parses "{} of Int32 -> Int32 => Int32" parses "{} of Int32 -> Int32 => Int32" - says syntax error on "def foo &block ; end" says syntax error on "def foo &block ; end" - parses "foo &.block" parses "foo &.block" - parses "if foo\n1\nend" parses "if foo\n1\nend" - parses "def self.foo=()\n1\nend" parses "def self.foo=()\n1\nend" - says syntax error on "foo &.||()" says syntax error on "foo &.||()" - parses "def foo(@require); end" parses "def foo(@require); end" - parses "foo(n ^ 2)" parses "foo(n ^ 2)" - parses "foo.^(1, 2)" parses "foo.^(1, 2)" - parses "x([] of Foo, Bar.new)" parses "x([] of Foo, Bar.new)" - says syntax error on "foo(1 2)" says syntax error on "foo(1 2)" - parses "foo = 1; b = 2; foo +b" parses "foo = 1; b = 2; foo +b" - parses "enum Foo::Bar; A = 1; end" parses "enum Foo::Bar; A = 1; end" - says syntax error on "def foo(x, x); end" says syntax error on "def foo(x, x); end" - parses "{[] of Foo, self.foo}" parses "{[] of Foo, self.foo}" - parses "lib LibC; fun foo(a : ::B, ::C -> ::D); end" parses "lib LibC; fun foo(a : ::B, ::C -> ::D); end" - says syntax error on "a.b, c.d() = 1" says syntax error on "a.b, c.d() = 1" + says syntax error on "def foo(out); end" says syntax error on "def foo(out); end" + parses "%q{hello \#{foo} world}" parses "%q{hello \#{foo} world}" + parses "def foo(x @true); end" parses "def foo(x @true); end" + parses "foo.&(1, 2) { 3 }" parses "foo.&(1, 2) { 3 }" + parses "def foo(x @include); end" parses "def foo(x @include); end" + says syntax error on "offsetof(X, 'c')" says syntax error on "offsetof(X, 'c')" + parses "->(x : Int32) { }" parses "->(x : Int32) { }" + parses "a.b //=\n1" parses "a.b //=\n1" + says syntax error on " (1, 2, 3 end" says syntax error on " (1, 2, 3 end" + parses "def foo(x = 1, **args)\n1\nend" parses "def foo(x = 1, **args)\n1\nend" parses "foo = 1; ->foo.=~(Int32)" parses "foo = 1; ->foo.=~(Int32)" - parses "def foo(x @@extend); end" parses "def foo(x @@extend); end" - parses "a\nwhile / /; / /; end" parses "a\nwhile / /; / /; end" - parses "foo(0, n &* 2)" parses "foo(0, n &* 2)" - parses "def foo(@@typeof); end" parses "def foo(@@typeof); end" - parses "-1.0" parses "-1.0" - says syntax error on " [1, 2, 3 end" says syntax error on " [1, 2, 3 end" - says syntax error on "next ** 1" says syntax error on "next ** 1" - says syntax error on "foo(next)" says syntax error on "foo(next)" - parses "->Foo.[]=(Int32)" parses "->Foo.[]=(Int32)" - parses "a = 1" parses "a = 1" - parses "if foo; 1; end" parses "if foo; 1; end" - says syntax error on "def f end" says syntax error on "def f end" - parses "1.0_f32" parses "1.0_f32" - parses "{% begin %}%( %s ){% end %}" parses "{% begin %}%( %s ){% end %}" - says syntax error on "foo **bar, *x" says syntax error on "foo **bar, *x" - says syntax error on "foo { |(typeof)| }" says syntax error on "foo { |(typeof)| }" - parses "{foo:'a', bar:'b'}" parses "{foo:'a', bar:'b'}" - parses "def >>(); end" parses "def >>(); end" - parses "foo.bar(1, 2)" parses "foo.bar(1, 2)" - parses "begin\n/ /\nend" parses "begin\n/ /\nend" - parses "a b() {}" parses "a b() {}" - parses "lib LibC\n$errno : B, C -> D\nend" parses "lib LibC\n$errno : B, C -> D\nend" - parses "Foo({*X, *{Y}})" parses "Foo({*X, *{Y}})" - parses "def foo(lib foo); end" parses "def foo(lib foo); end" - says syntax error on "def foo(next); end" says syntax error on "def foo(next); end" - parses "def : Int32" parses "def : Int32" - parses "/foo/" parses "/foo/" - parses "x = 1; foo x { }" parses "x = 1; foo x { }" - says syntax error on "a = next" says syntax error on "a = next" - parses "call(foo : A, end : B)" parses "call(foo : A, end : B)" - parses "<<-'HERE'\n hello \\n world\n \#{1}\n HERE" parses "<<-'HERE'\n hello \\n world\n \#{1}\n HERE" - parses "foo(z: 0, a: n >> 2)" parses "foo(z: 0, a: n >> 2)" - parses "extend : Int32" parses "extend : Int32" - parses "begin; 1; ensure; 2; end" parses "begin; 1; ensure; 2; end" - says syntax error on "def foo(foo while); end" says syntax error on "def foo(foo while); end" - parses "1\\\n + 2" parses "1\\\n + 2" - parses "1.!" parses "1.!" - sets correct location of named tuple type sets correct location of named tuple type - says syntax error on "macro foo x y; end" says syntax error on "macro foo x y; end" - parses "foo.!=(1, 2) { 3 }" parses "foo.!=(1, 2) { 3 }" - parses "foo = 1; foo +1" parses "foo = 1; foo +1" - says syntax error on "break &+ 1" says syntax error on "break &+ 1" - says syntax error on "def foo(include); end" says syntax error on "def foo(include); end" - says syntax error on "foo { |fun| }" says syntax error on "foo { |fun| }" - parses "n & 2" parses "n & 2" - parses "foo &.each do\nend" parses "foo &.each do\nend" - parses "foo.==(1, 2)" parses "foo.==(1, 2)" - parses "foo[*baz] = 1" parses "foo[*baz] = 1" - parses "foo.bar(1, 2) { 3 }" parses "foo.bar(1, 2) { 3 }" - parses "@[Foo]" parses "@[Foo]" - parses "n =~ 2" parses "n =~ 2" - says syntax error on "break % 1" says syntax error on "break % 1" - parses "foo a: b(1) do\nend" parses "foo a: b(1) do\nend" - parses "foo.& do end" parses "foo.& do end" - parses "<<-FOO\n\t1\n\tFOO" parses "<<-FOO\n\t1\n\tFOO" - parses "macro <=>;end" parses "macro <=>;end" - says syntax error on "macro def foo : String; 1; end" says syntax error on "macro def foo : String; 1; end" - parses "->Foo.===(Int32)" parses "->Foo.===(Int32)" - says syntax error on "{{ {% begin %} }}" says syntax error on "{{ {% begin %} }}" - says syntax error on "until return; end" says syntax error on "until return; end" - parses "foo &->bar" parses "foo &->bar" - parses "foo a: 1, b: 2" parses "foo a: 1, b: 2" - parses "foo.| do end" parses "foo.| do end" - parses "def self.>=(); end;" parses "def self.>=(); end;" - parses "a : Foo()*" parses "a : Foo()*" - parses "foo.===(1, 2)" parses "foo.===(1, 2)" - says syntax error on "foo x: 1, x: 1" says syntax error on "foo x: 1, x: 1" - parses "foo(z: 0, a: n / 2)" parses "foo(z: 0, a: n / 2)" - parses "foo.Bar" parses "foo.Bar" - parses "foo(*{1})" parses "foo(*{1})" - parses "foo.bar [1]" parses "foo.bar [1]" - parses "(1 ... )" parses "(1 ... )" - parses "alias Foo::Bar = Baz" parses "alias Foo::Bar = Baz" - parses "macro foo(a, @[Foo] var);end" parses "macro foo(a, @[Foo] var);end" - parses "{\"foo\": 1, \"bar\": 2}" parses "{\"foo\": 1, \"bar\": 2}" - says syntax error on "Hash{\"foo\": 1}" says syntax error on "Hash{\"foo\": 1}" - parses "begin 1 end / 2" parses "begin 1 end / 2" - parses "def foo(x @var); end" parses "def foo(x @var); end" - says syntax error on "a = break" says syntax error on "a = break" - parses "foo.===(1, 2) { 3 }" parses "foo.===(1, 2) { 3 }" - parses "foo &.as?(T).bar" parses "foo &.as?(T).bar" - parses "case {1}\nin {.bar?}; 2; end" parses "case {1}\nin {.bar?}; 2; end" - parses "foo(&.block)" parses "foo(&.block)" - parses "->Foo.foo=" parses "->Foo.foo=" - parses "a = uninitialized Foo; a" parses "a = uninitialized Foo; a" - says syntax error on " {1, 2, 3 end" says syntax error on " {1, 2, 3 end" - parses " def foo(\n @[Foo]\n id : Int32,\n @[Bar] name : String\n ); end" parses " def foo(\n @[Foo]\n id : Int32,\n @[Bar] name : String\n ); end" - says syntax error on "foo { |unless| }" says syntax error on "foo { |unless| }" - parses "property break : Int32" parses "property break : Int32" - says syntax error on "FOO, BAR = 1, 2" says syntax error on "FOO, BAR = 1, 2" - parses "{a: 1}" parses "{a: 1}" - parses "foo.=~ do end" parses "foo.=~ do end" - parses "Foo(Bar())" parses "Foo(Bar())" - parses "foo(z: 0, a: n &- 2)" parses "foo(z: 0, a: n &- 2)" - parses "case 1\nelse\n2\nend" parses "case 1\nelse\n2\nend" - says syntax error on "A = begin; 1; rescue; B = 1; end" says syntax error on "A = begin; 1; rescue; B = 1; end" - parses "asm(\"nop\" : \"a\"(0), \"b\"(1) : \"c\"(2), \"d\"(3))" parses "asm(\"nop\" : \"a\"(0), \"b\"(1) : \"c\"(2), \"d\"(3))" - parses "lib : Int32" parses "lib : Int32" - parses "->@foo.foo?" parses "->@foo.foo?" - says syntax error on "a, b.<=" says syntax error on "a, b.<=" - parses "->foo=" parses "->foo=" - parses "def |(); end" parses "def |(); end" - says syntax error on "foo { |(fun)| }" says syntax error on "foo { |(fun)| }" - parses "def foo(x @@end); end" parses "def foo(x @@end); end" - parses "property case : Int32" parses "property case : Int32" - says syntax error on "foo { |(private)| }" says syntax error on "foo { |(private)| }" - parses "1 <= 2 <= 3" parses "1 <= 2 <= 3" - parses "1 - 2" parses "1 - 2" - parses "def foo(@[Foo] *args); end" parses "def foo(@[Foo] *args); end" - parses "instance_sizeof(\n Int32\n)" parses "instance_sizeof(\n Int32\n)" - says syntax error on "false foo" says syntax error on "false foo" - parses "foo(n | 2)" parses "foo(n | 2)" - says syntax error on "foo { |return| }" says syntax error on "foo { |return| }" - parses "enum Foo; A = 1; B; end" parses "enum Foo; A = 1; B; end" - parses "Int[8, 4,]" parses "Int[8, 4,]" - parses "(1; 2; 3)" parses "(1; 2; 3)" - parses "foo &.[0]" parses "foo &.[0]" - parses "n ** 2" parses "n ** 2" - says syntax error on "def foo(foo out); end" says syntax error on "def foo(foo out); end" - parses "a = 1; a <<= 1" parses "a = 1; a <<= 1" - says syntax error on "def foo(foo sizeof); end" says syntax error on "def foo(foo sizeof); end" + says syntax error on "macro foo *y;end" says syntax error on "macro foo *y;end" + parses "def foo(x @@next); end" parses "def foo(x @@next); end" + says syntax error on "def foo(\"bar\");end" says syntax error on "def foo(\"bar\");end" + says syntax error on "class Foo(*T, *U); end" says syntax error on "class Foo(*T, *U); end" + says syntax error on "-> :Int32 { }" says syntax error on "-> :Int32 { }" + parses "a, *b = 1, 2" parses "a, *b = 1, 2" + parses "lib LibC; Foo = 1; end" parses "lib LibC; Foo = 1; end" + parses "until : Int32" parses "until : Int32" + parses "x = 1; foo x do\nend" parses "x = 1; foo x do\nend" + parses "def &**(); end" parses "def &**(); end" + parses "foo % r()" parses "foo % r()" + parses "break if true" parses "break if true" + says syntax error on "def foo\nlib\nend" says syntax error on "def foo\nlib\nend" + parses "def foo(x @@while); end" parses "def foo(x @@while); end" + parses "foo(\n1)" parses "foo(\n1)" parses "x = 2; foo do bar x end" parses "x = 2; foo do bar x end" - parses "begin\n1\nend\nif true; end" parses "begin\n1\nend\nif true; end" - parses "offsetof(X, 1)" parses "offsetof(X, 1)" - says syntax error on "a() = 1" says syntax error on "a() = 1" - parses "def <=(*args, **opts, &); end" parses "def <=(*args, **opts, &); end" - parses "foo\n #comment\n .bar" parses "foo\n #comment\n .bar" - parses "def foo(x, **args, &block)\n1\nend" parses "def foo(x, **args, &block)\n1\nend" - parses "def ~; end;" parses "def ~; end;" - parses "foo Bar { 1 }" parses "foo Bar { 1 }" - says syntax error on "def foo(x, **x); end" says syntax error on "def foo(x, **x); end" - parses "extend Foo" parses "extend Foo" - parses "!1" parses "!1" - parses "->Foo.|(Int32)" parses "->Foo.|(Int32)" - parses "1.[]=(2, 3)" parses "1.[]=(2, 3)" - parses "foo.!=(1, 2)" parses "foo.!=(1, 2)" - says syntax error on "return &* 1" says syntax error on "return &* 1" - parses "def **; end;" parses "def **; end;" - says syntax error on "return == 1" says syntax error on "return == 1" - parses "def foo(@@asm); end" parses "def foo(@@asm); end" - parses "lib LibC\nend" parses "lib LibC\nend" - parses "1 =~ 2" parses "1 =~ 2" - parses "1 // 2" parses "1 // 2" - parses "1" parses "1" - parses "fun foo(x : Int32) : Int64\nx\nend" parses "fun foo(x : Int32) : Int64\nx\nend" - parses "foo out @x; @x" parses "foo out @x; @x" - parses "begin; 1; rescue Foo; 2; end" parses "begin; 1; rescue Foo; 2; end" - says syntax error on "case next; when 1; end; end" says syntax error on "case next; when 1; end; end" - parses "{{a = 1 if 2}}" parses "{{a = 1 if 2}}" - parses "begin; 1; rescue ex; 2; end" parses "begin; 1; rescue ex; 2; end" - parses "foo ensure 2" parses "foo ensure 2" - parses "abstract struct Foo; end" parses "abstract struct Foo; end" - parses "def foo(@end); end" parses "def foo(@end); end" - says syntax error on "if 1 == 1 a; end" says syntax error on "if 1 == 1 a; end" - says syntax error on "foo { |(asm)| }" says syntax error on "foo { |(asm)| }" - says syntax error on "foo[1] = break" says syntax error on "foo[1] = break" - parses "foo.as(Bar)" parses "foo.as(Bar)" + parses "rescue : Int32" parses "rescue : Int32" + says syntax error on "{a: 1, a: 2}" says syntax error on "{a: 1, a: 2}" + parses "@foo" parses "@foo" + parses "def **(); end" parses "def **(); end" + parses "Foo(typeof(1))" parses "Foo(typeof(1))" + parses "foo rescue 2" parses "foo rescue 2" + says syntax error on "def foo(foo private); end" says syntax error on "def foo(foo private); end" + parses "macro =~;end" parses "macro =~;end" + parses "foo /;/" parses "foo /;/" + parses "foo.< 1, 2" parses "foo.< 1, 2" + says syntax error on "def foo(select); end" says syntax error on "def foo(select); end" + parses "def foo(**args)\nargs\nend" parses "def foo(**args)\nargs\nend" + parses "def foo(@private); end" parses "def foo(@private); end" + parses "foo.-(1, 2)" parses "foo.-(1, 2)" parses "enum Foo; A = 1\ndef foo; 1; end\ndef bar; 2; end\nend" parses "enum Foo; A = 1\ndef foo; 1; end\ndef bar; 2; end\nend" - parses "Set() {1, 2, 3}" parses "Set() {1, 2, 3}" - parses "def self.!~; end;" parses "def self.!~; end;" - parses "n >> 2" parses "n >> 2" - parses "foo.== do end" parses "foo.== do end" - parses "foo = 1; ->foo./(Int32)" parses "foo = 1; ->foo./(Int32)" - parses "def self.foo\n1\nend" parses "def self.foo\n1\nend" + parses "foo(n &+ 2)" parses "foo(n &+ 2)" + parses "begin; 1; rescue ex : ::Foo | ::Bar; 2; end" parses "begin; 1; rescue ex : ::Foo | ::Bar; 2; end" + parses "def foo(@[Foo] var); end" parses "def foo(@[Foo] var); end" + says syntax error on "foo(&block) {}" says syntax error on "foo(&block) {}" + parses "def foo(var : self*); end" parses "def foo(var : self*); end" + parses "foo x, *bar" parses "foo x, *bar" + parses "foo = 1; foo(+1)" parses "foo = 1; foo(+1)" + parses "def foo(x, *, y); 1; end" parses "def foo(x, *, y); 1; end" + parses "begin; 1; rescue ex; 2; end; ex" parses "begin; 1; rescue ex; 2; end; ex" parses "def self.!=(); end;" parses "def self.!=(); end;" - parses "foo(z: 0, a: n // 2)" parses "foo(z: 0, a: n // 2)" - parses "foo *bar" parses "foo *bar" - says syntax error on "foo { |extend| }" says syntax error on "foo { |extend| }" - parses "foo.!= 1, 2" parses "foo.!= 1, 2" - parses "def []; end" parses "def []; end" - says syntax error on "macro foo(x y z); end" says syntax error on "macro foo(x y z); end" - parses "a = 1; pointerof(a)" parses "a = 1; pointerof(a)" - parses "{% begin %}%Q[ %s ]{% end %}" parses "{% begin %}%Q[ %s ]{% end %}" - parses "foo(x:\n begin\n result : Int32 = 1\n result\n end\n )" parses "foo(x:\n begin\n result : Int32 = 1\n result\n end\n )" - parses "->Foo.-(Int32)" parses "->Foo.-(Int32)" - parses "def foo(x @private); end" parses "def foo(x @private); end" - says syntax error on "1 while 3" says syntax error on "1 while 3" - says syntax error on "foo(\"bar\" \"baz\")" says syntax error on "foo(\"bar\" \"baz\")" - parses "def self.*; end;" parses "def self.*; end;" - parses "lib LibC; fun foo(a : Int**); end" parses "lib LibC; fun foo(a : Int**); end" - says syntax error on "foo { |(alias)| }" says syntax error on "foo { |(alias)| }" - says syntax error on "def !; end" says syntax error on "def !; end" - parses "def foo(x @self); end" parses "def foo(x @self); end" - says syntax error on "{% unless 1 %} 2 {% elsif 3 %} 3 {% end %}" says syntax error on "{% unless 1 %} 2 {% elsif 3 %} 3 {% end %}" - parses "foo.>(1, 2)" parses "foo.>(1, 2)" - parses "f.x *= 2" parses "f.x *= 2" - parses "macro -;end" parses "macro -;end" - parses "def >(); end" parses "def >(); end" - parses "{%\nif 1; 2; end\n%}" parses "{%\nif 1; 2; end\n%}" - says syntax error on "break // 1" says syntax error on "break // 1" - parses "foo%q" parses "foo%q" - parses "foo(0, n | 2)" parses "foo(0, n | 2)" - parses "foo &.block[0] = 1" parses "foo &.block[0] = 1" - parses "foo.=~" parses "foo.=~" - parses "property sizeof : Int32" parses "property sizeof : Int32" - parses "lib LibC\nfun getchar(a : Int, b : Float) : Int\nend" parses "lib LibC\nfun getchar(a : Int, b : Float) : Int\nend" - says syntax error on "def foo(x @@x); 1; end" says syntax error on "def foo(x @@x); 1; end" - says syntax error on "next ? 1 : 2" says syntax error on "next ? 1 : 2" - parses "foo(a: n &* 2)" parses "foo(a: n &* 2)" - parses "def foo(@abstract); end" parses "def foo(@abstract); end" - parses "case;when true;1;end" parses "case;when true;1;end" - parses "a ?\n b ? b1 : b2\n : c ? 3\n : 0" parses "a ?\n b ? b1 : b2\n : c ? 3\n : 0" - parses "def foo(x @unless); end" parses "def foo(x @unless); end" - parses "def foo(@extend); end" parses "def foo(@extend); end" - parses "x = 1; foo x {\n}" parses "x = 1; foo x {\n}" - says syntax error on "def foo(nil); end" says syntax error on "def foo(nil); end" - parses ":+" parses ":+" - says syntax error on "def foo(foo pointerof); end" says syntax error on "def foo(foo pointerof); end" - parses "foo.+" parses "foo.+" - parses "def foo(@@struct); end" parses "def foo(@@struct); end" - parses "->(x) { x }" parses "->(x) { x }" - parses "def foo(x @begin); end" parses "def foo(x @begin); end" - says syntax error on "Set {1, 2, 3} of Int32" says syntax error on "Set {1, 2, 3} of Int32" - parses "foo./(1, 2) { 3 }" parses "foo./(1, 2) { 3 }" - parses "{1, 2, 3}" parses "{1, 2, 3}" - says syntax error on "def foo(*x, &x); end" says syntax error on "def foo(*x, &x); end" - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\"\n: \"volatile\", \"alignstack\"\n,\n\"intel\"\n)" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\"\n: \"volatile\", \"alignstack\"\n,\n\"intel\"\n)" - parses "def self.%; end;" parses "def self.%; end;" - parses "def foo(@break); end" parses "def foo(@break); end" - parses "foo(n =~ 2)" parses "foo(n =~ 2)" - parses "a()/3" parses "a()/3" - parses "def foo(@enum); end" parses "def foo(@enum); end" - parses "def foo(x @@var); end" parses "def foo(x @@var); end" - parses "def foo(*y : *T); 1; end" parses "def foo(*y : *T); 1; end" - parses "break" parses "break" - says syntax error on "unless break; end" says syntax error on "unless break; end" - says syntax error on "case 1; when next; end; end" says syntax error on "case 1; when next; end; end" - parses "def foo(x @instance_sizeof); end" parses "def foo(x @instance_sizeof); end" - parses "1.as Bar" parses "1.as Bar" - parses "f.x |= 2" parses "f.x |= 2" + parses "puts ::foo" parses "puts ::foo" + parses "def foo(x, *y); 1; end" parses "def foo(x, *y); 1; end" + parses "Foo({x: X})" parses "Foo({x: X})" + parses "def foo(x @until); end" parses "def foo(x @until); end" + parses "def ~; end;" parses "def ~; end;" + parses "%r(/)" parses "%r(/)" + says syntax error on "foo 1," says syntax error on "foo 1," + says syntax error on "{\n\"foo\"\n\"bar\"\n}" says syntax error on "{\n\"foo\"\n\"bar\"\n}" parses "{%\n1\n2\n3\n%}" parses "{%\n1\n2\n3\n%}" - parses "macro foo;var if true;end" parses "macro foo;var if true;end" - parses "&- 1" parses "&- 1" - parses "[..2]" parses "[..2]" - sets correct location of global path in class def sets correct location of global path in class def - parses "1 +2.0" parses "1 +2.0" - parses "foo.!( )" parses "foo.!( )" - parses "def foo ; 1 ; end" parses "def foo ; 1 ; end" - says syntax error on "def foo; require \"bar\"; end" says syntax error on "def foo; require \"bar\"; end" - parses "1 ? a : b ? c : 3" parses "1 ? a : b ? c : 3" - says syntax error on "def foo(module); end" says syntax error on "def foo(module); end" - parses "{% begin %}%i{ %s }{% end %}" parses "{% begin %}%i{ %s }{% end %}" - says syntax error on "def foo\nmacro\nend" says syntax error on "def foo\nmacro\nend" - parses "def <; end;" parses "def <; end;" - parses "foo + 1" parses "foo + 1" + says syntax error on "def self.as; end" says syntax error on "def self.as; end" + parses "def foo(x @end); end" parses "def foo(x @end); end" + parses "foo.|(1, 2) { 3 }" parses "foo.|(1, 2) { 3 }" + parses "instance_sizeof : Int32" parses "instance_sizeof : Int32" + parses "def self.==; end;" parses "def self.==; end;" + parses "Int[8, 4,]" parses "Int[8, 4,]" + says syntax error on "macro Foo;end" says syntax error on "macro Foo;end" + parses "foo[*baz]" parses "foo[*baz]" + parses ":=~" parses ":=~" + parses "foo(Bar) { 1 }" parses "foo(Bar) { 1 }" + says syntax error on "foo { |x, (x)| }" says syntax error on "foo { |x, (x)| }" + sets correct location of instance variable in proc pointer sets correct location of instance variable in proc pointer + says syntax error on "case 1\nwhen Int32; 2; in 2" says syntax error on "case 1\nwhen Int32; 2; in 2" says syntax error on "break >= 1" says syntax error on "break >= 1" - parses "def foo(@[Foo] var); end" parses "def foo(@[Foo] var); end" - parses "fun foo : Int32; 1; end; 2" parses "fun foo : Int32; 1; end; 2" - parses "a = 1; a >>= 1" parses "a = 1; a >>= 1" - parses "if foo.responds_to? :foo\nx = 1\nend" parses "if foo.responds_to? :foo\nx = 1\nend" - parses "def foo; yield 1; yield; end" parses "def foo; yield 1; yield; end" - parses "*a.foo, a.bar = 1" parses "*a.foo, a.bar = 1" - parses "abstract def foo; 1" parses "abstract def foo; 1" - parses "foo = 1; ->foo.*(Int32)" parses "foo = 1; ->foo.*(Int32)" - parses "{..2}" parses "{..2}" - says syntax error on "def foo 1; end" says syntax error on "def foo 1; end" - parses "nil" parses "nil" - parses "def ^(); end;" parses "def ^(); end;" - says syntax error on "macro foo(**x, y)" says syntax error on "macro foo(**x, y)" - parses "while true; end;" parses "while true; end;" - parses "->Foo.<=(Int32)" parses "->Foo.<=(Int32)" - parses "puts %w(one two)" parses "puts %w(one two)" - says syntax error on "->() :Int32 { }" says syntax error on "->() :Int32 { }" - parses "def foo(while foo); end" parses "def foo(while foo); end" + parses "lib LibC; type A = B; end" parses "lib LibC; type A = B; end" + parses "foo(x) do\n//\nend" parses "foo(x) do\n//\nend" + parses "<<-HERE\nHERE" parses "<<-HERE\nHERE" + parses "foo(n - 2)" parses "foo(n - 2)" + says syntax error on "next &* 1" says syntax error on "next &* 1" + parses "x = 1 rescue 2" parses "x = 1 rescue 2" + parses "alignof(X)" parses "alignof(X)" + parses "{% begin %}%r[\\A]{% end %}" parses "{% begin %}%r[\\A]{% end %}" + parses "Foo(1)" parses "Foo(1)" + parses "Foo{\"x\" => \"y\"}" parses "Foo{\"x\" => \"y\"}" + says syntax error on "def foo(require); end" says syntax error on "def foo(require); end" + parses "property with : Int32" parses "property with : Int32" + parses "a = 1; pointerof(a)" parses "a = 1; pointerof(a)" + says syntax error on "next % 1" says syntax error on "next % 1" says syntax error on "def foo(var = 1 : Int32); end" says syntax error on "def foo(var = 1 : Int32); end" - parses "a = 1; a ||= 1" parses "a = 1; a ||= 1" - parses "def foo; / /; end" parses "def foo; / /; end" - parses "->@@foo.foo!" parses "->@@foo.foo!" - parses "macro foo;bar{% begin %}body{% end %}baz;end" parses "macro foo;bar{% begin %}body{% end %}baz;end" - parses "macro //;end" parses "macro //;end" - parses "Foo(T | U)" parses "Foo(T | U)" - parses "@a = uninitialized Foo" parses "@a = uninitialized Foo" - parses "1;+2" parses "1;+2" - parses "foo 1;" parses "foo 1;" - parses "Int[8]?" parses "Int[8]?" - parses "foo = 1; ->foo.bar(Int32)" parses "foo = 1; ->foo.bar(Int32)" - parses "*_ = 1, 2" parses "*_ = 1, 2" - parses "def foo(a, &block : Foo); end" parses "def foo(a, &block : Foo); end" - parses "def +(); end" parses "def +(); end" - parses "foo(n * 2)" parses "foo(n * 2)" - parses "foo%x" parses "foo%x" - parses "a = 1; a/b" parses "a = 1; a/b" - parses "Foo(typeof(1))" parses "Foo(typeof(1))" - parses "def <=; end;" parses "def <=; end;" - parses "class Foo; end" parses "class Foo; end" - says syntax error on "Foo({x: X, x: Y})" says syntax error on "Foo({x: X, x: Y})" - parses "def foo(@false); end" parses "def foo(@false); end" - parses "1.tap do |x|; 1; rescue; x; end" parses "1.tap do |x|; 1; rescue; x; end" - parses "case 1\nwhen .responds_to?(:foo)\n2\nend" parses "case 1\nwhen .responds_to?(:foo)\n2\nend" - parses "1 ^ 2" parses "1 ^ 2" - parses "property enum : Int32" parses "property enum : Int32" - parses "def foo(@@sizeof); end" parses "def foo(@@sizeof); end" - parses "def foo(&); end" parses "def foo(&); end" - says syntax error on "foo { |(enum)| }" says syntax error on "foo { |(enum)| }" - says syntax error on "return > 1" says syntax error on "return > 1" - says syntax error on "foo[1] = return" says syntax error on "foo[1] = return" - says syntax error on "{1 2}" says syntax error on "{1 2}" - parses "def foo(x @@unless); end" parses "def foo(x @@unless); end" - says syntax error on "foo { |next| }" says syntax error on "foo { |next| }" - says syntax error on "def foo(break); end" says syntax error on "def foo(break); end" - parses "foo.|(1, 2) { 3 }" parses "foo.|(1, 2) { 3 }" - parses "{%\na = 1\n%}" parses "{%\na = 1\n%}" - parses "foo(n ** 2)" parses "foo(n ** 2)" - parses "foo = 1; ->foo.===(Int32)" parses "foo = 1; ->foo.===(Int32)" - says syntax error on "$foo" says syntax error on "$foo" - parses "foo /;/" parses "foo /;/" - parses "def self.~; end;" parses "def self.~; end;" - says syntax error on "def foo(pointerof); end" says syntax error on "def foo(pointerof); end" - parses "class Foo < self; end" parses "class Foo < self; end" - says syntax error on "foo { |alias| }" says syntax error on "foo { |alias| }" - parses "def foo(var : Char[N]); end" parses "def foo(var : Char[N]); end" - parses "begin; 1; rescue Foo | Bar; 2; end" parses "begin; 1; rescue Foo | Bar; 2; end" - says syntax error on "def foo(*args = 1); end" says syntax error on "def foo(*args = 1); end" - says syntax error on "a = 1, b = 2" says syntax error on "a = 1, b = 2" - says syntax error on "return[0]" says syntax error on "return[0]" - parses "begin; 1; 2; 3; end;" parses "begin; 1; 2; 3; end;" - parses "foo(&.as?(T))" parses "foo(&.as?(T))" - parses "def foo(@[Foo] outer inner); end" parses "def foo(@[Foo] outer inner); end" - parses "yield : Int32" parses "yield : Int32" + global regex match data + parses "$~.foo" parses "$~.foo" + parses "$~ = 1" parses "$~ = 1" + says syntax error on "$2147483648" says syntax error on "$2147483648" + parses "$~" parses "$~" + parses "foo $?" parses "foo $?" + says syntax error on "$0, $1 = [1, 2]" says syntax error on "$0, $1 = [1, 2]" + says syntax error on "$0, a = {1, 2}" says syntax error on "$0, a = {1, 2}" + parses "$? = 1" parses "$? = 1" + parses "$?" parses "$?" + parses "$0" parses "$0" + parses "foo $1" parses "foo $1" + says syntax error on "$99999999999999999999999?" says syntax error on "$99999999999999999999999?" + parses "$1" parses "$1" + parses "$?.foo" parses "$?.foo" + parses "$1?" parses "$1?" + says syntax error on "$0 = 1" says syntax error on "$0 = 1" + says syntax error on "def foo():String\nend" says syntax error on "def foo():String\nend" + parses "{\n1,\n2\n}" parses "{\n1,\n2\n}" + says syntax error on "unless return; end" says syntax error on "unless return; end" + says syntax error on "def foo\nalias\nend" says syntax error on "def foo\nalias\nend" + parses "puts __LINE__" parses "puts __LINE__" + parses "def foo(var : (Int, Float -> Double)); end" parses "def foo(var : (Int, Float -> Double)); end" + parses "sizeof : Int32" parses "sizeof : Int32" + says syntax error on "+next" says syntax error on "+next" parses ":foo" parses ":foo" - parses "-@foo" parses "-@foo" - says syntax error on "foo { |until| }" says syntax error on "foo { |until| }" - parses ":[]" parses ":[]" - parses "foo.>=(1, 2)" parses "foo.>=(1, 2)" - says syntax error on "def as; end" says syntax error on "def as; end" - parses "yield;" parses "yield;" - says syntax error on "foo(\"\": 1)" says syntax error on "foo(\"\": 1)" - parses "foo(a: 1, b: 2)" parses "foo(a: 1, b: 2)" - says syntax error on "break - 1" says syntax error on "break - 1" - says syntax error on "def foo(**args = 1); end" says syntax error on "def foo(**args = 1); end" - parses "def foo(var : Int32 = 1); end" parses "def foo(var : Int32 = 1); end" - parses "Foo(X, offsetof(Foo, @a))" parses "Foo(X, offsetof(Foo, @a))" - says syntax error on "->(x y) { }" says syntax error on "->(x y) { }" - parses "foo(bar do\nend)" parses "foo(bar do\nend)" - parses "def <(); end;" parses "def <(); end;" - parses "macro ===;end" parses "macro ===;end" - says syntax error on "foo(**bar, out x)" says syntax error on "foo(**bar, out x)" - says syntax error on "next[0]= 1" says syntax error on "next[0]= 1" - says syntax error on "def foo(while); end" says syntax error on "def foo(while); end" - parses "macro +;end" parses "macro +;end" - parses "foo = 1; ->foo.==(Int32)" parses "foo = 1; ->foo.==(Int32)" - says syntax error on "foo.&&" says syntax error on "foo.&&" - parses "lib LibC; union Foo; end end" parses "lib LibC; union Foo; end end" - parses "macro foo(\na = 0\n)\nend" parses "macro foo(\na = 0\n)\nend" - parses ":===" parses ":===" - parses "1+0" parses "1+0" - says syntax error on "break & 1" says syntax error on "break & 1" - says syntax error on "x[1:-2]" says syntax error on "x[1:-2]" - says syntax error on "<<-HERE\n One\nwrong\n Zero\n HERE" says syntax error on "<<-HERE\n One\nwrong\n Zero\n HERE" - says syntax error on "offsetof(X, 1.0)" says syntax error on "offsetof(X, 1.0)" - says syntax error on "1 as Bar" says syntax error on "1 as Bar" - says syntax error on "def foo(begin); end" says syntax error on "def foo(begin); end" - parses "{% begin %}%Q( %s ){% end %}" parses "{% begin %}%Q( %s ){% end %}" - parses ":-" parses ":-" - parses "def foo(@@in); end" parses "def foo(@@in); end" - parses "macro foo;bar{% if x %}body{% end %}baz;end" parses "macro foo;bar{% if x %}body{% end %}baz;end" - parses "a : Foo()[12]" parses "a : Foo()[12]" - parses "->Foo.*(Int32)" parses "->Foo.*(Int32)" - parses "foo(bar:a, baz:b)" parses "foo(bar:a, baz:b)" - parses "{{ foo.nil? }}" parses "{{ foo.nil? }}" - parses "lib LibC; struct Foo; {{ 1 }}; end; end" parses "lib LibC; struct Foo; {{ 1 }}; end; end" - parses "def /; end;" parses "def /; end;" - says syntax error on "{\n1 => 2\n3 => 4\n}" says syntax error on "{\n1 => 2\n3 => 4\n}" - parses "def ===(*args, **opts, &); end" parses "def ===(*args, **opts, &); end" - parses "->@foo.foo=" parses "->@foo.foo=" - parses "if foo\n1\nelse\n2\nend" parses "if foo\n1\nelse\n2\nend" - says syntax error on "/foo)/" says syntax error on "/foo)/" - parses "/ /" parses "/ /" - parses "@[Foo(\n1, foo: 2\n)]" parses "@[Foo(\n1, foo: 2\n)]" - says syntax error on "enum Foo\n A, B, C\nend\n" says syntax error on "enum Foo\n A, B, C\nend\n" - parses "foo.responds_to?(:foo)" parses "foo.responds_to?(:foo)" - parses "def >=; end;" parses "def >=; end;" - parses "foo(a: n ^ 2)" parses "foo(a: n ^ 2)" - says syntax error on "break > 1" says syntax error on "break > 1" - says syntax error on "next / 1" says syntax error on "next / 1" - says syntax error on "next ^ 1" says syntax error on "next ^ 1" - parses "def self.foo=\n1\nend" parses "def self.foo=\n1\nend" - parses "foo.nil?( )" parses "foo.nil?( )" - parses "foo(a: n =~ 2)" parses "foo(a: n =~ 2)" - parses "foo(out @x); @x" parses "foo(out @x); @x" - parses "Foo(x: U)" parses "Foo(x: U)" - parses "n // 2" parses "n // 2" - parses "Foo({String, ->, ->})" parses "Foo({String, ->, ->})" - parses "{[] of Foo, Bar::Baz * 2}" parses "{[] of Foo, Bar::Baz * 2}" - parses "foo(z: 0, a: n &+ 2)" parses "foo(z: 0, a: n &+ 2)" - parses "->(x : Int32) : Int32 { }" parses "->(x : Int32) : Int32 { }" - says syntax error on "\"hello\" foo" says syntax error on "\"hello\" foo" - parses "x, y = <<-FOO, <<-BAR\nhello\nFOO\nworld\nBAR" parses "x, y = <<-FOO, <<-BAR\nhello\nFOO\nworld\nBAR" - parses "def foo(require foo); end" parses "def foo(require foo); end" - parses "a.b() /3" parses "a.b() /3" - parses "def *(); end;" parses "def *(); end;" + parses "a = 1\ncase 1\nwhen a then 1\nend" parses "a = 1\ncase 1\nwhen a then 1\nend" + says syntax error on "foo { |fun| }" says syntax error on "foo { |fun| }" + parses ":foo?" parses ":foo?" + says syntax error on "def foo(\"\" y); y; end" says syntax error on "def foo(\"\" y); y; end" + says syntax error on "a = 1; a += return" says syntax error on "a = 1; a += return" + says syntax error on "next >= 1" says syntax error on "next >= 1" + parses "{% x if 1 %}" parses "{% x if 1 %}" + says syntax error on ":bar foo" says syntax error on ":bar foo" + says syntax error on "unless 1 == 1 a; end" says syntax error on "unless 1 == 1 a; end" + parses "\u3042.\u3044, \u3046.\u3048.\u304A = 1, 2" parses "\u3042.\u3044, \u3046.\u3048.\u304A = 1, 2" + parses "macro foo; 1 + 2; end" parses "macro foo; 1 + 2; end" + parses "->Foo.==(Int32)" parses "->Foo.==(Int32)" + parses "1.foo do; 1; end" parses "1.foo do; 1; end" + parses "next" parses "next" + parses "macro foo;%var{1, x} = hello;end" parses "macro foo;%var{1, x} = hello;end" + parses "1_i64" parses "1_i64" + parses "def foo(x @@macro); end" parses "def foo(x @@macro); end" + parses "def foo(@@instance_sizeof); end" parses "def foo(@@instance_sizeof); end" + parses "def `(cmd); 1; end" parses "def `(cmd); 1; end" + parses "1 ensure 2 if 3" parses "1 ensure 2 if 3" + parses "1/2" parses "1/2" + says syntax error on "foo { |(class)| }" says syntax error on "foo { |(class)| }" + says syntax error on "a = 1, b = 2" says syntax error on "a = 1, b = 2" + parses "foo(a: n + 2)" parses "foo(a: n + 2)" + says syntax error on "$foo" says syntax error on "$foo" + parses "def foo; yield 1; end" parses "def foo; yield 1; end" + says syntax error on "a, b, c, d, *e = 1, 2, 3" says syntax error on "a, b, c, d, *e = 1, 2, 3" + says syntax error on "foo.&&()" says syntax error on "foo.&&()" + parses "macro <;end" parses "macro <;end" + says syntax error on "def foo(nil); end" says syntax error on "def foo(nil); end" + says syntax error on "def foo(x : U) forall U, U; end" says syntax error on "def foo(x : U) forall U, U; end" + parses "{% unless 1\n x\nend %}" parses "{% unless 1\n x\nend %}" + parses "{[] of Foo, Bar::Baz ** 2}" parses "{[] of Foo, Bar::Baz ** 2}" + parses "foo.bar [1]" parses "foo.bar [1]" + parses "<<-HERE\r\n One\r\n Zero\r\n HERE\r\n" parses "<<-HERE\r\n One\r\n Zero\r\n HERE\r\n" + parses "def foo; x { |a| a }; end" parses "def foo; x { |a| a }; end" + parses "macro foo(x = __LINE__);end" parses "macro foo(x = __LINE__);end" + parses "def //(); end" parses "def //(); end" + parses "foo.- do end" parses "foo.- do end" + parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) ::)" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) ::)" + parses "def foo(var : (Int, Float) -> Double); end" parses "def foo(var : (Int, Float) -> Double); end" + parses "foo &.block(1)" parses "foo &.block(1)" + parses "case 1\nin nil; 2; end" parses "case 1\nin nil; 2; end" + says syntax error on "foo { |(return)| }" says syntax error on "foo { |(return)| }" + parses "foo(n & 2)" parses "foo(n & 2)" + parses "foo%r" parses "foo%r" + parses "def foo(@with); end" parses "def foo(@with); end" + parses "Foo(\n)" parses "Foo(\n)" + says syntax error on "*a == 1" says syntax error on "*a == 1" + parses "foo.^(1, 2)" parses "foo.^(1, 2)" + parses "\n\n__LINE__" parses "\n\n__LINE__" + parses "case {1}\nin {true}; 2; end" parses "case {1}\nin {true}; 2; end" parses "Int" parses "Int" - says syntax error on "{a[0]: 1}" says syntax error on "{a[0]: 1}" - parses "foo(n > 2)" parses "foo(n > 2)" - parses "def %; end;" parses "def %; end;" - parses "foo.&(1, 2)" parses "foo.&(1, 2)" - parses "case 1\nwhen .!()\n2\nend" parses "case 1\nwhen .!()\n2\nend" - parses "foo(a: n < 2)" parses "foo(a: n < 2)" - says syntax error on "break ... 1" says syntax error on "break ... 1" - says syntax error on "->(x : Int32, x : Int32) {}" says syntax error on "->(x : Int32, x : Int32) {}" - parses "a = 1; b = 2; c = 3; a-b-c" parses "a = 1; b = 2; c = 3; a-b-c" - parses "f.x = Foo.new" parses "f.x = Foo.new" - parses "def self./; end;" parses "def self./; end;" - parses "a.foo, *a.bar = 1" parses "a.foo, *a.bar = 1" - parses "1 rescue 2 if 3" parses "1 rescue 2 if 3" - parses "property def : Int32" parses "property def : Int32" - parses "a == / /" parses "a == / /" - parses "puts __DIR__" parses "puts __DIR__" - parses "@[Foo::Bar]" parses "@[Foo::Bar]" - says syntax error on "def foo:String\nend" says syntax error on "def foo:String\nend" - parses "->Foo.<<(Int32)" parses "->Foo.<<(Int32)" - parses "\"hello \"\\\r\n\"world\"" parses "\"hello \"\\\r\n\"world\"" - parses "def foo(\nvar\n); end" parses "def foo(\nvar\n); end" - parses "1 % 2" parses "1 % 2" - parses "foo *{1}" parses "foo *{1}" - parses "foo = 1; ->foo.&*(Int32)" parses "foo = 1; ->foo.&*(Int32)" - parses "a, b = 1" parses "a, b = 1" - parses "foo % x()" parses "foo % x()" - parses "foo.&(1, 2) { 3 }" parses "foo.&(1, 2) { 3 }" - parses "pointerof(@a)" parses "pointerof(@a)" - parses "my_def def foo\nloop do\nend\nend" parses "my_def def foo\nloop do\nend\nend" - says syntax error on "def foo(foo begin); end" says syntax error on "def foo(foo begin); end" - parses "@a : Foo | Int32" parses "@a : Foo | Int32" - parses "property yield : Int32" parses "property yield : Int32" - parses "[] of ->\n" parses "[] of ->\n" - parses "{% for _, x, _ in y %}body{% end %}" parses "{% for _, x, _ in y %}body{% end %}" - parses "macro foo;bar(end: 1);end" parses "macro foo;bar(end: 1);end" - parses "foo.<=" parses "foo.<=" + says syntax error on "macro as?; end" says syntax error on "macro as?; end" + says syntax error on "break ^ 1" says syntax error on "break ^ 1" + parses "n + 2" parses "n + 2" + parses "case {1, 2}\nwhen {3, 4}\n5\nend" parses "case {1, 2}\nwhen {3, 4}\n5\nend" + says syntax error on "break.foo" says syntax error on "break.foo" + parses "&- 1" parses "&- 1" + parses "a : Foo | Int32" parses "a : Foo | Int32" + parses "foo &.block=(0)" parses "foo &.block=(0)" + says syntax error on "foo { |(false)| }" says syntax error on "foo { |(false)| }" + parses "foo(1, **bar)" parses "foo(1, **bar)" says syntax error on "macro as; end" says syntax error on "macro as; end" - parses "def foo(x @@while); end" parses "def foo(x @@while); end" - says syntax error on "def foo @var, █ end" says syntax error on "def foo @var, █ end" + parses "foo.bar 1, 2" parses "foo.bar 1, 2" + parses "case 1; when 1; 2; else; 3; end" parses "case 1; when 1; 2; else; 3; end" + parses "foo(&.as(T))" parses "foo(&.as(T))" + says syntax error on "while 1 == 1 a; end" says syntax error on "while 1 == 1 a; end" + says syntax error on "def foo(begin); end" says syntax error on "def foo(begin); end" + parses "->foo?" parses "->foo?" + says syntax error on "case 1; when next; end; end" says syntax error on "case 1; when next; end; end" + parses "foo { |(a, (b, (c, d)))| }" parses "foo { |(a, (b, (c, d)))| }" + parses "a = 1; a **= 1" parses "a = 1; a **= 1" + parses "class Foo < Bar; end" parses "class Foo < Bar; end" + parses "\"hello \#{1}\" \\\n \"\#{2} world\"" parses "\"hello \#{1}\" \\\n \"\#{2} world\"" + parses "<<-HERE\n \#{1} \#{2}\n HERE" parses "<<-HERE\n \#{1} \#{2}\n HERE" + parses "def foo(var : self?); end" parses "def foo(var : self?); end" + parses "def foo; end; if false; 1; else; 2; end" parses "def foo; end; if false; 1; else; 2; end" + says syntax error on "a {} = 1" says syntax error on "a {} = 1" + says syntax error on "if 1 == 1 a; end" says syntax error on "if 1 == 1 a; end" + parses "def foo(x @require); end" parses "def foo(x @require); end" + parses "lib LibC\nend" parses "lib LibC\nend" + parses "a = 1; a ^=\n1" parses "a = 1; a ^=\n1" + parses "next *1, 2" parses "next *1, 2" + sets correct location of annotation on method parameter sets correct location of annotation on method parameter + says syntax error on "def foo(enum); end" says syntax error on "def foo(enum); end" + says syntax error on "[\n\"foo\"\n\"bar\"\n]" says syntax error on "[\n\"foo\"\n\"bar\"\n]" + parses "case a\nwhen b\n1 / 2\nelse\n1 / 2\nend" parses "case a\nwhen b\n1 / 2\nelse\n1 / 2\nend" + parses "foo % Q()" parses "foo % Q()" + parses "macro foo\n <<-FOO, <<-BAR + \"\"\n FOO\n BAR\nend" parses "macro foo\n <<-FOO, <<-BAR + \"\"\n FOO\n BAR\nend" + says syntax error on "<<-HERE\n One\n \#{1}\n wrong\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n wrong\n HERE" + parses "macro foo\n <<-FOO\n \#{ %var }\n FOO\nend" parses "macro foo\n <<-FOO\n \#{ %var }\n FOO\nend" + parses "foo = 1; ->foo.<<(Int32)" parses "foo = 1; ->foo.<<(Int32)" + parses "foo(n &- 2)" parses "foo(n &- 2)" + parses "foo(z: 0, a: n &- 2)" parses "foo(z: 0, a: n &- 2)" + parses "a = 1; yield a ensure a" parses "a = 1; yield a ensure a" + parses "def self.*(); end;" parses "def self.*(); end;" + says syntax error on "foo(1 2)" says syntax error on "foo(1 2)" + parses "def foo(@@pointerof); end" parses "def foo(@@pointerof); end" + parses "a() /3" parses "a() /3" + parses "lib LibC\nfun getchar(a : Int)\nend" parses "lib LibC\nfun getchar(a : Int)\nend" + parses "->Foo.&*(Int32)" parses "->Foo.&*(Int32)" + says syntax error on "<<-HERE\n One\n \#{1}\n Zero\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n Zero\n HERE" + parses "1 -\n2" parses "1 -\n2" + parses "foo.===(1, 2)" parses "foo.===(1, 2)" + parses "@[Foo(1, foo: 2)]" parses "@[Foo(1, foo: 2)]" + parses "property typeof : Int32" parses "property typeof : Int32" + parses "1 + 2" parses "1 + 2" + parses "1 + 2" parses "1 + 2" parses "a.b +=\n1" parses "a.b +=\n1" - parses "foo %r" parses "foo %r" - parses "1 if 3" parses "1 if 3" - parses "foo(n // 2)" parses "foo(n // 2)" - says syntax error on "1 ... next" says syntax error on "1 ... next" - says syntax error on "1 .. break" says syntax error on "1 .. break" - parses "foo(a: n | 2)" parses "foo(a: n | 2)" - parses "1 rescue 2" parses "1 rescue 2" - parses "@foo = 1" parses "@foo = 1" - says syntax error on "class Foo; require \"bar\"; end" says syntax error on "class Foo; require \"bar\"; end" - parses "case 1\nin Foo(Int32); 2; end" parses "case 1\nin Foo(Int32); 2; end" - parses "def foo(@protected); end" parses "def foo(@protected); end" - parses "case 1\nin .bar?; 2; end" parses "case 1\nin .bar?; 2; end" - parses "case 1\nin nil; 2; end" parses "case 1\nin nil; 2; end" - parses "foo &.block[0]" parses "foo &.block[0]" - says syntax error on "def as?; end" says syntax error on "def as?; end" - parses "def foo(x @extend); end" parses "def foo(x @extend); end" - parses "(/ /)" parses "(/ /)" - says syntax error on "foo { |lib| }" says syntax error on "foo { |lib| }" - parses ":foo!" parses ":foo!" - says syntax error on "def foo(foo lib); end" says syntax error on "def foo(foo lib); end" - parses "def self.<=(); end;" parses "def self.<=(); end;" - parses "1.is_a?(\n Int32\n)" parses "1.is_a?(\n Int32\n)" - says syntax error on "A = begin; 1; ensure; B = 1; end" says syntax error on "A = begin; 1; ensure; B = 1; end" - parses "def foo(@until); end" parses "def foo(@until); end" - parses "begin; 1; end;" parses "begin; 1; end;" - parses "def foo(&@block); end" parses "def foo(&@block); end" - parses "foo(0, n &- 2)" parses "foo(0, n &- 2)" - parses "foo(a: n &- 2)" parses "foo(a: n &- 2)" - parses "x = 1; ->{ x }" parses "x = 1; ->{ x }" - parses "macro <<;end" parses "macro <<;end" - says syntax error on "break.foo" says syntax error on "break.foo" - says syntax error on "A = foo { B = 1 }" says syntax error on "A = foo { B = 1 }" - says syntax error on "case 1; when break; end; end" says syntax error on "case 1; when break; end; end" - says syntax error on "def foo(&a foo); end" says syntax error on "def foo(&a foo); end" - says syntax error on "def foo(foo class); end" says syntax error on "def foo(foo class); end" - parses "[] of ->;" parses "[] of ->;" - parses "def foo(@@fun); end" parses "def foo(@@fun); end" - parses "def foo(x @@macro); end" parses "def foo(x @@macro); end" - parses "break 1" parses "break 1" + parses "foo = 1; ->foo.<(Int32)" parses "foo = 1; ->foo.<(Int32)" + parses "foo(a: n <= 2)" parses "foo(a: n <= 2)" + parses "offsetof(X, 1)" parses "offsetof(X, 1)" + parses "1 -2_i64" parses "1 -2_i64" + says syntax error on "foo(**bar, *x)" says syntax error on "foo(**bar, *x)" + says syntax error on "def foo(if); end" says syntax error on "def foo(if); end" + parses "return {1, 2}" parses "return {1, 2}" parses "foo.- 1, 2" parses "foo.- 1, 2" - parses "def foo(x @module); end" parses "def foo(x @module); end" - parses "def foo(typeof foo); end" parses "def foo(typeof foo); end" - says syntax error on "return >> 1" says syntax error on "return >> 1" - parses "foo = 1; foo {}" parses "foo = 1; foo {}" - parses "a = 1; a &=\n1" parses "a = 1; a &=\n1" - says syntax error on "@@foo :: Foo" says syntax error on "@@foo :: Foo" - parses "foo &.block=(0)" parses "foo &.block=(0)" - says syntax error on "foo { |(instance_sizeof)| }" says syntax error on "foo { |(instance_sizeof)| }" - parses "`foo`" parses "`foo`" - parses "foo.!~ 1, 2" parses "foo.!~ 1, 2" - sets correct location of instance variable in proc pointer sets correct location of instance variable in proc pointer - says syntax error on "def foo(foo enum); end" says syntax error on "def foo(foo enum); end" - parses "def foo(x @enum); end" parses "def foo(x @enum); end" - parses "case 1\nwhen .foo\n2\nend" parses "case 1\nwhen .foo\n2\nend" - says syntax error on "\"\#{<<-HERE}\"\nHERE" says syntax error on "\"\#{<<-HERE}\"\nHERE" - parses "property alias : Int32" parses "property alias : Int32" - parses "Foo?" parses "Foo?" - parses "def foo(@@var); end" parses "def foo(@@var); end" - says syntax error on "def foo; A = 1; end" says syntax error on "def foo; A = 1; end" - says syntax error on "foo { |(module)| }" says syntax error on "foo { |(module)| }" - parses "1 - 2" parses "1 - 2" - parses "foo x do\n//\nend" parses "foo x do\n//\nend" - parses "def self.>(); end;" parses "def self.>(); end;" - says syntax error on "def foo(foo yield); end" says syntax error on "def foo(foo yield); end" - parses "Foo({String, ->})" parses "Foo({String, ->})" - parses "foo.!~(1, 2)" parses "foo.!~(1, 2)" - parses "typeof(\n 1\n)" parses "typeof(\n 1\n)" - parses "def foo(@lib); end" parses "def foo(@lib); end" - says syntax error on "b! = 1" says syntax error on "b! = 1" - parses "begin; 1; rescue; 2; end" parses "begin; 1; rescue; 2; end" - says syntax error on "next >> 1" says syntax error on "next >> 1" - parses "a = 1; a -=\n1" parses "a = 1; a -=\n1" - parses "a.b %=\n1" parses "a.b %=\n1" - parses "n !~ 2" parses "n !~ 2" - parses "{% begin %}%w( %s ){% end %}" parses "{% begin %}%w( %s ){% end %}" - parses "\"foo\#{bar}baz\"" parses "\"foo\#{bar}baz\"" - says syntax error on "def foo\nextend\nend" says syntax error on "def foo\nextend\nend" - parses "def foo(x @class); end" parses "def foo(x @class); end" - parses "->() : Int32 do end" parses "->() : Int32 do end" - parses "macro %;end" parses "macro %;end" - parses "`foo\#{1}bar`" parses "`foo\#{1}bar`" - parses "lib LibC; fun foo : Int*; end" parses "lib LibC; fun foo : Int*; end" - says syntax error on "1 ... return" says syntax error on "1 ... return" - parses "->foo" parses "->foo" - parses "def <(); end" parses "def <(); end" - parses "call ->foo" parses "call ->foo" + parses "@@a = uninitialized Foo" parses "@@a = uninitialized Foo" + parses "def foo(@@unless); end" parses "def foo(@@unless); end" + parses "false" parses "false" + parses "1 && 2" parses "1 && 2" + parses "lib LibC\nfun getch = GetChar\nend" parses "lib LibC\nfun getch = GetChar\nend" + parses "macro foo;bar{% for x in y %}body{% end %}baz;end" parses "macro foo;bar{% for x in y %}body{% end %}baz;end" + says syntax error on "def foo(x: Int32); end" says syntax error on "def foo(x: Int32); end" + parses "def foo(&block :\n Int ->); end" parses "def foo(&block :\n Int ->); end" + parses "a = 1; a ensure a" parses "a = 1; a ensure a" + parses "->foo(Int32, Float64)" parses "->foo(Int32, Float64)" + says syntax error on "A = B = 1" says syntax error on "A = B = 1" + parses "abstract def foo(x) : Int32" parses "abstract def foo(x) : Int32" + parses "next 1, *2" parses "next 1, *2" + parses "a = 1; a rescue a" parses "a = 1; a rescue a" + parses "foo.&(1, 2)" parses "foo.&(1, 2)" + parses "def foo(x @@typeof); end" parses "def foo(x @@typeof); end" + says syntax error on "foo x: 1, x: 1" says syntax error on "foo x: 1, x: 1" + parses "{% begin %}%q{ %s }{% end %}" parses "{% begin %}%q{ %s }{% end %}" + says syntax error on "def self.nil?; end" says syntax error on "def self.nil?; end" + says syntax error on "{% unless 1; 2; elsif 3; 4; end %}" says syntax error on "{% unless 1; 2; elsif 3; 4; end %}" + parses "(1 .. )" parses "(1 .. )" + parses "class : Int32" parses "class : Int32" + parses "def foo(alias foo); end" parses "def foo(alias foo); end" + parses "foo &.as(T)" parses "foo &.as(T)" + parses "foo out @x; @x" parses "foo out @x; @x" says syntax error on "x, self = 1, 2" says syntax error on "x, self = 1, 2" - parses "x : Foo(A, *B, C)" parses "x : Foo(A, *B, C)" - parses "->@@foo.foo=" parses "->@@foo.foo=" - parses "begin; / /; end" parses "begin; / /; end" - says syntax error on "break | 1" says syntax error on "break | 1" - parses "macro foo\n{%\nif 1\n2\nelse\n3\nend\n%}end" parses "macro foo\n{%\nif 1\n2\nelse\n3\nend\n%}end" - says syntax error on "{1 => 2 3 => 4}" says syntax error on "{1 => 2 3 => 4}" - parses "{foo:a, bar:b}" parses "{foo:a, bar:b}" - parses "foo.==(1, 2) { 3 }" parses "foo.==(1, 2) { 3 }" - parses "def /(); end;" parses "def /(); end;" - parses "1 ? a : b" parses "1 ? a : b" - parses ":\"\\\\foo\"" parses ":\"\\\\foo\"" - says syntax error on "def Foo(Int32).bar;end" says syntax error on "def Foo(Int32).bar;end" - parses "foo.>= 1, 2" parses "foo.>= 1, 2" - parses "1.=~(2)" parses "1.=~(2)" - parses "foo(x) do\n//\nend" parses "foo(x) do\n//\nend" - says syntax error on "case 1 == 1; when 2 a; end" says syntax error on "case 1 == 1; when 2 a; end" - parses "macro foo;bar{% if x %}body{% elsif y %}body2{%end%}baz;end" parses "macro foo;bar{% if x %}body{% elsif y %}body2{%end%}baz;end" - says syntax error on "foo { |(return)| }" says syntax error on "foo { |(return)| }" - parses "unless : Int32" parses "unless : Int32" - parses "<<-FOO\n \t1\n \tFOO" parses "<<-FOO\n \t1\n \tFOO" - says syntax error on "next + 1" says syntax error on "next + 1" - says syntax error on "case break; when 1; end; end" says syntax error on "case break; when 1; end; end" - parses "def foo(x @@yield); end" parses "def foo(x @@yield); end" - parses "foo(a: n ** 2)" parses "foo(a: n ** 2)" - parses "Int[8]" parses "Int[8]" - parses "a.b *=\n1" parses "a.b *=\n1" - parses "puts {{\n1\n}}" parses "puts {{\n1\n}}" - says syntax error on "Foo(T, U V)" says syntax error on "Foo(T, U V)" - parses "\"hello \" \\\r\n \"world\"" parses "\"hello \" \\\r\n \"world\"" - parses "foo(n !~ 2)" parses "foo(n !~ 2)" - says syntax error on "return.as(Int32)" says syntax error on "return.as(Int32)" - parses "a.b //=\n1" parses "a.b //=\n1" - parses "property lib : Int32" parses "property lib : Int32" - parses "def foo(var : Int -> Double); end" parses "def foo(var : Int -> Double); end" - parses "def foo(extend foo); end" parses "def foo(extend foo); end" - parses "{% begin %}%i[ %s ]{% end %}" parses "{% begin %}%i[ %s ]{% end %}" - parses "foo(0, n !~ 2)" parses "foo(0, n !~ 2)" - parses "def foo; a = 1; with a yield a; end" parses "def foo; a = 1; with a yield a; end" + parses "foo(bar { })" parses "foo(bar { })" + parses "a; if / /\n/ /\nelsif / /\n/ /\nend" parses "a; if / /\n/ /\nelsif / /\n/ /\nend" + parses "/ /; / /" parses "/ /; / /" + says syntax error on "break > 1" says syntax error on "break > 1" + parses "Foo?" parses "Foo?" + parses "foo % i()" parses "foo % i()" + parses "return 1, 2" parses "return 1, 2" + parses "while : Int32" parses "while : Int32" parses "foo.bar do end" parses "foo.bar do end" - parses "foo(&.as?(T).bar)" parses "foo(&.as?(T).bar)" - parses "{% x if 1 %}" parses "{% x if 1 %}" - parses "/ /" parses "/ /" - parses "def self.+(); end;" parses "def self.+(); end;" - parses "foo(a: n >= 2)" parses "foo(a: n >= 2)" - says syntax error on "foo { |protected| }" says syntax error on "foo { |protected| }" - parses "1 !~ 2" parses "1 !~ 2" - says syntax error on "1 ? : 2 : 3" says syntax error on "1 ? : 2 : 3" - parses "macro *;end" parses "macro *;end" - parses "foo.>=" parses "foo.>=" - parses "foo(\n1)" parses "foo(\n1)" - parses "macro foo;bar{% unless x %}body{% end %}baz;end" parses "macro foo;bar{% unless x %}body{% end %}baz;end" - parses "lib LibC\nfun getchar : Int\nend" parses "lib LibC\nfun getchar : Int\nend" - parses ":|" parses ":|" - says syntax error on "foo { |(with)| }" says syntax error on "foo { |(with)| }" - parses "sizeof(X)" parses "sizeof(X)" - parses "def /; end;" parses "def /; end;" - parses "foo(Bar { 1 })" parses "foo(Bar { 1 })" - parses "->@foo.foo" parses "->@foo.foo" - parses "{% a = 1 %}" parses "{% a = 1 %}" - says syntax error on "break &- 1" says syntax error on "break &- 1" - parses "__FILE__" parses "__FILE__" - parses "macro &*;end" parses "macro &*;end" - parses "!a && b" parses "!a && b" - says syntax error on "{1, ->{ |_| x } }" says syntax error on "{1, ->{ |_| x } }" - sets correct location of protected macro in enum sets correct location of protected macro in enum - parses "macro ^;end" parses "macro ^;end" - parses "1.nil?(\n)" parses "1.nil?(\n)" - parses "lib LibC; type A = B**; end" parses "lib LibC; type A = B**; end" - parses "a = 1; a ^= 1" parses "a = 1; a ^= 1" - parses "foo = 1; ->foo.>(Int32)" parses "foo = 1; ->foo.>(Int32)" - parses "lib LibC; fun getchar(a : Int, b : Float) : Int; end" parses "lib LibC; fun getchar(a : Int, b : Float) : Int; end" - parses "asm(\"nop\" : : )" parses "asm(\"nop\" : : )" - parses "def !~; end;" parses "def !~; end;" - parses "foo(a: n &+ 2)" parses "foo(a: n &+ 2)" - parses "<<-FOO\n\t 1\n\t FOO" parses "<<-FOO\n\t 1\n\t FOO" - parses "def &+(); end" parses "def &+(); end" - parses "lib LibC; struct Foo; x : Int**; end end" parses "lib LibC; struct Foo; x : Int**; end end" - parses "a = 1; a &*=\n1" parses "a = 1; a &*=\n1" - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\" : \"volatile\", \"alignstack\", \"intel\")" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\" : \"volatile\", \"alignstack\", \"intel\")" - parses "foo(a: n % 2)" parses "foo(a: n % 2)" - says syntax error on "break < 1" says syntax error on "break < 1" - says syntax error on "return === 1" says syntax error on "return === 1" - parses "def foo(x = __LINE__); end" parses "def foo(x = __LINE__); end" - parses "foo.!~" parses "foo.!~" - says syntax error on "def foo(foo asm); end" says syntax error on "def foo(foo asm); end" - sets correct location of tuple type sets correct location of tuple type - parses "def foo(var : Int | Double); end" parses "def foo(var : Int | Double); end" - parses "def self.&(); end;" parses "def self.&(); end;" - parses "def foo(a, b = a); end" parses "def foo(a, b = a); end" - parses "def foo(@var = 1); 1; end" parses "def foo(@var = 1); 1; end" - parses "{% begin %}%r{\\A}{% end %}" parses "{% begin %}%r{\\A}{% end %}" - parses "case {1}\nin {false}; 2; end" parses "case {1}\nin {false}; 2; end" - parses "a = 1; a ^=\n1" parses "a = 1; a ^=\n1" - parses "Foo(_)" parses "Foo(_)" - parses "def foo(class foo); end" parses "def foo(class foo); end" - parses "{% begin %}{% if true %}if true{% end %}\n{% if true %}end{% end %}{% end %}" parses "{% begin %}{% if true %}if true{% end %}\n{% if true %}end{% end %}{% end %}" - parses "def foo(x @@protected); end" parses "def foo(x @@protected); end" - parses "@[Foo(1)]" parses "@[Foo(1)]" - parses "module Foo; end" parses "module Foo; end" - parses "\"\"" parses "\"\"" - parses "nil?( )" parses "nil?( )" - parses "def foo(x @@typeof); end" parses "def foo(x @@typeof); end" - parses "foo.>= do end" parses "foo.>= do end" - parses "def self.>; end;" parses "def self.>; end;" - says syntax error on "<<-HERE\n One\n \#{1}\n Zero\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n Zero\n HERE" - parses "foo.<=(1, 2)" parses "foo.<=(1, 2)" - parses "select\nwhen foo\n2\nend" parses "select\nwhen foo\n2\nend" - parses "def foo(@@case); end" parses "def foo(@@case); end" - says syntax error on "foo { |(extend)| }" says syntax error on "foo { |(extend)| }" - parses "1 if /x/" parses "1 if /x/" - parses "a = 1; a -= 1" parses "a = 1; a -= 1" - parses "def foo(var : Int**); end" parses "def foo(var : Int**); end" - says syntax error on "break << 1" says syntax error on "break << 1" - says syntax error on "def foo(macro); end" says syntax error on "def foo(macro); end" - parses "1 ** -x" parses "1 ** -x" - parses "foo a: 1, &block" parses "foo a: 1, &block" - parses "def [](x); end" parses "def [](x); end" - parses "def foo(x @asm); end" parses "def foo(x @asm); end" - parses "def foo(@asm); end" parses "def foo(@asm); end" - parses "foo(n << 2)" parses "foo(n << 2)" - says syntax error on "break[]" says syntax error on "break[]" - parses "a, b, *c = 1" parses "a, b, *c = 1" - parses "def []?; end" parses "def []?; end" - says syntax error on "class Foo(T U)" says syntax error on "class Foo(T U)" - parses "def foo(a, & : Int -> Double); end" parses "def foo(a, & : Int -> Double); end" - parses "foo = 1; ->foo.foo=" parses "foo = 1; ->foo.foo=" - says syntax error on "return % 1" says syntax error on "return % 1" - parses "def foo(@@select); end" parses "def foo(@@select); end" - says syntax error on "<<-HERE\n One\n wrong\n Zero\n HERE" says syntax error on "<<-HERE\n One\n wrong\n Zero\n HERE" - parses "lib LibC; struct Foo; x : Int*; end end" parses "lib LibC; struct Foo; x : Int*; end end" - parses "1 !~ 2" parses "1 !~ 2" - parses "lib LibC; struct Foo; end end" parses "lib LibC; struct Foo; end end" - parses "1 rescue 2" parses "1 rescue 2" - says syntax error on "def foo(self); end" says syntax error on "def foo(self); end" - parses "macro foo=;end" parses "macro foo=;end" - says syntax error on "def foo=(a = 1, b = 2); end" says syntax error on "def foo=(a = 1, b = 2); end" - parses "foo(\n1\n)" parses "foo(\n1\n)" - parses "foo = 1; ->foo.&-(Int32)" parses "foo = 1; ->foo.&-(Int32)" - parses "-1" parses "-1" - parses "Foo::Bar?" parses "Foo::Bar?" - parses "%r(/)" parses "%r(/)" - says syntax error on "def foo(x : U) forall; end" says syntax error on "def foo(x : U) forall; end" - parses "/ hi /" parses "/ hi /" - says syntax error on "{\n\"foo\"\n\"bar\"\n}" says syntax error on "{\n\"foo\"\n\"bar\"\n}" - parses "a = 1; a += 1" parses "a = 1; a += 1" - parses "macro foo(**args)\n1\nend" parses "macro foo(**args)\n1\nend" - says syntax error on "a, b, c, d, *e = 1, 2, 3" says syntax error on "a, b, c, d, *e = 1, 2, 3" - says syntax error on "unless next; end" says syntax error on "unless next; end" - parses "case {1}\nin {Foo(Int32)}; 2; end" parses "case {1}\nin {Foo(Int32)}; 2; end" - parses "a.b ^=\n1" parses "a.b ^=\n1" - parses "case 1\nwhen .is_a?(T)\n2\nend" parses "case 1\nwhen .is_a?(T)\n2\nend" - parses "*a = 1" parses "*a = 1" - parses "1 -2.0" parses "1 -2.0" - parses "foo = 1; ->foo.>>(Int32)" parses "foo = 1; ->foo.>>(Int32)" - parses "foo = 1; ->foo.foo?" parses "foo = 1; ->foo.foo?" - parses "foo(0, n % 2)" parses "foo(0, n % 2)" - says syntax error on "Foo(T U)" says syntax error on "Foo(T U)" - parses "/foo/imximx" parses "/foo/imximx" - parses "1.responds_to?(\n :foo\n)" parses "1.responds_to?(\n :foo\n)" - says syntax error on "break === 1" says syntax error on "break === 1" - parses "foo(a: n &** 2)" parses "foo(a: n &** 2)" - parses "macro foo(x)\n 1 + 2; end" parses "macro foo(x)\n 1 + 2; end" - says syntax error on "foo { |x, x| }" says syntax error on "foo { |x, x| }" - parses "next" parses "next" - says syntax error on "break ^ 1" says syntax error on "break ^ 1" - says syntax error on "foo { |out| }" says syntax error on "foo { |out| }" - says syntax error on "yield break" says syntax error on "yield break" - says syntax error on "class Foo(T, U V)" says syntax error on "class Foo(T, U V)" - parses "foo x, *bar" parses "foo x, *bar" - says syntax error on "return .. 1" says syntax error on "return .. 1" - parses "foo(0, n >= 2)" parses "foo(0, n >= 2)" - parses "f ->{ a do\n end\n }" parses "f ->{ a do\n end\n }" - parses "1 +2" parses "1 +2" - parses "foo.=~ 1, 2" parses "foo.=~ 1, 2" - parses "foo(a: n == 2)" parses "foo(a: n == 2)" - parses "property offsetof : Int32" parses "property offsetof : Int32" - parses "lib LibC\nfun getchar(...)\nend" parses "lib LibC\nfun getchar(...)\nend" - parses "{% begin %}%[ %s ]{% end %}" parses "{% begin %}%[ %s ]{% end %}" + parses "n * 2" parses "n * 2" + parses "foo(0, n &** 2)" parses "foo(0, n &** 2)" + parses "/foo/i" parses "/foo/i" parses "macro foo;{% verbatim do %}1{% foo %}2{% end %};end" parses "macro foo;{% verbatim do %}1{% foo %}2{% end %};end" - parses "foo(n < 2)" parses "foo(n < 2)" - parses "case :foo; when :bar; 2; end" parses "case :foo; when :bar; 2; end" - parses "foo(z: 0, a: n > 2)" parses "foo(z: 0, a: n > 2)" - parses ":!" parses ":!" - parses "foo\n .bar" parses "foo\n .bar" - parses "->() : Int32 { }" parses "->() : Int32 { }" + parses ":*" parses ":*" + parses "/foo/" parses "/foo/" + parses "property enum : Int32" parses "property enum : Int32" parses "foo(z: 0, a: n & 2)" parses "foo(z: 0, a: n & 2)" - parses "<<-HERE1; <<-HERE2\nhere1\nHERE1\nHERE2" parses "<<-HERE1; <<-HERE2\nhere1\nHERE1\nHERE2" - parses "def foo(@@false); end" parses "def foo(@@false); end" - says syntax error on "def foo(x x); 1; end" says syntax error on "def foo(x x); 1; end" - parses "def //(); end" parses "def //(); end" - parses "n * 2" parses "n * 2" - parses "foo(z: 0, a: n * 2)" parses "foo(z: 0, a: n * 2)" - parses "def foo(x, *args, y = 2, w, z = 3); 1; end" parses "def foo(x, *args, y = 2, w, z = 3); 1; end" - says syntax error on "def foo=(a,b); end" says syntax error on "def foo=(a,b); end" - says syntax error on "class Foo(T, T); end" says syntax error on "class Foo(T, T); end" - parses "{/ / => / /, / / => / /}" parses "{/ / => / /, / / => / /}" - says syntax error on "*a if true = 2" says syntax error on "*a if true = 2" - parses "instance_sizeof : Int32" parses "instance_sizeof : Int32" - says syntax error on "return ? 1 : 2" says syntax error on "return ? 1 : 2" - parses "1 << 2" parses "1 << 2" - parses "def foo(x)\n x\nend; foo = 1; b = 2; foo +b" parses "def foo(x)\n x\nend; foo = 1; b = 2; foo +b" - parses "@@a : Foo" parses "@@a : Foo" + says syntax error on "foo &.||()" says syntax error on "foo &.||()" + parses "foo.-(1, 2) { 3 }" parses "foo.-(1, 2) { 3 }" + says syntax error on "def foo @var, █ end" says syntax error on "def foo @var, █ end" parses "{% begin %}%q[ %s ]{% end %}" parses "{% begin %}%q[ %s ]{% end %}" - parses "foo.** 1, 2" parses "foo.** 1, 2" - parses "foo(z: 0, a: n < 2)" parses "foo(z: 0, a: n < 2)" - parses ":<=>" parses ":<=>" - parses "foo\n\n .bar" parses "foo\n\n .bar" - says syntax error on "break == 1" says syntax error on "break == 1" - parses "abstract : Int32" parses "abstract : Int32" - parses "1 \\\r\n + 2" parses "1 \\\r\n + 2" - parses "lib LibC; struct Foo; include Bar; end; end" parses "lib LibC; struct Foo; include Bar; end; end" - parses "foo = 1; ->foo.^(Int32)" parses "foo = 1; ->foo.^(Int32)" - parses "macro foo;%var unless true;end" parses "macro foo;%var unless true;end" - parses "foo(&block)" parses "foo(&block)" - parses "macro foo(a, @[Foo] &block);end" parses "macro foo(a, @[Foo] &block);end" - parses "\n class Foo\n def bar\n print as Foo\n end\n end\n " parses "\n class Foo\n def bar\n print as Foo\n end\n end\n " - parses "1 * -2" parses "1 * -2" - parses "1 == 2" parses "1 == 2" - parses "->Foo.=~(Int32)" parses "->Foo.=~(Int32)" - parses ":\"\\\"foo\\\"\"" parses ":\"\\\"foo\\\"\"" - says syntax error on "foo { |(include)| }" says syntax error on "foo { |(include)| }" - parses "a = 1; a *=\n1" parses "a = 1; a *=\n1" - parses "begin; 1; rescue ex; 2; end; ex" parses "begin; 1; rescue ex; 2; end; ex" - parses "{% unless 1\n x\nend %}" parses "{% unless 1\n x\nend %}" - parses "sizeof : Int32" parses "sizeof : Int32" - says syntax error on "case 1\nin Int32; 2; else" says syntax error on "case 1\nin Int32; 2; else" - parses "a = 1; a += 10 if a += 20" parses "a = 1; a += 10 if a += 20" - parses "{% x unless 1 %}" parses "{% x unless 1 %}" - parses "def foo; a = 1; a; end" parses "def foo; a = 1; a; end" - says syntax error on "foo(return)" says syntax error on "foo(return)" - parses "Foo()?" parses "Foo()?" - parses "foo.>(1, 2) { 3 }" parses "foo.>(1, 2) { 3 }" - parses "def foo(a, @[Foo] &block); end" parses "def foo(a, @[Foo] &block); end" - says syntax error on "foo { |(struct)| }" says syntax error on "foo { |(struct)| }" - parses "def foo\n1\nend" parses "def foo\n1\nend" - parses "{% begin %}%< %s >{% end %}" parses "{% begin %}%< %s >{% end %}" - parses "def foo(n); foo(n -1); end" parses "def foo(n); foo(n -1); end" - parses "<<-HERE\nHERE" parses "<<-HERE\nHERE" - says syntax error on "macro foo x\n 1 + 2; end" says syntax error on "macro foo x\n 1 + 2; end" - parses "->Foo.%(Int32)" parses "->Foo.%(Int32)" - parses "case : Int32" parses "case : Int32" - parses "foo = 1; foo &x" parses "foo = 1; foo &x" - parses ":&" parses ":&" - parses "->Foo.!~(Int32)" parses "->Foo.!~(Int32)" - parses "return 1" parses "return 1" - parses "return *{1, 2}" parses "return *{1, 2}" - says syntax error on "def foo(extend); end" says syntax error on "def foo(extend); end" - says syntax error on "def foo(x, *); 1; end" says syntax error on "def foo(x, *); 1; end" - says syntax error on "->::@foo.foo" says syntax error on "->::@foo.foo" - parses "extend self" parses "extend self" - parses "enum Foo; private def foo; 1; end; end" parses "enum Foo; private def foo; 1; end; end" - parses "def foo(@[Foo] var : Int32); end" parses "def foo(@[Foo] var : Int32); end" - parses ":\u304B\u305F\u306A" parses ":\u304B\u305F\u306A" - says syntax error on "module Foo; require \"bar\"; end" says syntax error on "module Foo; require \"bar\"; end" - parses "n - 2" parses "n - 2" - says syntax error on "break.as(Int32)" says syntax error on "break.as(Int32)" - parses "def self.+; end;" parses "def self.+; end;" - says syntax error on "def foo(instance_sizeof); end" says syntax error on "def foo(instance_sizeof); end" - parses "return 1, *2" parses "return 1, *2" - says syntax error on "class Foo(); end" says syntax error on "class Foo(); end" - parses "foo.| 1, 2" parses "foo.| 1, 2" - says syntax error on "def foo(x @x); 1; end" says syntax error on "def foo(x @x); 1; end" - parses "foo(0, n &+ 2)" parses "foo(0, n &+ 2)" - parses "enum Foo; @@foo = 1\n A \n end" parses "enum Foo; @@foo = 1\n A \n end" - parses "property begin : Int32" parses "property begin : Int32" - parses "foo(z: 0, a: n + 2)" parses "foo(z: 0, a: n + 2)" - says syntax error on "macro foo(x : Int32); end" says syntax error on "macro foo(x : Int32); end" - parses ":foo?" parses ":foo?" - parses "foo.bar= *baz" parses "foo.bar= *baz" - parses "1+2*3" parses "1+2*3" - parses "Set {1, 2, 3}" parses "Set {1, 2, 3}" - parses "def foo(x, *y); 1; end" parses "def foo(x, *y); 1; end" - parses "1\n+2" parses "1\n+2" - parses "{1 =>\n2, 3 =>\n4}" parses "{1 =>\n2, 3 =>\n4}" - parses "foo(a: n - 2)" parses "foo(a: n - 2)" - parses "foo.^(1, 2) { 3 }" parses "foo.^(1, 2) { 3 }" - parses "call foo : A, end : B" parses "call foo : A, end : B" - parses "foo(1)" parses "foo(1)" - parses "def foo(x @@true); end" parses "def foo(x @@true); end" - says syntax error on "foo { |(begin)| }" says syntax error on "foo { |(begin)| }" - parses "f.x &*= 2" parses "f.x &*= 2" - parses "(bar do\nend)" parses "(bar do\nend)" - says syntax error on "foo { |sizeof| }" says syntax error on "foo { |sizeof| }" - parses "a = 1; (a)/b" parses "a = 1; (a)/b" - says syntax error on "break * 1" says syntax error on "break * 1" - parses "macro ==;end" parses "macro ==;end" - says syntax error on "def foo(foo alias); end" says syntax error on "def foo(foo alias); end" - parses "return *1, 2" parses "return *1, 2" - parses "foo = 1; ->foo.+(Int32)" parses "foo = 1; ->foo.+(Int32)" - parses "def /(); end;" parses "def /(); end;" - says syntax error on "foo {1, 2}" says syntax error on "foo {1, 2}" - parses "enum Foo; A = 1\ndef foo; 1; end; end" parses "enum Foo; A = 1\ndef foo; 1; end; end" - parses "a; if / /\n/ /\nelsif / /\n/ /\nend" parses "a; if / /\n/ /\nelsif / /\n/ /\nend" - says syntax error on "def foo(foo with); end" says syntax error on "def foo(foo with); end" - parses "foo%i" parses "foo%i" + parses "def foo(@@offsetof); end" parses "def foo(@@offsetof); end" + parses "1.as?(Bar)" parses "1.as?(Bar)" parses "foo(\n &.block\n)" parses "foo(\n &.block\n)" - parses "class Foo(T, *U); end" parses "class Foo(T, *U); end" - parses "foo.^ do end" parses "foo.^ do end" - parses "call @foo.bar" parses "call @foo.bar" - parses "foo(n / 2)" parses "foo(n / 2)" - parses "\"foo\#{\"bar\"}baz\"" parses "\"foo\#{\"bar\"}baz\"" - parses "offsetof : Int32" parses "offsetof : Int32" - parses "1 ensure 2 if 3" parses "1 ensure 2 if 3" - parses "foo(/ /)" parses "foo(/ /)" - says syntax error on "def foo?=(x); end" says syntax error on "def foo?=(x); end" - parses "1.[](2)" parses "1.[](2)" - parses "->::foo!" parses "->::foo!" - parses "def foo(@offsetof); end" parses "def foo(@offsetof); end" - says syntax error on "next | 1" says syntax error on "next | 1" - says syntax error on "foo { |(in)| }" says syntax error on "foo { |(in)| }" + parses "<<-HERE\n \#{1} \\n \#{2}\n HERE" parses "<<-HERE\n \#{1} \\n \#{2}\n HERE" + parses "else : Int32" parses "else : Int32" + parses "foo./" parses "foo./" + parses "{% begin %}%Q| %s |{% end %}" parses "{% begin %}%Q| %s |{% end %}" + says syntax error on "foo { |begin| }" says syntax error on "foo { |begin| }" + parses "def self.>; end;" parses "def self.>; end;" + parses "foo[*baz] = 1" parses "foo[*baz] = 1" + parses "1..;" parses "1..;" + parses "1.is_a?(\n Int32\n)" parses "1.is_a?(\n Int32\n)" + parses "->@@foo.foo!" parses "->@@foo.foo!" + parses "n <= 2" parses "n <= 2" + parses "2.3_f32" parses "2.3_f32" + parses "def self.[]?; end" parses "def self.[]?; end" + parses "def foo(out foo); end" parses "def foo(out foo); end" + parses "def foo(x @with); end" parses "def foo(x @with); end" + parses "def foo(var : self); end" parses "def foo(var : self); end" + parses "def foo(x = __DIR__); end" parses "def foo(x = __DIR__); end" + parses "property require : Int32" parses "property require : Int32" + parses "a = 1; a &=\n1" parses "a = 1; a &=\n1" + says syntax error on "A = foo(B = 1)" says syntax error on "A = foo(B = 1)" + parses "foo%w" parses "foo%w" + parses "macro <=;end" parses "macro <=;end" says syntax error on "1 == 2, a = 4" says syntax error on "1 == 2, a = 4" - parses "{[] of Foo, Bar::Baz + 2}" parses "{[] of Foo, Bar::Baz + 2}" - says syntax error on "def foo &block : Int -> Double ; end" says syntax error on "def foo &block : Int -> Double ; end" + parses "macro <=>;end" parses "macro <=>;end" + parses "def foo(x @@require); end" parses "def foo(x @@require); end" + says syntax error on "def !; end" says syntax error on "def !; end" + parses "begin; 1; ensure; 2; end" parses "begin; 1; ensure; 2; end" + parses "foo.=~(1, 2) { 3 }" parses "foo.=~(1, 2) { 3 }" + parses "{% begin %}%x[ %s ]{% end %}" parses "{% begin %}%x[ %s ]{% end %}" + parses "def foo(x @@break); end" parses "def foo(x @@break); end" + parses "begin; 1; rescue ::Foo; 2; end" parses "begin; 1; rescue ::Foo; 2; end" + parses "f.x //= 2" parses "f.x //= 2" + parses "return *1" parses "return *1" + parses "foo.+ do end" parses "foo.+ do end" + parses "def foo(module foo); end" parses "def foo(module foo); end" + parses "foo %x" parses "foo %x" + parses "def foo; yield(1); end" parses "def foo; yield(1); end" + parses "n & 2" parses "n & 2" + parses "macro foo;bar{% if x %}body{% elsif y %}body2{% else %}body3{%end%}baz;end" parses "macro foo;bar{% if x %}body{% elsif y %}body2{% else %}body3{%end%}baz;end" + parses "def foo(break foo); end" parses "def foo(break foo); end" + parses "def foo(x @break); end" parses "def foo(x @break); end" + says syntax error on "Foo{one: :two, three: :four}" says syntax error on "Foo{one: :two, three: :four}" + says syntax error on "macro def foo : String; 1; end" says syntax error on "macro def foo : String; 1; end" + parses "a = 1; a //= 1" parses "a = 1; a //= 1" + parses "{[] of Foo, ::Bar::Baz.new}" parses "{[] of Foo, ::Bar::Baz.new}" + parses "def foo ; 1 ; end" parses "def foo ; 1 ; end" + says syntax error on "foo { |typeof| }" says syntax error on "foo { |typeof| }" parses "def foo(x @@struct); end" parses "def foo(x @@struct); end" - parses "macro foo; 1 + 2 {{ foo }} 3 + 4; end" parses "macro foo; 1 + 2 {{ foo }} 3 + 4; end" - parses "def |(); end;" parses "def |(); end;" - says syntax error on "<<-FOO\n1\nFOO.bar" says syntax error on "<<-FOO\n1\nFOO.bar" - parses "def []=(other, file = 1); end" parses "def []=(other, file = 1); end" - parses "property module : Int32" parses "property module : Int32" - says syntax error on "<<-HERE\n One\n \#{1}\n wrong\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n wrong\n HERE" - says syntax error on "Foo(x: T y: U)" says syntax error on "Foo(x: T y: U)" - parses "property pointerof : Int32" parses "property pointerof : Int32" - parses "<<-HERE\r\n One\r\n Zero\r\n HERE" parses "<<-HERE\r\n One\r\n Zero\r\n HERE" - says syntax error on "foo &.&&()" says syntax error on "foo &.&&()" - parses "1.as(Bar)" parses "1.as(Bar)" - parses "1.0" parses "1.0" - parses "f.x /= 2" parses "f.x /= 2" - says syntax error on "def foo(foo unless); end" says syntax error on "def foo(foo unless); end" - parses "false : Int32" parses "false : Int32" - parses "return 1 if true" parses "return 1 if true" - says syntax error on "macro foo&&;end" says syntax error on "macro foo&&;end" - says syntax error on "1 then" says syntax error on "1 then" - says syntax error on "1 .. return" says syntax error on "1 .. return" - parses "Foo{\"x\" => \"y\"}" parses "Foo{\"x\" => \"y\"}" - says syntax error on "foo { |(if)| }" says syntax error on "foo { |(if)| }" - parses "def self.!~(); end;" parses "def self.!~(); end;" - parses "instance_alignof(X)" parses "instance_alignof(X)" - parses "Foo.foo(count: 3).bar { }" parses "Foo.foo(count: 3).bar { }" - says syntax error on "{a: 1 b: 2}" says syntax error on "{a: 1 b: 2}" - parses "Foo(\nT\n)" parses "Foo(\nT\n)" - says syntax error on "foo { |(pointerof)| }" says syntax error on "foo { |(pointerof)| }" - says syntax error on "macro Foo;end" says syntax error on "macro Foo;end" - parses "abstract def foo : Int32" parses "abstract def foo : Int32" - parses "unless foo; 1; end" parses "unless foo; 1; end" - parses "a = 1; a //=\n1" parses "a = 1; a //=\n1" - parses "foo(a: n > 2)" parses "foo(a: n > 2)" - parses "lib LibC\nfun SomeFun\nend" parses "lib LibC\nfun SomeFun\nend" - parses "foo(z: 0, a: n ** 2)" parses "foo(z: 0, a: n ** 2)" - says syntax error on "return false foo" says syntax error on "return false foo" - parses "foo = 1; foo a: 1" parses "foo = 1; foo a: 1" - parses "1 | 2" parses "1 | 2" - parses ":[]=" parses ":[]=" - parses "def foo(x : U) forall T, U; end" parses "def foo(x : U) forall T, U; end" - parses ":>=" parses ":>=" - parses "foo.<=(1, 2) { 3 }" parses "foo.<=(1, 2) { 3 }" - says syntax error on "foo { |class| }" says syntax error on "foo { |class| }" - parses "foo(n >> 2)" parses "foo(n >> 2)" - parses "(baz; bar do\nend)" parses "(baz; bar do\nend)" - parses ":<" parses ":<" - parses "1 ... 2" parses "1 ... 2" - parses "x[1, ..2]" parses "x[1, ..2]" - parses "*a = 1, 2" parses "*a = 1, 2" - parses "property private : Int32" parses "property private : Int32" - parses "foo(&.is_a?(T))" parses "foo(&.is_a?(T))" - parses "def foo(@@abstract); end" parses "def foo(@@abstract); end" - says syntax error on "+return" says syntax error on "+return" - says syntax error on "{1, 2 3}" says syntax error on "{1, 2 3}" - says syntax error on "def foo var; end" says syntax error on "def foo var; end" - says syntax error on "while next; end" says syntax error on "while next; end" - parses "puts ::foo" parses "puts ::foo" - parses ":^" parses ":^" - parses "macro foo\n'\\\\'\nend" parses "macro foo\n'\\\\'\nend" - says syntax error on "def foo(sizeof); end" says syntax error on "def foo(sizeof); end" - parses "a : Foo[12]" parses "a : Foo[12]" - parses "def &**(); end" parses "def &**(); end" - parses "foo./(1, 2)" parses "foo./(1, 2)" - parses "def foo(x @@instance_sizeof); end" parses "def foo(x @@instance_sizeof); end" - parses "case \nwhen 1\n2\nend" parses "case \nwhen 1\n2\nend" - parses "lib LibC; {% if 1 %}2{% end %}; end" parses "lib LibC; {% if 1 %}2{% end %}; end" - parses "n <= 2" parses "n <= 2" - parses "false" parses "false" - says syntax error on "next * 1" says syntax error on "next * 1" - says syntax error on "a {} = 1" says syntax error on "a {} = 1" - says syntax error on "if break; end" says syntax error on "if break; end" - parses ":>>" parses ":>>" - says syntax error on "def foo(x y, x z); end" says syntax error on "def foo(x y, x z); end" - parses "foo(z: 0, a: n - 2)" parses "foo(z: 0, a: n - 2)" - says syntax error on "break[0]= 1" says syntax error on "break[0]= 1" - says syntax error on "def foo(foo struct); end" says syntax error on "def foo(foo struct); end" - parses "case 1; when x then 2; else; 3; end" parses "case 1; when x then 2; else; 3; end" - says syntax error on "return << 1" says syntax error on "return << 1" - parses "+ 1" parses "+ 1" - parses ":<<" parses ":<<" - parses "property extend : Int32" parses "property extend : Int32" - parses "def foo; end" parses "def foo; end" - parses "n / 2" parses "n / 2" - says syntax error on "def foo(private); end" says syntax error on "def foo(private); end" - says syntax error on "def foo=(*args); end" says syntax error on "def foo=(*args); end" - parses "foo(0, n / 2)" parses "foo(0, n / 2)" + parses "foo./ do end" parses "foo./ do end" + parses "def =~; end;" parses "def =~; end;" + parses "include : Int32" parses "include : Int32" + parses "foo = 1; ->foo.|(Int32)" parses "foo = 1; ->foo.|(Int32)" + says syntax error on "{1 => 2, 3 => 4 5 => 6}" says syntax error on "{1 => 2, 3 => 4 5 => 6}" + parses "lib LibC\nalias Foo = Bar\nend" parses "lib LibC\nalias Foo = Bar\nend" + parses "{\n1\n}" parses "{\n1\n}" + parses "yield if true" parses "yield if true" + parses "x[+ 1]" parses "x[+ 1]" parses "enum Foo; def foo; 1; end; end" parses "enum Foo; def foo; 1; end; end" - parses "1 / 2" parses "1 / 2" - parses "n &** 2" parses "n &** 2" - parses "def foo(x @break); end" parses "def foo(x @break); end" - parses "def foo(@instance_sizeof); end" parses "def foo(@instance_sizeof); end" - parses "macro foo\n <<-FOO\n %foo\n FOO\nend" parses "macro foo\n <<-FOO\n %foo\n FOO\nend" - says syntax error on "'a' foo" says syntax error on "'a' foo" - says syntax error on "return / 1" says syntax error on "return / 1" - parses "def self.*(); end;" parses "def self.*(); end;" - parses "Foo(X: U, Y: V)" parses "Foo(X: U, Y: V)" - says syntax error on "def foo(false); end" says syntax error on "def foo(false); end" - parses "return 1, 2" parses "return 1, 2" - says syntax error on "*a === 1" says syntax error on "*a === 1" - says syntax error on "until next; end" says syntax error on "until next; end" - parses "def foo(@class); end" parses "def foo(@class); end" - parses "[\n1, 2]" parses "[\n1, 2]" - says syntax error on "alias Foo?" says syntax error on "alias Foo?" - parses "@a : Foo" parses "@a : Foo" - says syntax error on "foo { |(case)| }" says syntax error on "foo { |(case)| }" - parses "a.foo, a.bar = 1, 2" parses "a.foo, a.bar = 1, 2" - parses "<<-HERE\n One \\n Two\n Zero\n HERE" parses "<<-HERE\n One \\n Two\n Zero\n HERE" - parses "def foo(@@alias); end" parses "def foo(@@alias); end" - parses "a = 1; a &= 1" parses "a = 1; a &= 1" - parses "asm(\"nop\" :: : :)" parses "asm(\"nop\" :: : :)" - parses "do : Int32" parses "do : Int32" - parses "__DIR__" parses "__DIR__" - parses "1.as? Bar" parses "1.as? Bar" - says syntax error on "def foo(x: Int32); end" says syntax error on "def foo(x: Int32); end" - parses "A.new(\"x\", B.new(\"y\"))" parses "A.new(\"x\", B.new(\"y\"))" - parses "foo(\na: 1,\n)" parses "foo(\na: 1,\n)" - parses "foo.[]=" parses "foo.[]=" - parses "case 1\nwhen 1\n2\nend" parses "case 1\nwhen 1\n2\nend" - parses "{% if 1; 2; end %}" parses "{% if 1; 2; end %}" - parses "1\\\r\n + 2" parses "1\\\r\n + 2" - parses "foo = 1; ->foo.[]=(Int32)" parses "foo = 1; ->foo.[]=(Int32)" - parses "begin; 1; rescue ::Foo; 2; end" parses "begin; 1; rescue ::Foo; 2; end" - says syntax error on "return &- 1" says syntax error on "return &- 1" - says syntax error on "foo { |(require)| }" says syntax error on "foo { |(require)| }" - parses "foo % q()" parses "foo % q()" - parses "{% begin %}%r[\\A]{% end %}" parses "{% begin %}%r[\\A]{% end %}" - parses "asm(\"bl trap\" :::: \"unwind\")" parses "asm(\"bl trap\" :::: \"unwind\")" - parses "{[] of Foo, ::foo}" parses "{[] of Foo, ::foo}" - parses "return {1, 2}" parses "return {1, 2}" - parses "{A: 1, B: 2}" parses "{A: 1, B: 2}" - parses "def ===(other, file = 1); end" parses "def ===(other, file = 1); end" - says syntax error on "foo { |pointerof| }" says syntax error on "foo { |pointerof| }" - parses "a, b = 1, 2 if 3" parses "a, b = 1, 2 if 3" + parses "foo **bar" parses "foo **bar" + parses "macro foo(**args)\n1\nend" parses "macro foo(**args)\n1\nend" + parses "foo a, / /" parses "foo a, / /" + parses "macro ==;end" parses "macro ==;end" + says syntax error on "break &- 1" says syntax error on "break &- 1" + parses "foo(0, n ** 2)" parses "foo(0, n ** 2)" + parses "def foo(@select); end" parses "def foo(@select); end" + parses "Foo()?" parses "Foo()?" + says syntax error on "def foo(instance_sizeof); end" says syntax error on "def foo(instance_sizeof); end" + parses "macro foo;var if true;end" parses "macro foo;var if true;end" + says syntax error on "foo { |(true)| }" says syntax error on "foo { |(true)| }" + parses "{{ foo.nil? }}" parses "{{ foo.nil? }}" + parses ":-" parses ":-" + parses "def ~(); end;" parses "def ~(); end;" + parses "def foo(x @var); end" parses "def foo(x @var); end" + parses "->Foo.<=(Int32)" parses "->Foo.<=(Int32)" + says syntax error on "while return; end" says syntax error on "while return; end" + says syntax error on "def foo @@var, █ end" says syntax error on "def foo @@var, █ end" + says syntax error on "{\"\": 1}" says syntax error on "{\"\": 1}" + parses "def foo(x, *y : Int32); 1; end" parses "def foo(x, *y : Int32); 1; end" + parses "offsetof : Int32" parses "offsetof : Int32" + parses "yield : Int32" parses "yield : Int32" parses "asm(\n\"nop\"\n:\n\"a\"(0)\n:\n\"b\"(1),\n\"c\"(2)\n)" parses "asm(\n\"nop\"\n:\n\"a\"(0)\n:\n\"b\"(1),\n\"c\"(2)\n)" - parses "next *1" parses "next *1" - parses "foo = 1; ->foo.&(Int32)" parses "foo = 1; ->foo.&(Int32)" - parses "%r(\\/)" parses "%r(\\/)" - says syntax error on "def foo(*x, **x); end" says syntax error on "def foo(*x, **x); end" - parses "foo(0, n == 2)" parses "foo(0, n == 2)" - parses ":<=" parses ":<=" - parses "def foo : Int32\n1\nend" parses "def foo : Int32\n1\nend" - parses "asm(\"nop\" : \"a\"(0))" parses "asm(\"nop\" : \"a\"(0))" - parses "def foo; x { |_| 1 }; end" parses "def foo; x { |_| 1 }; end" - parses "foo &.block = 0" parses "foo &.block = 0" - says syntax error on "next & 1" says syntax error on "next & 1" - parses "def Foo::Bar.foo\n1\nend" parses "def Foo::Bar.foo\n1\nend" - parses "[1,\n 2,]" parses "[1,\n 2,]" + parses "if foo; 1; else; 2; end" parses "if foo; 1; else; 2; end" + parses "foo(0, n - 2)" parses "foo(0, n - 2)" + parses "x = 1; foo.bar x do\nend" parses "x = 1; foo.bar x do\nend" + says syntax error on "def foo(x @@x); 1; end" says syntax error on "def foo(x @@x); 1; end" + parses ":<" parses ":<" + parses "def foo(&\n); end" parses "def foo(&\n); end" + parses "Foo({String, ->, ->})" parses "Foo({String, ->, ->})" + parses "a, b, *c = 1, 2" parses "a, b, *c = 1, 2" + says syntax error on "{a[0]: 1}" says syntax error on "{a[0]: 1}" + parses "begin; 1; rescue; 2; end" parses "begin; 1; rescue; 2; end" + parses "1.=~(2)" parses "1.=~(2)" + says syntax error on "def foo(foo break); end" says syntax error on "def foo(foo break); end" + says syntax error on "def foo\nfun\nend" says syntax error on "def foo\nfun\nend" + parses "2 / 3 + 4 / 5" parses "2 / 3 + 4 / 5" + parses "foo.=~ 1, 2" parses "foo.=~ 1, 2" + parses "enum Foo; @@foo = 1\n A \n end" parses "enum Foo; @@foo = 1\n A \n end" + parses "a = 1; a **=\n1" parses "a = 1; a **=\n1" + parses "def !=(other, file = 1); end" parses "def !=(other, file = 1); end" + says syntax error on "x : String, a = 4" says syntax error on "x : String, a = 4" + parses "Foo(*T)" parses "Foo(*T)" + says syntax error on "def foo(**x, &x); end" says syntax error on "def foo(**x, &x); end" + parses "->foo!" parses "->foo!" + parses "return if true" parses "return if true" + parses "lib LibC\nfun getchar : Int\nend" parses "lib LibC\nfun getchar : Int\nend" + says syntax error on "def foo(x @x); 1; end" says syntax error on "def foo(x @x); 1; end" + says syntax error on "\"foo\" \"bar\"" says syntax error on "\"foo\" \"bar\"" + parses "asm(\"nop\" :::: \"volatile\")" parses "asm(\"nop\" :::: \"volatile\")" + says syntax error on "return.as(Int32)" says syntax error on "return.as(Int32)" + parses "def <=(other, file = 1); end" parses "def <=(other, file = 1); end" + parses "Foo({x: X, typeof: Y})" parses "Foo({x: X, typeof: Y})" + parses "macro foo(@[Foo] *args);end" parses "macro foo(@[Foo] *args);end" + parses "foo(n === 2)" parses "foo(n === 2)" + says syntax error on "a = 1; a += next" says syntax error on "a = 1; a += next" + parses "foo()" parses "foo()" + parses "%r(foo(bar))" parses "%r(foo(bar))" + parses "yield 1 if true" parses "yield 1 if true" + parses "1 ? a : b" parses "1 ? a : b" + parses ":\"foo\"" parses ":\"foo\"" + parses "foo -1.0, -2.0" parses "foo -1.0, -2.0" + says syntax error on "macro foo(*x, *y); end" says syntax error on "macro foo(*x, *y); end" + parses "{{a = 1 if 2}}" parses "{{a = 1 if 2}}" + parses ":~" parses ":~" + parses "{%\nif 1; 2; end\n%}" parses "{%\nif 1; 2; end\n%}" + parses "foo &.block[0] = 1" parses "foo &.block[0] = 1" + parses "def foo(@class); end" parses "def foo(@class); end" + says syntax error on "a.b() += 1" says syntax error on "a.b() += 1" + parses "macro foo; bar class: 1; end" parses "macro foo; bar class: 1; end" + parses "1 &* 2" parses "1 &* 2" + says syntax error on "def foo(foo sizeof); end" says syntax error on "def foo(foo sizeof); end" + parses "foo = 1; ->foo.&+(Int32)" parses "foo = 1; ->foo.&+(Int32)" + parses "Foo(Bar())" parses "Foo(Bar())" + parses "foo.> 1, 2" parses "foo.> 1, 2" + parses "def self.&; end;" parses "def self.&; end;" + parses "foo %w" parses "foo %w" + says syntax error on "foo { |a b| }" says syntax error on "foo { |a b| }" + says syntax error on "return == 1" says syntax error on "return == 1" + parses "foo do\n//\nend" parses "foo do\n//\nend" + says syntax error on "def foo\nstruct\nend" says syntax error on "def foo\nstruct\nend" + parses "Int[8, 4]" parses "Int[8, 4]" + parses "Foo(_)" parses "Foo(_)" + parses "responds_to?(:foo)" parses "responds_to?(:foo)" + parses "foo[\n1\n]" parses "foo[\n1\n]" + says syntax error on "def foo(end); end" says syntax error on "def foo(end); end" + parses "def foo(@@protected); end" parses "def foo(@@protected); end" + parses "def foo(@abstract); end" parses "def foo(@abstract); end" + parses "Foo(T?)" parses "Foo(T?)" + parses "def !=; end;" parses "def !=; end;" + says syntax error on "def foo=(a = 1, b = 2); end" says syntax error on "def foo=(a = 1, b = 2); end" + parses "foo(1 + 2)" parses "foo(1 + 2)" + says syntax error on "def foo x y; end" says syntax error on "def foo x y; end" + parses "\"hello \#{1}\" \\\r\n \"\#{2} world\"" parses "\"hello \#{1}\" \\\r\n \"\#{2} world\"" parses "property do : Int32" parses "property do : Int32" - parses "class Foo < Bar; end" parses "class Foo < Bar; end" - parses "macro foo(x); 1 + 2; end" parses "macro foo(x); 1 + 2; end" - says syntax error on "foo { |offsetof| }" says syntax error on "foo { |offsetof| }" - parses "a, b = 1, 2" parses "a, b = 1, 2" - parses "def self.<(); end;" parses "def self.<(); end;" - parses "property protected : Int32" parses "property protected : Int32" - parses "a = 1; a &-=\n1" parses "a = 1; a &-=\n1" - says syntax error on "return.foo" says syntax error on "return.foo" - parses "case 1\nin Int32.class; 2; end" parses "case 1\nin Int32.class; 2; end" - parses "{} of Int => Double" parses "{} of Int => Double" - parses "lib LibC; enum Foo; A\nB; C\nD = 1; end end" parses "lib LibC; enum Foo; A\nB; C\nD = 1; end end" - parses "x.foo(a: 1, b: 2)" parses "x.foo(a: 1, b: 2)" - parses "def foo(a, &block : self -> self); end" parses "def foo(a, &block : self -> self); end" - parses "foo(a: n << 2)" parses "foo(a: n << 2)" - parses "macro &**;end" parses "macro &**;end" - says syntax error on "foo { |(a b)| }" says syntax error on "foo { |(a b)| }" - says syntax error on "while break; end" says syntax error on "while break; end" - parses "@@foo/2" parses "@@foo/2" - parses "->foo(Void*)" parses "->foo(Void*)" - parses "def self./; end;" parses "def self./; end;" - says syntax error on "yield next" says syntax error on "yield next" - parses "a = 1; a &-= 1" parses "a = 1; a &-= 1" - says syntax error on "def foo(foo end); end" says syntax error on "def foo(foo end); end" - parses "def foo(@begin); end" parses "def foo(@begin); end" - parses "def foo(x @return); end" parses "def foo(x @return); end" - parses "foo(*bar)" parses "foo(*bar)" - parses "def self.~(); end;" parses "def self.~(); end;" - parses "def %(); end" parses "def %(); end" - parses "/\\ /" parses "/\\ /" - parses "T/1" parses "T/1" - parses "@@foo = 1" parses "@@foo = 1" - parses "typeof(a = 1); a" parses "typeof(a = 1); a" + parses "{% x unless 1 %}" parses "{% x unless 1 %}" + parses "def foo(x @if); end" parses "def foo(x @if); end" + parses "when : Int32" parses "when : Int32" + parses "n / 2" parses "n / 2" + parses "a = / /" parses "a = / /" + parses "f.x /= 2" parses "f.x /= 2" + parses "{%\na = 1\n%}" parses "{%\na = 1\n%}" + parses "macro foo;bar{% begin %}body{% end %}baz;end" parses "macro foo;bar{% begin %}body{% end %}baz;end" + parses "foo +1_i64" parses "foo +1_i64" + says syntax error on "return // 1" says syntax error on "return // 1" + says syntax error on "def foo(false); end" says syntax error on "def foo(false); end" + parses "@[Foo]" parses "@[Foo]" + parses "__FILE__" parses "__FILE__" + parses "def **; end;" parses "def **; end;" + parses "case :foo; when :bar; 2; end" parses "case :foo; when :bar; 2; end" + parses "def foo(@typeof); end" parses "def foo(@typeof); end" + parses "foo %i()" parses "foo %i()" + says syntax error on "def foo(extend); end" says syntax error on "def foo(extend); end" says syntax error on "foo **bar, out x" says syntax error on "foo **bar, out x" - parses "def foo(@var); end" parses "def foo(@var); end" - says syntax error on "class Foo(*T, *U); end" says syntax error on "class Foo(*T, *U); end" - says syntax error on "{\"x\": [] of Int32,\n}\n1.foo(" says syntax error on "{\"x\": [] of Int32,\n}\n1.foo(" - parses "foo.is_a?(Foo | Bar)" parses "foo.is_a?(Foo | Bar)" - parses "macro foo; 1 + 2; end" parses "macro foo; 1 + 2; end" - parses "typeof : Int32" parses "typeof : Int32" - parses "case / /\nwhen / /\n/ /\nelse\n/ /\nend" parses "case / /\nwhen / /\n/ /\nelse\n/ /\nend" - sets correct location of parameter in proc literal sets correct location of parameter in proc literal - parses "foo(0, n =~ 2)" parses "foo(0, n =~ 2)" - parses "begin; 1; rescue ex : ::Foo | ::Bar; 2; end" parses "begin; 1; rescue ex : ::Foo | ::Bar; 2; end" - parses "def ===(*args, **opts); end" parses "def ===(*args, **opts); end" - parses "def ^; end;" parses "def ^; end;" - parses "lib LibC; fun foo : Int**; end" parses "lib LibC; fun foo : Int**; end" - says syntax error on "foo :: Foo" says syntax error on "foo :: Foo" - parses "1 + /foo/" parses "1 + /foo/" - parses "def foo(protected foo); end" parses "def foo(protected foo); end" - parses "def foo(@@while); end" parses "def foo(@@while); end" - says syntax error on "def foo\nstruct\nend" says syntax error on "def foo\nstruct\nend" - parses "foo(a: n / 2)" parses "foo(a: n / 2)" - parses "1.~" parses "1.~" - parses "foo % w()" parses "foo % w()" - parses "foo.[]=(1, 2)" parses "foo.[]=(1, 2)" - parses "foo.-(1, 2)" parses "foo.-(1, 2)" - parses "@@a, b = 1, 2" parses "@@a, b = 1, 2" - parses "foo.[]=(1, 2) { 3 }" parses "foo.[]=(1, 2) { 3 }" - says syntax error on "def foo(**args, x); end" says syntax error on "def foo(**args, x); end" - parses "next : Int32" parses "next : Int32" - parses "break {1, 2}" parses "break {1, 2}" - says syntax error on "a.b() = 1" says syntax error on "a.b() = 1" - says syntax error on "break <= 1" says syntax error on "break <= 1" - says syntax error on "Hash{\"foo\": 1, \"bar\": 2}" says syntax error on "Hash{\"foo\": 1, \"bar\": 2}" - parses "..2" parses "..2" - parses "foo(0, n >> 2)" parses "foo(0, n >> 2)" - parses "a = 1; class Foo; @x = a; end" parses "a = 1; class Foo; @x = a; end" - parses "def foo(@var); 1; end" parses "def foo(@var); 1; end" - parses "foo 1.bar do\nend" parses "foo 1.bar do\nend" - says syntax error on "case 1 == 1 a; when 2; end" says syntax error on "case 1 == 1 a; when 2; end" - parses "abstract class Foo; end" parses "abstract class Foo; end" - parses "def foo(x = 1, *y); 1; end" parses "def foo(x = 1, *y); 1; end" - parses "<<-HERE\nHello, mom! I am HERE.\nHER dress is beautiful.\nHE is OK.\n HERESY\nHERE" parses "<<-HERE\nHello, mom! I am HERE.\nHER dress is beautiful.\nHE is OK.\n HERESY\nHERE" + says syntax error on "{a: 1, \"\": 2}" says syntax error on "{a: 1, \"\": 2}" + parses "<<-'EOF'.x\n foo\nEOF" parses "<<-'EOF'.x\n foo\nEOF" + parses "Int[8]?" parses "Int[8]?" + parses "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2))" parses "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2))" + says syntax error on "def foo(include); end" says syntax error on "def foo(include); end" + says syntax error on "foo { |(struct)| }" says syntax error on "foo { |(struct)| }" + parses "foo = 1; ->foo.&-(Int32)" parses "foo = 1; ->foo.&-(Int32)" + parses "x.foo(a: 1, b: 2)" parses "x.foo(a: 1, b: 2)" + parses "def foo(@@private); end" parses "def foo(@@private); end" parses "def foo(fun foo); end" parses "def foo(fun foo); end" - parses "def /(); end" parses "def /(); end" - says syntax error on "case 1\nin Int32; 2; when 2" says syntax error on "case 1\nin Int32; 2; when 2" - parses "def foo(@include); end" parses "def foo(@include); end" - parses "def foo(x = / /); end" parses "def foo(x = / /); end" - parses "def ===; end;" parses "def ===; end;" - says syntax error on "(1, 2 3)" says syntax error on "(1, 2 3)" - parses "%x(`which(foo)`)" parses "%x(`which(foo)`)" - parses "- 1" parses "- 1" - parses "foo &.as?(T)" parses "foo &.as?(T)" - parses "foo[\nfoo[\n1\n]\n]" parses "foo[\nfoo[\n1\n]\n]" - parses "def foo(x, *y : Int32); 1; end" parses "def foo(x, *y : Int32); 1; end" - parses "->Foo.&*(Int32)" parses "->Foo.&*(Int32)" - parses "abstract def foo" parses "abstract def foo" - says syntax error on "foo { |nil| }" says syntax error on "foo { |nil| }" - says syntax error on "next[0]" says syntax error on "next[0]" - says syntax error on "x++" says syntax error on "x++" - parses "def foo(x = __FILE__); end" parses "def foo(x = __FILE__); end" - parses "f.x &-= 2" parses "f.x &-= 2" - parses "n | 2" parses "n | 2" - parses "alignof(\n Int32\n)" parses "alignof(\n Int32\n)" - parses "class Foo\nend" parses "class Foo\nend" - parses "def foo(x @end); end" parses "def foo(x @end); end" - parses "asm(\n\"nop\"\n:\n\"a\"(0),\n\"b\"(1)\n:\n\"c\"(2),\n\"d\"(3)\n)" parses "asm(\n\"nop\"\n:\n\"a\"(0),\n\"b\"(1)\n:\n\"c\"(2),\n\"d\"(3)\n)" - says syntax error on "foo { |self| }" says syntax error on "foo { |self| }" - parses "macro foo(@[Foo] **args);end" parses "macro foo(@[Foo] **args);end" - says syntax error on "def foo(x :Int32); end" says syntax error on "def foo(x :Int32); end" - says syntax error on "def foo(x = 1, y); end" says syntax error on "def foo(x = 1, y); end" - parses "def foo(@@until); end" parses "def foo(@@until); end" - parses "def foo(@private); end" parses "def foo(@private); end" - parses "case 1\nin false; 2; end" parses "case 1\nin false; 2; end" - parses "-@@foo" parses "-@@foo" - parses "def foo(until foo); end" parses "def foo(until foo); end" - says syntax error on "case 1; when return; end; end" says syntax error on "case 1; when return; end; end" - parses "->Foo.foo" parses "->Foo.foo" - parses "qux \"foo\#{bar do end}baz\"" parses "qux \"foo\#{bar do end}baz\"" - parses "foo z: out x; x" parses "foo z: out x; x" - parses "foo %x()" parses "foo %x()" - says syntax error on "def foo=(**kwargs); end" says syntax error on "def foo=(**kwargs); end" - says syntax error on "def foo(foo nil); end" says syntax error on "def foo(foo nil); end" - parses "property asm : Int32" parses "property asm : Int32" - parses "b.c &&= 1" parses "b.c &&= 1" - parses "true" parses "true" - parses "Foo({x: X, y: Y})" parses "Foo({x: X, y: Y})" - parses "def foo(x @while); end" parses "def foo(x @while); end" - parses "def self.===(); end;" parses "def self.===(); end;" - parses "->Foo./(Int32)" parses "->Foo./(Int32)" - parses "def foo(**args)\n1\nend" parses "def foo(**args)\n1\nend" - parses "a = 1; a <<=\n1" parses "a = 1; a <<=\n1" - parses "macro []=;end" parses "macro []=;end" - parses "foo(regex: //)" parses "foo(regex: //)" - says syntax error on "break .. 1" says syntax error on "break .. 1" - parses "def []=(*args, **opts); end" parses "def []=(*args, **opts); end" - says syntax error on "1 unless next" says syntax error on "1 unless next" - says syntax error on "a() += 1" says syntax error on "a() += 1" - parses "a ? 1 : b ? 2 : c ? 3 : 0" parses "a ? 1 : b ? 2 : c ? 3 : 0" - parses "/foo/x" parses "/foo/x" - says syntax error on "def foo *y; 1; end" says syntax error on "def foo *y; 1; end" - says syntax error on "macro !;end" says syntax error on "macro !;end" - parses "foo 1, **bar, &block" parses "foo 1, **bar, &block" - parses "a; if / /; / /; elsif / /; / /; end" parses "a; if / /; / /; elsif / /; / /; end" - parses "Foo()" parses "Foo()" - parses "foo(0, n < 2)" parses "foo(0, n < 2)" - says syntax error on "foo { |(class)| }" says syntax error on "foo { |(class)| }" - parses "foo = 1; foo -1" parses "foo = 1; foo -1" - parses "def foo(@@self); end" parses "def foo(@@self); end" - parses "alignof(X)" parses "alignof(X)" - parses "def <=(); end;" parses "def <=(); end;" - parses "def foo(x @@case); end" parses "def foo(x @@case); end" - parses "[\n1\n]" parses "[\n1\n]" - parses "a/b" parses "a/b" - says syntax error on "def foo(**args, *x); end" says syntax error on "def foo(**args, *x); end" - parses "return if true" parses "return if true" - parses "case 1; end" parses "case 1; end" - parses "{{ foo }}" parses "{{ foo }}" - parses "f.x %= 2" parses "f.x %= 2" + says syntax error on "foo(**bar, 1)" says syntax error on "foo(**bar, 1)" + parses "@foo = 1" parses "@foo = 1" parses "if foo; 1; elsif bar; 2; else 3; end" parses "if foo; 1; elsif bar; 2; else 3; end" - parses "enum Foo; macro foo;end; end" parses "enum Foo; macro foo;end; end" - parses "x = 1; foo.bar x do\nend" parses "x = 1; foo.bar x do\nend" - parses "def self.|; end;" parses "def self.|; end;" - parses "1 < 2" parses "1 < 2" - parses "next 1 if true" parses "next 1 if true" - parses "def foo(x @def); end" parses "def foo(x @def); end" - parses "def foo(with foo); end" parses "def foo(with foo); end" - parses "def foo(next foo); end" parses "def foo(next foo); end" - parses "def foo(x @@require); end" parses "def foo(x @@require); end" - parses "a.b **=\n1" parses "a.b **=\n1" - parses " macro foo(\n @[Foo]\n id,\n @[Bar] name\n );end" parses " macro foo(\n @[Foo]\n id,\n @[Bar] name\n );end" - sets correct location of splat in multiple assignment sets correct location of splat in multiple assignment - parses "Foo.bar x.y do\nend" parses "Foo.bar x.y do\nend" - parses "def foo(x @@nil); end" parses "def foo(x @@nil); end" - parses "Foo(X, instance_alignof(Int32))" parses "Foo(X, instance_alignof(Int32))" - says syntax error on "foo(1, 2, 3 end" says syntax error on "foo(1, 2, 3 end" - parses "->(x : Int32) { }" parses "->(x : Int32) { }" - parses "macro foo;bar{% if x %}body{% else %}body2{%end%}baz;end" parses "macro foo;bar{% if x %}body{% else %}body2{%end%}baz;end" - parses "->::foo=" parses "->::foo=" - parses "foo(n % 2)" parses "foo(n % 2)" - parses "while true; end\nif true; end" parses "while true; end\nif true; end" - parses "{% begin %}%i< %s >{% end %}" parses "{% begin %}%i< %s >{% end %}" - parses "macro >;end" parses "macro >;end" - parses "foo(..2)" parses "foo(..2)" - parses "def foo(var : Int32 -> = 1); end" parses "def foo(var : Int32 -> = 1); end" - parses "case 1\nwhen .as(T)\n2\nend" parses "case 1\nwhen .as(T)\n2\nend" - parses "lib LibC; type A = B*; end" parses "lib LibC; type A = B*; end" - parses "true : Int32" parses "true : Int32" - says syntax error on "foo(break)" says syntax error on "foo(break)" - parses "foo rescue 2" parses "foo rescue 2" - parses "foo.!= do end" parses "foo.!= do end" - says syntax error on "{{ {{ 1 }} }}" says syntax error on "{{ {{ 1 }} }}" - says syntax error on "{1 => 2, 3 => 4 5 => 6}" says syntax error on "{1 => 2, 3 => 4 5 => 6}" - says syntax error on "def foo(foo typeof); end" says syntax error on "def foo(foo typeof); end" - parses "macro ~;end" parses "macro ~;end" - parses "a = 1; a >>=\n1" parses "a = 1; a >>=\n1" - says syntax error on "case {1, 2}; when {3}; 4; end" says syntax error on "case {1, 2}; when {3}; 4; end" - parses "<<-HERE1; <<-HERE2\nHERE1\nHERE2" parses "<<-HERE1; <<-HERE2\nHERE1\nHERE2" - parses "a[0], a[1] = 1, 2" parses "a[0], a[1] = 1, 2" - says syntax error on "def foo var\n end" says syntax error on "def foo var\n end" - parses "foo.[]= 1, 2" parses "foo.[]= 1, 2" - says syntax error on "foo { |(self)| }" says syntax error on "foo { |(self)| }" - says syntax error on "def foo(foo protected); end" says syntax error on "def foo(foo protected); end" - parses "foo 1" parses "foo 1" - parses "a.foo &block" parses "a.foo &block" - parses "call \"foo\"" parses "call \"foo\"" - parses "ensure : Int32" parses "ensure : Int32" - parses ":\"\\a\\b\\n\\r\\t\\v\\f\\e\"" parses ":\"\\a\\b\\n\\r\\t\\v\\f\\e\"" - parses "foo(z: 0, a: n | 2)" parses "foo(z: 0, a: n | 2)" - parses "foo +1.0" parses "foo +1.0" - parses "case 1\nwhen 1\n2\nelse\n3\nend" parses "case 1\nwhen 1\n2\nelse\n3\nend" - parses "def foo;{{@type}};end" parses "def foo;{{@type}};end" - says syntax error on "def foo(in); end" says syntax error on "def foo(in); end" + parses "x[{1}]" parses "x[{1}]" + parses "x : Foo(A, *B, C)" parses "x : Foo(A, *B, C)" + parses "{% begin %}{% if true %}if true{% end %}\n{% if true %}end{% end %}{% end %}" parses "{% begin %}{% if true %}if true{% end %}\n{% if true %}end{% end %}{% end %}" + says syntax error on "def foo(sizeof); end" says syntax error on "def foo(sizeof); end" + says syntax error on "pointerof(self)" says syntax error on "pointerof(self)" + says syntax error on "unless break; end" says syntax error on "unless break; end" + parses "a : Foo()[12]" parses "a : Foo()[12]" + parses "macro foo;bar{% if x %}body{% end %}baz;end" parses "macro foo;bar{% if x %}body{% end %}baz;end" + parses "def foo(@pointerof); end" parses "def foo(@pointerof); end" + parses "def foo(a, &block : Int, self -> Double); end" parses "def foo(a, &block : Int, self -> Double); end" + says syntax error on "def foo(foo offsetof); end" says syntax error on "def foo(foo offsetof); end" + says syntax error on "case 1\nin Int32; 2; when 2" says syntax error on "case 1\nin Int32; 2; when 2" parses "foo(1, a: 1, b: 2)" parses "foo(1, a: 1, b: 2)" - parses "foo &.+(2)" parses "foo &.+(2)" - says syntax error on "next &* 1" says syntax error on "next &* 1" - says syntax error on "return ** 1" says syntax error on "return ** 1" - says syntax error on "A = begin; B = 1; end" says syntax error on "A = begin; B = 1; end" - says syntax error on "1 .. next" says syntax error on "1 .. next" - parses "return 1.bar do\nend" parses "return 1.bar do\nend" - parses "foo &.block(1)" parses "foo &.block(1)" - parses "def !~(); end" parses "def !~(); end" - parses "f.x += 2" parses "f.x += 2" - says syntax error on "return &** 1" says syntax error on "return &** 1" - parses "protected def foo; end" parses "protected def foo; end" + parses "a.b &+=\n1" parses "a.b &+=\n1" + parses "foo +1" parses "foo +1" + parses "{% begin %}%i( %s ){% end %}" parses "{% begin %}%i( %s ){% end %}" + parses "<<-HERE\n One\n\n Zero\n HERE" parses "<<-HERE\n One\n\n Zero\n HERE" + parses "foo.**" parses "foo.**" + says syntax error on "return &* 1" says syntax error on "return &* 1" + says syntax error on "return[0]" says syntax error on "return[0]" + parses "yield 1" parses "yield 1" + says syntax error on "foo(foo(&.block)" says syntax error on "foo(foo(&.block)" + says syntax error on "return &+ 1" says syntax error on "return &+ 1" + parses "a.b -=\n1" parses "a.b -=\n1" + parses "foo(z: 0, a: n !~ 2)" parses "foo(z: 0, a: n !~ 2)" + parses "->() : Int32 do end" parses "->() : Int32 do end" + parses "def !=(); end;" parses "def !=(); end;" + says syntax error on "a.[]() += 1" says syntax error on "a.[]() += 1" + parses "a = 1; a &= 1" parses "a = 1; a &= 1" + parses "foo.&" parses "foo.&" + parses "def foo(@@class); end" parses "def foo(@@class); end" + parses "Set() {1, 2, 3}" parses "Set() {1, 2, 3}" + parses "def self.*; end;" parses "def self.*; end;" says syntax error on "def foo\nclass\nend" says syntax error on "def foo\nclass\nend" - says syntax error on "foo { |yield| }" says syntax error on "foo { |yield| }" - parses "/foo/m" parses "/foo/m" - parses "...2" parses "...2" - says syntax error on "case when .foo? then 1; end" says syntax error on "case when .foo? then 1; end" - parses "def Foo.foo\n1\nend" parses "def Foo.foo\n1\nend" - parses "end : Int32" parses "end : Int32" - parses "a.b /2/" parses "a.b /2/" - parses "{% begin %}%q< %s >{% end %}" parses "{% begin %}%q< %s >{% end %}" - parses "_, *_, _, _ = 1, 2, 3" parses "_, *_, _, _ = 1, 2, 3" - parses ":!=" parses ":!=" - says syntax error on "foo { |include| }" says syntax error on "foo { |include| }" - says syntax error on "def foo(yield); end" says syntax error on "def foo(yield); end" - parses "foo(&.as(T).bar)" parses "foo(&.as(T).bar)" - parses "foo.-(1, 2) { 3 }" parses "foo.-(1, 2) { 3 }" - says syntax error on "foo { |a b| }" says syntax error on "foo { |a b| }" - parses "require : Int32" parses "require : Int32" - says syntax error on "+next" says syntax error on "+next" - parses "foo { |(_, c)| c }" parses "foo { |(_, c)| c }" - says syntax error on "foo { |(offsetof)| }" says syntax error on "foo { |(offsetof)| }" - says syntax error on "def self.!; end" says syntax error on "def self.!; end" - parses "a = 1; a[2] &&= 3" parses "a = 1; a[2] &&= 3" - says syntax error on "macro as?; end" says syntax error on "macro as?; end" - parses "foo(0, n & 2)" parses "foo(0, n & 2)" - parses "def foo(@select); end" parses "def foo(@select); end" - parses "Foo(T, {x: X})" parses "Foo(T, {x: X})" - parses "def ===(); end" parses "def ===(); end" - parses ":\"\\u{61}\"" parses ":\"\\u{61}\"" - parses "def foo(var : (Int, Float -> Double)); end" parses "def foo(var : (Int, Float -> Double)); end" - parses "return *1" parses "return *1" - parses "Foo(T, 1)" parses "Foo(T, 1)" - parses "property class : Int32" parses "property class : Int32" - parses "(a;\nb)" parses "(a;\nb)" - says syntax error on "return <= 1" says syntax error on "return <= 1" - says syntax error on "1 if break" says syntax error on "1 if break" - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2))" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2))" - parses "foo%Q" parses "foo%Q" - parses "case 1\nwhen 1\n2\nend\nif a\nend" parses "case 1\nwhen 1\n2\nend\nif a\nend" - parses "a : Foo = 1" parses "a : Foo = 1" - says syntax error on "foo[1] = next" says syntax error on "foo[1] = next" - says syntax error on "asm(\"nop\" ::: \"\#{foo}\")" says syntax error on "asm(\"nop\" ::: \"\#{foo}\")" - parses "\"hello \\\r\n world\"" parses "\"hello \\\r\n world\"" - parses "def !=(other, file = 1); end" parses "def !=(other, file = 1); end" - parses "break 1, 2" parses "break 1, 2" - parses "def foo(true foo); end" parses "def foo(true foo); end" - parses "a = /=/" parses "a = /=/" - parses "next;" parses "next;" - parses "foo.< 1, 2" parses "foo.< 1, 2" - says syntax error on "def foo(foo require); end" says syntax error on "def foo(foo require); end" - parses "case 1\nwhen .as?(T)\n2\nend" parses "case 1\nwhen .as?(T)\n2\nend" - says syntax error on "next % 1" says syntax error on "next % 1" - says syntax error on "self, x = 1, 2" says syntax error on "self, x = 1, 2" - parses "foo { |(a, (b, (c, d)))| }" parses "foo { |(a, (b, (c, d)))| }" - parses "lib LibC; type A = B.class; end" parses "lib LibC; type A = B.class; end" - parses "foo(n === 2)" parses "foo(n === 2)" - says syntax error on "lib Foo; fun foo(x : Int32, x : Int64); end" says syntax error on "lib Foo; fun foo(x : Int32, x : Int64); end" - parses "n % 2" parses "n % 2" - parses "macro : Int32" parses "macro : Int32" - parses "until true; end;" parses "until true; end;" - says syntax error on "break &** 1" says syntax error on "break &** 1" - parses "select\nwhen foo\n2\nelse\n3\nend" parses "select\nwhen foo\n2\nelse\n3\nend" - parses "def foo(@@nil); end" parses "def foo(@@nil); end" - says syntax error on "def is_a?; end" says syntax error on "def is_a?; end" - parses "foo.!=" parses "foo.!=" - parses "{% begin %}%q( %s ){% end %}" parses "{% begin %}%q( %s ){% end %}" - parses "A = 1" parses "A = 1" - says syntax error on "def foo(\"bar \#{1} qux\" y); y; end" says syntax error on "def foo(\"bar \#{1} qux\" y); y; end" - parses "foo(Foo: 1, Bar: 2)" parses "foo(Foo: 1, Bar: 2)" - parses "\u3042.\u3044, \u3046.\u3048.\u304A = 1, 2" parses "\u3042.\u3044, \u3046.\u3048.\u304A = 1, 2" - parses "[] of ->\n1" parses "[] of ->\n1" - says syntax error on "next.as(Int32)" says syntax error on "next.as(Int32)" - parses "abstract def foo(x)" parses "abstract def foo(x)" - parses ":foo" parses ":foo" - parses "foo(0, n ** 2)" parses "foo(0, n ** 2)" - parses "foo = 1; foo(+1)" parses "foo = 1; foo(+1)" - parses "r = 1; r.x += 2" parses "r = 1; r.x += 2" - parses "as(Bar)" parses "as(Bar)" - parses "T::U/1" parses "T::U/1" - says syntax error on "nil foo" says syntax error on "nil foo" - says syntax error on "foo { |(next)| }" says syntax error on "foo { |(next)| }" - parses "def foo(x @in); end" parses "def foo(x @in); end" - parses "foo(x: result : Int32); result" parses "foo(x: result : Int32); result" - parses "foo.<(1, 2)" parses "foo.<(1, 2)" - parses "Foo({x: X, typeof: Y})" parses "Foo({x: X, typeof: Y})" - parses "def foo(var); end" parses "def foo(var); end" - parses "def foo(x @@alias); end" parses "def foo(x @@alias); end" - parses "foo **bar" parses "foo **bar" + says syntax error on "def foo(foo next); end" says syntax error on "def foo(foo next); end" + parses "x, y, z = <<-FOO, <<-BAR, <<-BAZ\nhello\nFOO\nworld\nBAR\n!\nBAZ" parses "x, y, z = <<-FOO, <<-BAR, <<-BAZ\nhello\nFOO\nworld\nBAR\n!\nBAZ" + parses "property begin : Int32" parses "property begin : Int32" + parses "foo.[0] = 1" parses "foo.[0] = 1" + parses "foo &./(1)" parses "foo &./(1)" + parses "+ 1" parses "+ 1" + parses "->Foo.<<(Int32)" parses "->Foo.<<(Int32)" parses "foo.bar" parses "foo.bar" - parses "foo.> do end" parses "foo.> do end" - parses "{% begin %}%x( %s ){% end %}" parses "{% begin %}%x( %s ){% end %}" - parses "case {1, 2}\nwhen {.foo, .bar}\n5\nend" parses "case {1, 2}\nwhen {.foo, .bar}\n5\nend" - parses "macro <;end" parses "macro <;end" - global regex match data - says syntax error on "$2147483648" says syntax error on "$2147483648" - parses "$~" parses "$~" - parses "$~.foo" parses "$~.foo" - says syntax error on "$0, a = {1, 2}" says syntax error on "$0, a = {1, 2}" - parses "$0" parses "$0" - says syntax error on "$0, $1 = [1, 2]" says syntax error on "$0, $1 = [1, 2]" - parses "foo $?" parses "foo $?" - parses "$1?" parses "$1?" - says syntax error on "$99999999999999999999999?" says syntax error on "$99999999999999999999999?" - parses "$1" parses "$1" - parses "$? = 1" parses "$? = 1" - parses "$~ = 1" parses "$~ = 1" - parses "foo $1" parses "foo $1" - parses "$?" parses "$?" - parses "$?.foo" parses "$?.foo" - says syntax error on "$0 = 1" says syntax error on "$0 = 1" - parses "f.x >>= 2" parses "f.x >>= 2" - parses "def self.**(); end;" parses "def self.**(); end;" - parses "<<-HERE\n foo\#{1}bar\n baz\n HERE" parses "<<-HERE\n foo\#{1}bar\n baz\n HERE" - parses "foo(a: n + 2)" parses "foo(a: n + 2)" - parses "break *1, 2" parses "break *1, 2" - parses "enum Foo; @[Bar]; end" parses "enum Foo; @[Bar]; end" - parses ":\"\\\"foo\"" parses ":\"\\\"foo\"" - parses "foo(z: 0, a: n =~ 2)" parses "foo(z: 0, a: n =~ 2)" - parses ":&**" parses ":&**" - parses "def self.<; end;" parses "def self.<; end;" - parses "enum Foo; {% if 1 %}2{% end %}; end" parses "enum Foo; {% if 1 %}2{% end %}; end" - says syntax error on "yield return" says syntax error on "yield return" - parses "foo % Q()" parses "foo % Q()" - parses "def ==(*args, **opts, &); end" parses "def ==(*args, **opts, &); end" - parses "foo.[]= do end" parses "foo.[]= do end" - parses "puts __FILE__" parses "puts __FILE__" - says syntax error on "*a, b, c, d, e = 1, 2" says syntax error on "*a, b, c, d, e = 1, 2" - parses "n + 2" parses "n + 2" - says syntax error on "*a, 1 = 2" says syntax error on "*a, 1 = 2" - parses "Foo::Bar" parses "Foo::Bar" - says syntax error on "{foo: 1\nbar: 2}" says syntax error on "{foo: 1\nbar: 2}" - parses "macro foo;bar{% for x in y %}\\ \n body{% end %}baz;end" parses "macro foo;bar{% for x in y %}\\ \n body{% end %}baz;end" - parses "while true; 1; end;" parses "while true; 1; end;" - parses "*a, b = 1, 2, 3, 4" parses "*a, b = 1, 2, 3, 4" + parses "def foo(true foo); end" parses "def foo(true foo); end" + parses "macro foo; 1 + 2 {{foo}} 3 + 4; end" parses "macro foo; 1 + 2 {{foo}} 3 + 4; end" + parses "alias Foo::Bar = Baz" parses "alias Foo::Bar = Baz" + parses "def <; end;" parses "def <; end;" + parses "def =~(); end" parses "def =~(); end" + parses "enum Foo; protected def foo; 1; end; end" parses "enum Foo; protected def foo; 1; end; end" parses "elsif : Int32" parses "elsif : Int32" - parses "def ===(); end;" parses "def ===(); end;" - parses "def foo(x @@self); end" parses "def foo(x @@self); end" - parses "foo.+ do end" parses "foo.+ do end" - parses "def ==(other, file = 1); end" parses "def ==(other, file = 1); end" - parses "{% if x %}body{% end %}" parses "{% if x %}body{% end %}" - says syntax error on "lib Foo%end" says syntax error on "lib Foo%end" - parses "{% begin %}%| %s |{% end %}" parses "{% begin %}%| %s |{% end %}" - parses "case\nend" parses "case\nend" - parses "\"hello \#{1}\" \\\n \"\#{2} world\"" parses "\"hello \#{1}\" \\\n \"\#{2} world\"" - parses "macro foo;%var;end" parses "macro foo;%var;end" - parses "def +(); end;" parses "def +(); end;" - says syntax error on "a = 1, 2, 3" says syntax error on "a = 1, 2, 3" - parses "macro foo\n\"\\\\\"\nend" parses "macro foo\n\"\\\\\"\nend" - parses "def foo(@struct); end" parses "def foo(@struct); end" + parses "def |(); end" parses "def |(); end" + parses "macro foo;bar{% for x, y in z %}body{% end %}baz;end" parses "macro foo;bar{% for x, y in z %}body{% end %}baz;end" + parses "Foo({String, ->})" parses "Foo({String, ->})" + parses "def self.%(); end;" parses "def self.%(); end;" + parses "@a : Foo" parses "@a : Foo" + parses "lib LibC; fun foo(a : Int**); end" parses "lib LibC; fun foo(a : Int**); end" + parses "def &; end;" parses "def &; end;" + says syntax error on "foo { |(module)| }" says syntax error on "foo { |(module)| }" + parses "foo.!= 1, 2" parses "foo.!= 1, 2" + parses "case {1}\nin {_}; 2; end" parses "case {1}\nin {_}; 2; end" + says syntax error on "def foo &block : Int -> Double ; end" says syntax error on "def foo &block : Int -> Double ; end" + parses "1 ** -x" parses "1 ** -x" + parses "Foo({X, Y,})" parses "Foo({X, Y,})" + says syntax error on "def foo=(&block); end" says syntax error on "def foo=(&block); end" + parses "x = 1; foo x { }" parses "x = 1; foo x { }" + parses "\"hello \\\n world\"" parses "\"hello \\\n world\"" + parses "*a.foo, a.bar = 1" parses "*a.foo, a.bar = 1" + says syntax error on "self = 1" says syntax error on "self = 1" + parses "pointerof(@a)" parses "pointerof(@a)" + parses "1\\\n + 2" parses "1\\\n + 2" + parses "{/ /, / /}" parses "{/ /, / /}" + parses "%q{hello \\n world}" parses "%q{hello \\n world}" + says syntax error on "def foo(foo alias); end" says syntax error on "def foo(foo alias); end" + parses "foo % x()" parses "foo % x()" + parses "abstract : Int32" parses "abstract : Int32" + parses "foo.[]=(1, 2)" parses "foo.[]=(1, 2)" + parses "def !~(); end" parses "def !~(); end" + parses "a.b ^=\n1" parses "a.b ^=\n1" + says syntax error on "lib LibC\n$Errno : Int32\nend" says syntax error on "lib LibC\n$Errno : Int32\nend" + parses "case 1\nwhen .as(T)\n2\nend" parses "case 1\nwhen .as(T)\n2\nend" + parses "foo %Q()" parses "foo %Q()" + parses "def foo(@if); end" parses "def foo(@if); end" + parses "def foo(enum foo); end" parses "def foo(enum foo); end" + parses "unless foo; 1; end" parses "unless foo; 1; end" + parses "foo.!.!" parses "foo.!.!" + parses "begin; 1; rescue; 2; else; 3; end" parses "begin; 1; rescue; 2; else; 3; end" + says syntax error on "macro foo(x y z); end" says syntax error on "macro foo(x y z); end" + parses "1 % 2" parses "1 % 2" + parses "a.b |=\n1" parses "a.b |=\n1" + parses "->Foo.+(Int32)" parses "->Foo.+(Int32)" + parses "foo(0, n > 2)" parses "foo(0, n > 2)" + parses "foo &.!" parses "foo &.!" parses "foo.* 1, 2" parses "foo.* 1, 2" - parses "\"hello \#{1}\" \\\r\n \"\#{2} world\"" parses "\"hello \#{1}\" \\\r\n \"\#{2} world\"" - parses "def foo(x @true); end" parses "def foo(x @true); end" - parses "puts a if true" parses "puts a if true" - parses "def foo(x @nil); end" parses "def foo(x @nil); end" - says syntax error on "A = B = 1" says syntax error on "A = B = 1" - parses "next 1" parses "next 1" - parses "def foo(x @yield); end" parses "def foo(x @yield); end" - parses "def foo(x @@until); end" parses "def foo(x @@until); end" - parses "def foo(@@class); end" parses "def foo(@@class); end" - parses "def foo(unless foo); end" parses "def foo(unless foo); end" - parses "1.as?(\n Int32\n)" parses "1.as?(\n Int32\n)" - parses "foo.^ 1, 2" parses "foo.^ 1, 2" - parses "a = 1; a ensure a" parses "a = 1; a ensure a" - parses "def foo(@@extend); end" parses "def foo(@@extend); end" - says syntax error on "<<-FOO\n1\nFOO + 2" says syntax error on "<<-FOO\n1\nFOO + 2" - parses "->foo?" parses "->foo?" - parses "n == 2" parses "n == 2" - says syntax error on "1 if next" says syntax error on "1 if next" - sets correct location of annotation in lib sets correct location of annotation in lib - parses "foo(&.as(T))" parses "foo(&.as(T))" - parses "foo(Bar) { 1 }" parses "foo(Bar) { 1 }" - parses "a = 1; a %=\n1" parses "a = 1; a %=\n1" - parses "def self.|(); end;" parses "def self.|(); end;" - parses "[1, 2] of Int" parses "[1, 2] of Int" - says syntax error on "def foo(\"\" y); y; end" says syntax error on "def foo(\"\" y); y; end" - parses "def foo(pointerof foo); end" parses "def foo(pointerof foo); end" - says syntax error on "fun foo\nclass" says syntax error on "fun foo\nclass" - parses "def foo(@in); end" parses "def foo(@in); end" - parses "property macro : Int32" parses "property macro : Int32" - parses "x = 0; a, b = x += 1" parses "x = 0; a, b = x += 1" - parses "{\"foo\": 1}" parses "{\"foo\": 1}" - parses "foo(0, n === 2)" parses "foo(0, n === 2)" - parses "macro foo;unless %var;true;end;end" parses "macro foo;unless %var;true;end;end" - parses "\"hello \"\\\n\"world\"" parses "\"hello \"\\\n\"world\"" - parses "Foo??" parses "Foo??" - parses "def foo(@@unless); end" parses "def foo(@@unless); end" + says syntax error on "return ... 1" says syntax error on "return ... 1" + says syntax error on "macro foo(x : Int32); end" says syntax error on "macro foo(x : Int32); end" + parses "foo.<= 1, 2" parses "foo.<= 1, 2" + parses "def foo(yield foo); end" parses "def foo(yield foo); end" + parses "a.foo, *a.bar = 1" parses "a.foo, *a.bar = 1" + parses "case 1\nelse\n2\nend" parses "case 1\nelse\n2\nend" + parses "{A: 1, B: 2}" parses "{A: 1, B: 2}" + says syntax error on "def foo(asm); end" says syntax error on "def foo(asm); end" + says syntax error on "a() += 1" says syntax error on "a() += 1" + parses "def foo(x @@alias); end" parses "def foo(x @@alias); end" + parses "a = 1; class Foo; @x = a; end" parses "a = 1; class Foo; @x = a; end" + parses "macro foo\n <<-FOO\n %foo\n FOO\nend" parses "macro foo\n <<-FOO\n %foo\n FOO\nend" + says syntax error on "false foo" says syntax error on "false foo" + says syntax error on "foo(break)" says syntax error on "foo(break)" + parses "def foo; 1; 2; end" parses "def foo; 1; 2; end" + parses "def -(); end;" parses "def -(); end;" + parses "def >=; end;" parses "def >=; end;" + says syntax error on "class Foo(T, T); end" says syntax error on "class Foo(T, T); end" + parses "(bar do\nend)" parses "(bar do\nend)" + parses "a = 1; a +=\n1" parses "a = 1; a +=\n1" + parses "n // 2" parses "n // 2" + parses "case {1, 2}\nwhen foo\n5\nend" parses "case {1, 2}\nwhen foo\n5\nend" + parses "foo { a = 1 }; a" parses "foo { a = 1 }; a" + parses "foo &.as?(T).bar" parses "foo &.as?(T).bar" + parses "def foo(@include); end" parses "def foo(@include); end" parses "a = 1; a /= 1" parses "a = 1; a /= 1" - parses "foo.!~(1, 2) { 3 }" parses "foo.!~(1, 2) { 3 }" - parses "def foo(\nvar); end" parses "def foo(\nvar); end" - parses "def !~(); end;" parses "def !~(); end;" - parses "foo bar.baz(1) do\nend" parses "foo bar.baz(1) do\nend" - parses "{[] of Foo, ::Bar::Baz.new}" parses "{[] of Foo, ::Bar::Baz.new}" - parses "sizeof(\n Int32\n)" parses "sizeof(\n Int32\n)" - parses "()" parses "()" - parses "foo.bar(1).baz" parses "foo.bar(1).baz" - parses "macro foo(@[Foo] var);end" parses "macro foo(@[Foo] var);end" - parses "foo.*(1, 2)" parses "foo.*(1, 2)" - parses "property instance_sizeof : Int32" parses "property instance_sizeof : Int32" - parses "foo(//)" parses "foo(//)" - parses "self" parses "self" - parses "1 === 2" parses "1 === 2" - parses "foo.%" parses "foo.%" - says syntax error on "foo { |(nil)| }" says syntax error on "foo { |(nil)| }" - parses "foo { 1 }" parses "foo { 1 }" + says syntax error on "def foo(x y, x z); end" says syntax error on "def foo(x y, x z); end" + parses "_ = 1" parses "_ = 1" + parses "def foo(x = / /); end" parses "def foo(x = / /); end" + says syntax error on "case 1; when break; end; end" says syntax error on "case 1; when break; end; end" + parses "def /(); end" parses "def /(); end" + parses "{/ / => / /, / / => / /}" parses "{/ / => / /, / / => / /}" + says syntax error on "<<-FOO\n1\nFOO + 2" says syntax error on "<<-FOO\n1\nFOO + 2" + parses "{% begin %}%< %s >{% end %}" parses "{% begin %}%< %s >{% end %}" + parses "foo.>" parses "foo.>" + parses "a.b *=\n1" parses "a.b *=\n1" + parses "def -; end;" parses "def -; end;" + says syntax error on "case when .foo? then 1; end" says syntax error on "case when .foo? then 1; end" + parses "enum Foo; A = 1; B; end" parses "enum Foo; A = 1; B; end" + parses "def []=(*args, **opts); end" parses "def []=(*args, **opts); end" + parses "macro !~;end" parses "macro !~;end" + parses "foo = 1; ->foo.==(Int32)" parses "foo = 1; ->foo.==(Int32)" + parses "foo = 1; ->foo.foo=" parses "foo = 1; ->foo.foo=" + sets correct location of protected macro in enum sets correct location of protected macro in enum + parses "foo(bar:\"a\", baz:\"b\")" parses "foo(bar:\"a\", baz:\"b\")" + parses "foo *{1}" parses "foo *{1}" + parses "a = 1; a *= 1" parses "a = 1; a *= 1" + parses "def *(); end" parses "def *(); end" + parses "r = 1; r.x += 2" parses "r = 1; r.x += 2" + parses "def foo(end foo); end" parses "def foo(end foo); end" + parses ":&" parses ":&" + parses "def foo(next foo); end" parses "def foo(next foo); end" + parses "[1,\n 2,]" parses "[1,\n 2,]" + parses "foo %r()" parses "foo %r()" + parses "<<-'HERE'\n hello \\n world\n \#{1}\n HERE" parses "<<-'HERE'\n hello \\n world\n \#{1}\n HERE" + parses "[] of ->\n" parses "[] of ->\n" + parses "def self.>=; end;" parses "def self.>=; end;" + parses "foo &.nil?" parses "foo &.nil?" + parses "foo(z: 0, a: n =~ 2)" parses "foo(z: 0, a: n =~ 2)" + says syntax error on "next << 1" says syntax error on "next << 1" + parses ":&**" parses ":&**" + parses "macro foo(@[Foo] **args);end" parses "macro foo(@[Foo] **args);end" + parses "def foo(@@end); end" parses "def foo(@@end); end" + parses "1.!" parses "1.!" + parses "a = 1; a >>= 1" parses "a = 1; a >>= 1" + parses "case when 1\n2\nend" parses "case when 1\n2\nend" + parses "def foo(x @fun); end" parses "def foo(x @fun); end" + parses "with : Int32" parses "with : Int32" + parses "{1}" parses "{1}" says syntax error on "1 unless break" says syntax error on "1 unless break" - parses "case {1}\nin {_}; 2; end" parses "case {1}\nin {_}; 2; end" - parses "foo[\n1\n]" parses "foo[\n1\n]" - parses "1 &** 2" parses "1 &** 2" - parses "offsetof(\n Foo,\n @foo\n)" parses "offsetof(\n Foo,\n @foo\n)" - says syntax error on "until break; end" says syntax error on "until break; end" - says syntax error on "def foo\nfun\nend" says syntax error on "def foo\nfun\nend" - parses "a.b |=\n1" parses "a.b |=\n1" - parses "(bar {})" parses "(bar {})" - parses "def foo(@typeof); end" parses "def foo(@typeof); end" - parses "struct : Int32" parses "struct : Int32" - parses "x[a: 1, b: 2]" parses "x[a: 1, b: 2]" - parses "n === 2" parses "n === 2" - parses "foo x, y do\nend" parses "foo x, y do\nend" - parses "begin; rescue; end" parses "begin; rescue; end" - parses "enum Foo; {{1}}; end" parses "enum Foo; {{1}}; end" - parses "def foo(a, &block : *Int -> ); end" parses "def foo(a, &block : *Int -> ); end" - parses "Foo(T)?" parses "Foo(T)?" - says syntax error on "def foo(end); end" says syntax error on "def foo(end); end" + says syntax error on "foo(next)" says syntax error on "foo(next)" + says syntax error on "macro foo x\n 1 + 2; end" says syntax error on "macro foo x\n 1 + 2; end" + parses "def >(); end" parses "def >(); end" + says syntax error on "1 .. return" says syntax error on "1 .. return" + parses "yield" parses "yield" parses "foo(/a/)" parses "foo(/a/)" - parses "x, y, z = <<-FOO, <<-BAR, <<-BAZ\nhello\nFOO\nworld\nBAR\n!\nBAZ" parses "x, y, z = <<-FOO, <<-BAR, <<-BAZ\nhello\nFOO\nworld\nBAR\n!\nBAZ" - parses "break 1 if true" parses "break 1 if true" - parses "as?(Bar)" parses "as?(Bar)" - parses "foo %w()" parses "foo %w()" - parses "asm(\"nop\" ::::)" parses "asm(\"nop\" ::::)" - parses "def ==(*args, **opts); end" parses "def ==(*args, **opts); end" - parses "def foo(@@macro); end" parses "def foo(@@macro); end" - parses "x[..2]" parses "x[..2]" - parses "typeof(1)" parses "typeof(1)" - parses "def foo(x @case); end" parses "def foo(x @case); end" - parses "def foo(private foo); end" parses "def foo(private foo); end" - parses "def foo(x @until); end" parses "def foo(x @until); end" - parses "lib LibC\nfun getchar : (->)?\nend" parses "lib LibC\nfun getchar : (->)?\nend" - parses "f.x //= 2" parses "f.x //= 2" - parses "def &*(); end" parses "def &*(); end" - parses "foo(a: n >> 2)" parses "foo(a: n >> 2)" - parses "def downto(n)\n1\nend" parses "def downto(n)\n1\nend" - parses "def <=(other, file = 1); end" parses "def <=(other, file = 1); end" - says syntax error on "def foo(lib); end" says syntax error on "def foo(lib); end" - parses "macro >>;end" parses "macro >>;end" - parses "@foo" parses "@foo" - says syntax error on "b? = 1" says syntax error on "b? = 1" - says syntax error on "while return; end" says syntax error on "while return; end" - parses "class : Int32" parses "class : Int32" - parses "macro foo\n\"\\'\"\nend" parses "macro foo\n\"\\'\"\nend" - parses "lib LibC\nfun getch = GetChar\nend" parses "lib LibC\nfun getch = GetChar\nend" - parses "foo.* do end" parses "foo.* do end" - says syntax error on "macro foo *y;end" says syntax error on "macro foo *y;end" - parses "foo(/ /, / /)" parses "foo(/ /, / /)" - parses "def foo(a); a; end" parses "def foo(a); a; end" - parses "foo[] /2" parses "foo[] /2" - parses "alias Foo = Bar" parses "alias Foo = Bar" - parses "lib LibC; fun foo(a : Int*); end" parses "lib LibC; fun foo(a : Int*); end" - parses "def foo(@macro); end" parses "def foo(@macro); end" - says syntax error on "enum Foo < UInt16; end" says syntax error on "enum Foo < UInt16; end" - parses "def foo(x = __DIR__); end" parses "def foo(x = __DIR__); end" - parses "responds_to?(:foo)" parses "responds_to?(:foo)" - parses "case {1, 2}\nwhen foo\n5\nend" parses "case {1, 2}\nwhen foo\n5\nend" - says syntax error on "a, b, *c, d = 1, 2" says syntax error on "a, b, *c, d = 1, 2" - parses "foo unless 3" parses "foo unless 3" - parses "macro =~;end" parses "macro =~;end" - parses "->Foo.&(Int32)" parses "->Foo.&(Int32)" - parses "lib LibC; struct Foo; {% if 1 %}2{% end %}; end; end" parses "lib LibC; struct Foo; {% if 1 %}2{% end %}; end; end" - parses "def foo(x @include); end" parses "def foo(x @include); end" - parses "foo(out x); x" parses "foo(out x); x" - parses "def self.&; end;" parses "def self.&; end;" - parses "%r(\\ )" parses "%r(\\ )" - parses "foo = 1; b = 2; foo -b" parses "foo = 1; b = 2; foo -b" - parses "foo(0, n // 2)" parses "foo(0, n // 2)" - parses "{% a = 1 if 2 %}" parses "{% a = 1 if 2 %}" - says syntax error on "def foo(x : U) forall U,; end" says syntax error on "def foo(x : U) forall U,; end" - says syntax error on "return ... 1" says syntax error on "return ... 1" - parses ":[]=" parses ":[]=" + parses "foo &.+(2)" parses "foo &.+(2)" + parses "module Foo; end" parses "module Foo; end" + parses "(/ /)" parses "(/ /)" + parses "def foo(x, **args, &block)\n1\nend" parses "def foo(x, **args, &block)\n1\nend" + parses "%Q{hello \\n world}" parses "%Q{hello \\n world}" + says syntax error on "next &+ 1" says syntax error on "next &+ 1" + parses "def foo(@@var); end" parses "def foo(@@var); end" + parses "foo.> do end" parses "foo.> do end" + parses "Foo({x: X, y: Y})" parses "Foo({x: X, y: Y})" + says syntax error on "foo { |(begin)| }" says syntax error on "foo { |(begin)| }" + says syntax error on "foo { |(yield)| }" says syntax error on "foo { |(yield)| }" + says syntax error on "[\n]" says syntax error on "[\n]" + parses "macro foo(x, *y);end" parses "macro foo(x, *y);end" + says syntax error on "break * 1" says syntax error on "break * 1" + parses "case;when true;1;end" parses "case;when true;1;end" + parses "def [](x); end" parses "def [](x); end" + parses "1 +2" parses "1 +2" + parses "<<-SOME\n Sa\n Se\n SOME" parses "<<-SOME\n Sa\n Se\n SOME" + parses "a.b >>=\n1" parses "a.b >>=\n1" + parses "foo(&.is_a?(T))" parses "foo(&.is_a?(T))" + parses "a = 1; pointerof(a)" parses "a = 1; pointerof(a)" + says syntax error on "{1, 2 3}" says syntax error on "{1, 2 3}" + says syntax error on "foo[next]" says syntax error on "foo[next]" + parses "lib LibC; union Foo; end end" parses "lib LibC; union Foo; end end" + parses "def self.|; end;" parses "def self.|; end;" + parses "def foo(x : U) forall U; end" parses "def foo(x : U) forall U; end" + parses "4./(2)" parses "4./(2)" + parses "macro foo(a, @[Foo] var);end" parses "macro foo(a, @[Foo] var);end" + parses "def foo(var : Int?); end" parses "def foo(var : Int?); end" + parses "puts a if true" parses "puts a if true" + parses "Foo(X, alignof(Int32))" parses "Foo(X, alignof(Int32))" + parses "if foo\n1\nelse\n2\nend" parses "if foo\n1\nelse\n2\nend" + parses "def foo(@@case); end" parses "def foo(@@case); end" + parses "1_i128" parses "1_i128" + parses "def foo(@begin); end" parses "def foo(@begin); end" + says syntax error on "def foo(x, *); 1; end" says syntax error on "def foo(x, *); 1; end" + parses "def foo; x { |_| 1 }; end" parses "def foo; x { |_| 1 }; end" parses "macro foo\neenum\nend" parses "macro foo\neenum\nend" - parses "macro |;end" parses "macro |;end" - parses "foo a, / /" parses "foo a, / /" + says syntax error on "def foo(def); end" says syntax error on "def foo(def); end" + parses "def -(); end" parses "def -(); end" + says syntax error on "->(x y) { }" says syntax error on "->(x y) { }" + parses "foo(1)" parses "foo(1)" + parses "def foo(x @@enum); end" parses "def foo(x @@enum); end" + parses "a = 1; a |= 1" parses "a = 1; a |= 1" + says syntax error on "return + 1" says syntax error on "return + 1" + parses "def foo(a, &block : Foo); end" parses "def foo(a, &block : Foo); end" + parses "foo..2" parses "foo..2" + parses "Foo({\"foo bar\": X})" parses "Foo({\"foo bar\": X})" + parses "foo(\n begin\n result : Int32 = 1\n result\n end\n )" parses "foo(\n begin\n result : Int32 = 1\n result\n end\n )" + says syntax error on "break << 1" says syntax error on "break << 1" + parses "f.x <<= 2" parses "f.x <<= 2" + says syntax error on "foo { |lib| }" says syntax error on "foo { |lib| }" + parses "begin; 1; rescue ex : Foo | Bar; 2; end" parses "begin; 1; rescue ex : Foo | Bar; 2; end" + parses "1.0_f32" parses "1.0_f32" + parses "1 =~ 2" parses "1 =~ 2" + parses "->Foo.-(Int32)" parses "->Foo.-(Int32)" + parses "1 << 2" parses "1 << 2" + parses "def foo(n); foo(n -1); end" parses "def foo(n); foo(n -1); end" + parses "def foo(@@struct); end" parses "def foo(@@struct); end" + parses "Int[8]" parses "Int[8]" + parses "1 === 2" parses "1 === 2" + parses "macro foo(@[Foo] var);end" parses "macro foo(@[Foo] var);end" + parses "def &*(); end" parses "def &*(); end" + parses "foo = 1; ->foo.<=(Int32)" parses "foo = 1; ->foo.<=(Int32)" + parses "def : Int32" parses "def : Int32" + parses "def foo(@extend); end" parses "def foo(@extend); end" + parses "foo.| 1, 2" parses "foo.| 1, 2" + parses "a = 1; a %=\n1" parses "a = 1; a %=\n1" + parses "->@@foo.foo?" parses "->@@foo.foo?" + says syntax error on "next == 1" says syntax error on "next == 1" + says syntax error on "fun foo(x : Int32, x : Int64); end" says syntax error on "fun foo(x : Int32, x : Int64); end" + parses "foo = 1; ->foo.[](Int32)" parses "foo = 1; ->foo.[](Int32)" parses "@a, b = 1, 2" parses "@a, b = 1, 2" - parses "offsetof(X, @a)" parses "offsetof(X, @a)" - says syntax error on "macro foo(*x, *y); end" says syntax error on "macro foo(*x, *y); end" - says syntax error on "foo { |(out)| }" says syntax error on "foo { |(out)| }" - parses "def foo(instance_sizeof foo); end" parses "def foo(instance_sizeof foo); end" - says syntax error on "foo(**bar, *x)" says syntax error on "foo(**bar, *x)" - parses "a = 1; a **= 1" parses "a = 1; a **= 1" - parses "def self.!=; end;" parses "def self.!=; end;" - says syntax error on "macro foo;{%end};end" says syntax error on "macro foo;{%end};end" - says syntax error on "def foo(\"bar\");end" says syntax error on "def foo(\"bar\");end" - parses "def +; end;" parses "def +; end;" - parses "property else : Int32" parses "property else : Int32" - parses "def foo(@@end); end" parses "def foo(@@end); end" - parses "foo[0] = 1" parses "foo[0] = 1" - says syntax error on "a = 1; b = 2; a, b += 1, 2" says syntax error on "a = 1; b = 2; a, b += 1, 2" - parses "case 1; when 1; 2; else; 3; end" parses "case 1; when 1; 2; else; 3; end" - parses "a = 1; a &&= 1" parses "a = 1; a &&= 1" - parses "next *{1, 2}" parses "next *{1, 2}" - parses "next 1, 2" parses "next 1, 2" - parses "def foo(@fun); end" parses "def foo(@fun); end" - parses "def foo(@@enum); end" parses "def foo(@@enum); end" - parses "def foo(@if); end" parses "def foo(@if); end" - says syntax error on "def foo(return); end" says syntax error on "def foo(return); end" - parses "1 &* 2" parses "1 &* 2" - parses "a.b/2" parses "a.b/2" - says syntax error on "fun foo\nFoo = 1" says syntax error on "fun foo\nFoo = 1" - parses "macro &;end" parses "macro &;end" - says syntax error on "lib LibC\n$Errno : Int32\nend" says syntax error on "lib LibC\n$Errno : Int32\nend" + parses "def foo(a, &block : *Int -> ); end" parses "def foo(a, &block : *Int -> ); end" + says syntax error on "case 1\nin _;" says syntax error on "case 1\nin _;" + parses "foo[] /2" parses "foo[] /2" + parses "1;-2" parses "1;-2" + parses "def foo(x @asm); end" parses "def foo(x @asm); end" + parses "foo.[]=(1, 2) { 3 }" parses "foo.[]=(1, 2) { 3 }" + parses "def foo(x @@until); end" parses "def foo(x @@until); end" parses "foo.%(1, 2)" parses "foo.%(1, 2)" - parses "def foo(x @@enum); end" parses "def foo(x @@enum); end" - parses "def foo(\"bar qux\" y); y; end" parses "def foo(\"bar qux\" y); y; end" + parses "def foo(@@include); end" parses "def foo(@@include); end" + parses "-@foo" parses "-@foo" + says syntax error on "def foo(abstract); end" says syntax error on "def foo(abstract); end" + says syntax error on "def foo(protected); end" says syntax error on "def foo(protected); end" + parses "1+0" parses "1+0" + parses "def foo(offsetof foo); end" parses "def foo(offsetof foo); end" + parses "->Foo.&(Int32)" parses "->Foo.&(Int32)" + parses "break;" parses "break;" + parses "begin; 1; end;" parses "begin; 1; end;" + says syntax error on "return < 1" says syntax error on "return < 1" + parses "foo(*{1})" parses "foo(*{1})" + parses "enum Foo; @[Bar]; end" parses "enum Foo; @[Bar]; end" + parses "macro //;end" parses "macro //;end" + parses "lib LibC; enum Foo; A = 1; B; end end" parses "lib LibC; enum Foo; A = 1; B; end end" + parses "begin; 1; rescue Foo; 2; end" parses "begin; 1; rescue Foo; 2; end" + parses "1 * 2" parses "1 * 2" parses "case {1}\nin {Int32}; 2; end" parses "case {1}\nin {Int32}; 2; end" - says syntax error on "foo { |(true)| }" says syntax error on "foo { |(true)| }" - parses "def foo(var : Int*); end" parses "def foo(var : Int*); end" - parses "def self.==; end;" parses "def self.==; end;" - parses "4./(2)" parses "4./(2)" - says syntax error on "def nil?; end" says syntax error on "def nil?; end" - parses "{% begin %}%x{ %s }{% end %}" parses "{% begin %}%x{ %s }{% end %}" - parses "{[] of Foo, Bar::Baz ** 2}" parses "{[] of Foo, Bar::Baz ** 2}" - parses "def &(); end;" parses "def &(); end;" - parses "a\nunless / /\n/ /\nelse\n/ /\nend" parses "a\nunless / /\n/ /\nelse\n/ /\nend" - parses "pointerof(@a)" parses "pointerof(@a)" - parses "foo.*" parses "foo.*" - parses "foo%w" parses "foo%w" - parses "foo.[0] = 1" parses "foo.[0] = 1" - parses "def foo; x { |a, *b| b }; end" parses "def foo; x { |a, *b| b }; end" - parses "foo { |a, (b, c), (d, e)| a; b; c; d; e }" parses "foo { |a, (b, c), (d, e)| a; b; c; d; e }" - says syntax error on "def foo(foo select); end" says syntax error on "def foo(foo select); end" - says syntax error on "a.b {}, c = 1" says syntax error on "a.b {}, c = 1" - says syntax error on "foo[return]" says syntax error on "foo[return]" - says syntax error on "1 if return" says syntax error on "1 if return" - says syntax error on "def foo(var : Foo+); end" says syntax error on "def foo(var : Foo+); end" - parses "1 -\n2" parses "1 -\n2" - parses "def self./(); end;" parses "def self./(); end;" - says syntax error on "*1, a = 2" says syntax error on "*1, a = 2" - says syntax error on "foo { |select| }" says syntax error on "foo { |select| }" - parses "asm(\"nop\" :::: \"volatile\")" parses "asm(\"nop\" :::: \"volatile\")" - says syntax error on "a = 1; a += break" says syntax error on "a = 1; a += break" - parses "def foo(a, &block : -> Double); end" parses "def foo(a, &block : -> Double); end" - says syntax error on "foo { |case| }" says syntax error on "foo { |case| }" - parses "1 -2" parses "1 -2" - parses "x[{1}]" parses "x[{1}]" + parses "def foo(@@module); end" parses "def foo(@@module); end" + parses "(bar do\nend)" parses "(bar do\nend)" + parses "Foo(\"foo\": U, \"bar\": V)" parses "Foo(\"foo\": U, \"bar\": V)" + parses "a : Foo*" parses "a : Foo*" parses "def foo(&block : Int ->\n); end" parses "def foo(&block : Int ->\n); end" - says syntax error on "foo(foo(&.block)" says syntax error on "foo(foo(&.block)" - parses "macro foo;%var if true;end" parses "macro foo;%var if true;end" + says syntax error on "foo { |(private)| }" says syntax error on "foo { |(private)| }" + says syntax error on "macro Foo.bar;end" says syntax error on "macro Foo.bar;end" + parses "foo.%" parses "foo.%" + parses "enum Foo : UInt16; end" parses "enum Foo : UInt16; end" + parses "case 1\nin Int32.class; 2; end" parses "case 1\nin Int32.class; 2; end" + says syntax error on "lib Foo; fun foo(x : Int32, x : Int64); end" says syntax error on "lib Foo; fun foo(x : Int32, x : Int64); end" + parses "property break : Int32" parses "property break : Int32" + says syntax error on "return ^ 1" says syntax error on "return ^ 1" + parses "(foo bar do\nend)" parses "(foo bar do\nend)" + parses "def foo(def foo); end" parses "def foo(def foo); end" + parses "def foo(@@out); end" parses "def foo(@@out); end" + parses ":[]" parses ":[]" + parses "case / /\nwhen / /\n/ /\nelse\n/ /\nend" parses "case / /\nwhen / /\n/ /\nelse\n/ /\nend" + says syntax error on "foo { |(if)| }" says syntax error on "foo { |(if)| }" + parses "foo(bar do\nend)" parses "foo(bar do\nend)" + parses "def foo(var : Int32 -> = 1); end" parses "def foo(var : Int32 -> = 1); end" + says syntax error on "next <= 1" says syntax error on "next <= 1" + parses "next {1 => 2}" parses "next {1 => 2}" + parses "macro foo;%var unless true;end" parses "macro foo;%var unless true;end" + says syntax error on "foo &.&&" says syntax error on "foo &.&&" + parses "enum Foo; macro foo;end; end" parses "enum Foo; macro foo;end; end" + parses "foo(z: 0, a: n &* 2)" parses "foo(z: 0, a: n &* 2)" + parses "def foo(@protected); end" parses "def foo(@protected); end" parses "property return : Int32" parses "property return : Int32" - parses "{% begin %}%w[ %s ]{% end %}" parses "{% begin %}%w[ %s ]{% end %}" - parses "def foo(offsetof foo); end" parses "def foo(offsetof foo); end" - parses "def foo(x @@module); end" parses "def foo(x @@module); end" - parses "macro foo; bar class: 1; end" parses "macro foo; bar class: 1; end" - parses "{% begin %}%Q< %s >{% end %}" parses "{% begin %}%Q< %s >{% end %}" - parses "begin; 1; rescue; 2; else; 3; end" parses "begin; 1; rescue; 2; else; 3; end" - parses "def foo(@pointerof); end" parses "def foo(@pointerof); end" - parses "a ? 1\n : b ? 2\n : c ? 3\n : 0" parses "a ? 1\n : b ? 2\n : c ? 3\n : 0" - says syntax error on "*a, b, c, d = 1, 2" says syntax error on "*a, b, c, d = 1, 2" - parses "-1.0_f32" parses "-1.0_f32" - parses "foo(0, n &** 2)" parses "foo(0, n &** 2)" - says syntax error on "def foo(def); end" says syntax error on "def foo(def); end" - parses "{/ /, / /}" parses "{/ /, / /}" - parses ":**" parses ":**" - parses "def foo(x @require); end" parses "def foo(x @require); end" - says syntax error on "foo **bar, 1" says syntax error on "foo **bar, 1" - says syntax error on "def foo\nmodule\nend" says syntax error on "def foo\nmodule\nend" + parses "if foo.responds_to? :foo\nx = 1\nend" parses "if foo.responds_to? :foo\nx = 1\nend" + says syntax error on "def foo(foo nil); end" says syntax error on "def foo(foo nil); end" + parses "*a = 1, 2" parses "*a = 1, 2" + parses "def self.>(); end;" parses "def self.>(); end;" + parses "->Foo.>(Int32)" parses "->Foo.>(Int32)" + parses "x = 1; ->{ x }" parses "x = 1; ->{ x }" + says syntax error on "foo { |end| }" says syntax error on "foo { |end| }" + parses "foo(0, n + 2)" parses "foo(0, n + 2)" + says syntax error on "->() :Int32 { }" says syntax error on "->() :Int32 { }" + says syntax error on "return | 1" says syntax error on "return | 1" + parses "[\n1,2\n]" parses "[\n1,2\n]" + parses "1 ? 2 : 3" parses "1 ? 2 : 3" + parses "abstract def foo\n1" parses "abstract def foo\n1" + parses "n | 2" parses "n | 2" + parses "def foo(struct foo); end" parses "def foo(struct foo); end" + parses "is_a?(Const)" parses "is_a?(Const)" + parses "macro foo;%var;end" parses "macro foo;%var;end" + parses "def self.^; end;" parses "def self.^; end;" + parses "foo &.block[0]" parses "foo &.block[0]" + parses "macro foo;var unless true;end" parses "macro foo;var unless true;end" + parses "foo.>=(1, 2) { 3 }" parses "foo.>=(1, 2) { 3 }" + parses "1 .. 2" parses "1 .. 2" + says syntax error on "return * 1" says syntax error on "return * 1" + parses "foo(n // 2)" parses "foo(n // 2)" + parses "a = 1; yield a rescue a" parses "a = 1; yield a rescue a" + parses "foo.===" parses "foo.===" + parses "def &(); end;" parses "def &(); end;" + parses "-@@foo" parses "-@@foo" + parses "macro ===;end" parses "macro ===;end" + parses "def foo(@return); end" parses "def foo(@return); end" + parses "b.c &&= 1" parses "b.c &&= 1" + parses "{a: 1, b: 2}" parses "{a: 1, b: 2}" + parses "def foo(x @@asm); end" parses "def foo(x @@asm); end" + parses "foo if 3" parses "foo if 3" + says syntax error on "def foo(case); end" says syntax error on "def foo(case); end" + parses ":!" parses ":!" + parses "foo(a: n / 2)" parses "foo(a: n / 2)" + says syntax error on "case 1 == 1 a; when 2; end" says syntax error on "case 1 == 1 a; when 2; end" + parses "::foo" parses "::foo" + parses "foo.[0]" parses "foo.[0]" + parses "def /(); end;" parses "def /(); end;" + parses "->Foo.=~(Int32)" parses "->Foo.=~(Int32)" + parses "@a : Foo | Int32" parses "@a : Foo | Int32" + parses "a = b = 2" parses "a = b = 2" + parses "def self.~; end;" parses "def self.~; end;" + says syntax error on "foo { |(nil)| }" says syntax error on "foo { |(nil)| }" + parses "{% begin %}%{ %s }{% end %}" parses "{% begin %}%{ %s }{% end %}" + says syntax error on "Set {1, 2, 3} of Int32" says syntax error on "Set {1, 2, 3} of Int32" + parses "foo(z: 0, a: n &+ 2)" parses "foo(z: 0, a: n &+ 2)" + parses "{% begin %}%w< %s >{% end %}" parses "{% begin %}%w< %s >{% end %}" + parses "def /(); end;" parses "def /(); end;" + says syntax error on "+break" says syntax error on "+break" + parses "@@foo = 1" parses "@@foo = 1" + says syntax error on "<<-FOO\n1\nFOO.bar" says syntax error on "<<-FOO\n1\nFOO.bar" + parses "def self.<=; end;" parses "def self.<=; end;" + parses "def foo(var : Char[N]); end" parses "def foo(var : Char[N]); end" + says syntax error on "next[0]" says syntax error on "next[0]" + parses "{% a = 1 if 2 %}" parses "{% a = 1 if 2 %}" + says syntax error on "{{ {{ 1 }} }}" says syntax error on "{{ {{ 1 }} }}" says syntax error on "foo &.||" says syntax error on "foo &.||" - says syntax error on "x--" says syntax error on "x--" - says syntax error on "def foo\ndef\nend" says syntax error on "def foo\ndef\nend" - says syntax error on "foo.&&()" says syntax error on "foo.&&()" - parses "def foo(@true); end" parses "def foo(@true); end" - parses "foo do; 1; end" parses "foo do; 1; end" - parses "foo.< do end" parses "foo.< do end" - parses "def `(cmd); 1; end" parses "def `(cmd); 1; end" - parses "n > 2" parses "n > 2" - parses "x[a: 1, b: 2,]" parses "x[a: 1, b: 2,]" - parses "def foo(@@out); end" parses "def foo(@@out); end" - says syntax error on "case 1\nwhen Int32; 2; in 2" says syntax error on "case 1\nwhen Int32; 2; in 2" - says syntax error on "def self.nil?; end" says syntax error on "def self.nil?; end" - says syntax error on "{\n1 => 2, 3 => 4\n5 => 6}" says syntax error on "{\n1 => 2, 3 => 4\n5 => 6}" - parses "def foo(@[Foo] @[Bar] var : Int32); end" parses "def foo(@[Foo] @[Bar] var : Int32); end" - parses "foo(a: n === 2)" parses "foo(a: n === 2)" - says syntax error on "a += 1" says syntax error on "a += 1" - parses "def foo(@@lib); end" parses "def foo(@@lib); end" - parses "Foo({\"foo bar\": X})" parses "Foo({\"foo bar\": X})" - says syntax error on "require 1" says syntax error on "require 1" - parses "foo(1.., 2)" parses "foo(1.., 2)" - says syntax error on "{foo: 1, bar: 2\nbaz: 3}" says syntax error on "{foo: 1, bar: 2\nbaz: 3}" - parses "def foo\n1\nend\nif 1\nend" parses "def foo\n1\nend\nif 1\nend" - parses "def foo(x @next); end" parses "def foo(x @next); end" - sets correct location of global path in annotation sets correct location of global path in annotation - says syntax error on "foo { |(abstract)| }" says syntax error on "foo { |(abstract)| }" + parses "def foo(@out); end" parses "def foo(@out); end" + parses "a ? 1\n : b" parses "a ? 1\n : b" + parses "next;" parses "next;" + parses "def +(); end" parses "def +(); end" + parses "def foo(false foo); end" parses "def foo(false foo); end" + parses "def foo(@enum); end" parses "def foo(@enum); end" + parses "def ==(*args, **opts); end" parses "def ==(*args, **opts); end" + says syntax error on "def foo(fun); end" says syntax error on "def foo(fun); end" + says syntax error on "foo { |true| }" says syntax error on "foo { |true| }" + parses "foo &.@bar" parses "foo &.@bar" + parses "foo(z: 0, a: n >> 2)" parses "foo(z: 0, a: n >> 2)" + parses "1 == 2" parses "1 == 2" + parses "asm(\"nop\" :: \"b\"(1), \"c\"(2))" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2))" + parses "->Foo.foo?" parses "->Foo.foo?" + parses "def foo(@@abstract); end" parses "def foo(@@abstract); end" + says syntax error on "return - 1" says syntax error on "return - 1" + says syntax error on "macro foo" says syntax error on "macro foo" + says syntax error on "foo.||" says syntax error on "foo.||" + says syntax error on "A = begin; 1; rescue; 1; else; B = 1; end" says syntax error on "A = begin; 1; rescue; 1; else; B = 1; end" + parses "return" parses "return" + says syntax error on "x[1:-2]" says syntax error on "x[1:-2]" parses "macro x\n%{}\nend" parses "macro x\n%{}\nend" - parses "1.foo do; 1; end" parses "1.foo do; 1; end" - parses "def foo(@self); end" parses "def foo(@self); end" - parses "x : *T -> R" parses "x : *T -> R" - says syntax error on "self += 1" says syntax error on "self += 1" - parses "protected : Int32" parses "protected : Int32" - says syntax error on "def foo(foo false); end" says syntax error on "def foo(foo false); end" + says syntax error on "if 1\n foo 1,\nend" says syntax error on "if 1\n foo 1,\nend" + parses "begin\n1\nensure\n2\nend" parses "begin\n1\nensure\n2\nend" + says syntax error on "break % 1" says syntax error on "break % 1" + parses "1.~" parses "1.~" + parses "<<-HERE\nHello, mom! I am HERE.\nHER dress is beautiful.\nHE is OK.\n HERESY\nHERE" parses "<<-HERE\nHello, mom! I am HERE.\nHER dress is beautiful.\nHE is OK.\n HERESY\nHERE" + sets correct location of annotation in enum sets correct location of annotation in enum + parses "x = 1 ensure 2" parses "x = 1 ensure 2" + parses "1.[]=(2, 3)" parses "1.[]=(2, 3)" + says syntax error on "macro foo(**x, **y)" says syntax error on "macro foo(**x, **y)" + parses "foo { |(a, *b, c)| }" parses "foo { |(a, *b, c)| }" + parses "x[1, ..2]" parses "x[1, ..2]" + parses "foo(0, n | 2)" parses "foo(0, n | 2)" + parses "macro foo;unless %var;true;end;end" parses "macro foo;unless %var;true;end;end" + says syntax error on "foo { |(offsetof)| }" says syntax error on "foo { |(offsetof)| }" + parses "def foo(x @out); end" parses "def foo(x @out); end" + parses "\"\#{1\n}\"" parses "\"\#{1\n}\"" + parses "def self.foo\n1\nend" parses "def self.foo\n1\nend" + parses "1 == 2 == 3 == 4" parses "1 == 2 == 3 == 4" + says syntax error on "fun foo(Int32); end" says syntax error on "fun foo(Int32); end" + parses "def self./; end;" parses "def self./; end;" + parses "Foo({->})" parses "Foo({->})" + parses ":[]?" parses ":[]?" + parses "`foo\\``" parses "`foo\\``" + parses "extend : Int32" parses "extend : Int32" + parses "next : Int32" parses "next : Int32" + parses "{% begin %}%i| %s |{% end %}" parses "{% begin %}%i| %s |{% end %}" + says syntax error on "foo { |x, x| }" says syntax error on "foo { |x, x| }" + parses "f.x &+= 2" parses "f.x &+= 2" + says syntax error on "def foo(module); end" says syntax error on "def foo(module); end" + parses "foo &.each do\nend" parses "foo &.each do\nend" + parses "property struct : Int32" parses "property struct : Int32" + parses "a = 1; a ||= 1" parses "a = 1; a ||= 1" + parses "def self.!~; end;" parses "def self.!~; end;" + parses "foo %q" parses "foo %q" + says syntax error on "def foo(_ y); y; end" says syntax error on "def foo(_ y); y; end" + parses ":\"\\\\foo\"" parses ":\"\\\\foo\"" + parses "x[..2]" parses "x[..2]" + parses "asm(\"bl trap\" :::: \"unwind\")" parses "asm(\"bl trap\" :::: \"unwind\")" + parses "abstract def foo; 1" parses "abstract def foo; 1" + parses "foo &.each {\n}" parses "foo &.each {\n}" + parses "def []=(value); end" parses "def []=(value); end" + says syntax error on "def foo &block ; end" says syntax error on "def foo &block ; end" + parses "\"\"" parses "\"\"" + says syntax error on "def foo 1; end" says syntax error on "def foo 1; end" + says syntax error on "foo { |(a b)| }" says syntax error on "foo { |(a b)| }" + parses "def foo(x @@self); end" parses "def foo(x @@self); end" + parses "lib LibC\nfun SomeFun\nend" parses "lib LibC\nfun SomeFun\nend" + says syntax error on "foo &.&&()" says syntax error on "foo &.&&()" + parses "foo.bar=(*baz)" parses "foo.bar=(*baz)" + parses "def <<(); end" parses "def <<(); end" + says syntax error on "def foo(foo out); end" says syntax error on "def foo(foo out); end" + parses "def %; end;" parses "def %; end;" + parses "asm(\"nop\" \n)" parses "asm(\"nop\" \n)" + parses "->Foo::Bar::Baz.foo" parses "->Foo::Bar::Baz.foo" + parses "x[a: 1, b: 2,]" parses "x[a: 1, b: 2,]" + says syntax error on "1 if return" says syntax error on "1 if return" + parses "*a, b = 1, 2, 3, 4" parses "*a, b = 1, 2, 3, 4" + parses "a = 1; a/b" parses "a = 1; a/b" + parses "foo &.[0]" parses "foo &.[0]" + parses "foo\n\n .bar" parses "foo\n\n .bar" + parses "Foo::Bar?" parses "Foo::Bar?" + parses "{1 =>\n2, 3 =>\n4}" parses "{1 =>\n2, 3 =>\n4}" + parses "def foo(x @instance_sizeof); end" parses "def foo(x @instance_sizeof); end" + parses "Foo(T)" parses "Foo(T)" + parses "foo(0, n >> 2)" parses "foo(0, n >> 2)" + parses "foo.bar(1, 2) { 3 }" parses "foo.bar(1, 2) { 3 }" + says syntax error on "break when true" says syntax error on "break when true" + parses "def foo(\nvar); end" parses "def foo(\nvar); end" + parses "lib LibC; type A = B**; end" parses "lib LibC; type A = B**; end" + parses "<<-HERE\n One\n \n Zero\n HERE" parses "<<-HERE\n One\n \n Zero\n HERE" + parses "<<-HERE\n foo\#{1}bar\n baz\n HERE" parses "<<-HERE\n foo\#{1}bar\n baz\n HERE" + parses "def !~(); end;" parses "def !~(); end;" + says syntax error on "a = break" says syntax error on "a = break" + says syntax error on "foo { |(self)| }" says syntax error on "foo { |(self)| }" + parses "foo 1\n" parses "foo 1\n" + says syntax error on "{1, ->do\n|x| x\end }" says syntax error on "{1, ->do\n|x| x\end }" + parses "{{ foo }}" parses "{{ foo }}" + parses "(bar {})" parses "(bar {})" + parses "foo(n ** 2)" parses "foo(n ** 2)" + says syntax error on "foo { |return| }" says syntax error on "foo { |return| }" + parses "{% a = 1 %}" parses "{% a = 1 %}" + parses "def foo(x @@def); end" parses "def foo(x @@def); end" + parses "a.foo &block" parses "a.foo &block" + parses "def /; end;" parses "def /; end;" + says syntax error on "foo { |abstract| }" says syntax error on "foo { |abstract| }" + parses "1 / 2" parses "1 / 2" + parses "foo(x, *bar, *baz, y)" parses "foo(x, *bar, *baz, y)" + parses "def foo(x @@instance_sizeof); end" parses "def foo(x @@instance_sizeof); end" + sets correct location of splat in multiple assignment sets correct location of splat in multiple assignment + parses "<<-HERE1; <<-HERE2\nHERE1\nHERE2" parses "<<-HERE1; <<-HERE2\nHERE1\nHERE2" + parses "def foo; with a yield; end" parses "def foo; with a yield; end" + parses "1 +\n2" parses "1 +\n2" + says syntax error on "def foo(foo typeof); end" says syntax error on "def foo(foo typeof); end" + parses "a; unless / /; / /; else; / /; end" parses "a; unless / /; / /; else; / /; end" + parses "{% begin %}%r|\\A|{% end %}" parses "{% begin %}%r|\\A|{% end %}" + parses "def foo(@@if); end" parses "def foo(@@if); end" + parses "a.foo, a.bar = 1, 2" parses "a.foo, a.bar = 1, 2" + parses "def foo(@[Foo] var); end" parses "def foo(@[Foo] var); end" + parses "foo./ 1, 2" parses "foo./ 1, 2" + parses ":!~" parses ":!~" + parses "foo\n #comment\n .bar" parses "foo\n #comment\n .bar" + parses "Foo(X: U, Y: V)" parses "Foo(X: U, Y: V)" + parses "foo a: 1, b: 2" parses "foo a: 1, b: 2" + says syntax error on "def foo(foo self); end" says syntax error on "def foo(foo self); end" parses "/=/" parses "/=/" - says syntax error on " (1, 2, 3 end" says syntax error on " (1, 2, 3 end" - says syntax error on "next < 1" says syntax error on "next < 1" - says syntax error on "def self.is_a?; end" says syntax error on "def self.is_a?; end" - parses "include Foo" parses "include Foo" - parses "Foo(\nx:\nT,\ny:\nU,\n)" parses "Foo(\nx:\nT,\ny:\nU,\n)" - parses "class Foo(*T); end" parses "class Foo(*T); end" - parses "property require : Int32" parses "property require : Int32" - parses "require \"foo\"; [1]" parses "require \"foo\"; [1]" - says syntax error on "if return; end" says syntax error on "if return; end" - parses "next {1 => 2}" parses "next {1 => 2}" - parses "Set(Int32) {1, 2, 3}" parses "Set(Int32) {1, 2, 3}" - parses "x.y=(1).to_s" parses "x.y=(1).to_s" - parses "def self.**; end;" parses "def self.**; end;" - says syntax error on "def foo(foo def); end" says syntax error on "def foo(foo def); end" + says syntax error on "return .. 1" says syntax error on "return .. 1" + parses "a.b **=\n1" parses "a.b **=\n1" parses "foo.|(1, 2)" parses "foo.|(1, 2)" - parses "foo !false" parses "foo !false" - parses "next *1, 2" parses "next *1, 2" - parses "foo.=~(1, 2) { 3 }" parses "foo.=~(1, 2) { 3 }" - parses "foo = 1; ->foo.%(Int32)" parses "foo = 1; ->foo.%(Int32)" - says syntax error on "x { |*a, *b| }" says syntax error on "x { |*a, *b| }" - parses "while : Int32" parses "while : Int32" - parses "lib LibC; Foo = 1; end" parses "lib LibC; Foo = 1; end" - parses "def foo(var : (Int, Float) -> Double); end" parses "def foo(var : (Int, Float) -> Double); end" - says syntax error on "{\n}" says syntax error on "{\n}" - parses "->() { }" parses "->() { }" - parses "a : Foo | Int32" parses "a : Foo | Int32" - parses "def foo(x @@select); end" parses "def foo(x @@select); end" - parses "macro foo;%var{1, x} = hello;end" parses "macro foo;%var{1, x} = hello;end" - parses "foo.==" parses "foo.==" - parses "->Foo.&**(Int32)" parses "->Foo.&**(Int32)" - parses "1.as(\n Int32\n)" parses "1.as(\n Int32\n)" - parses "def foo(**args)\nargs\nend" parses "def foo(**args)\nargs\nend" - says syntax error on "if 1\n foo 1,\nend" says syntax error on "if 1\n foo 1,\nend" - parses "a, b, *c = 1, 2" parses "a, b, *c = 1, 2" - parses "{{ foo &.nil? }}" parses "{{ foo &.nil? }}" - says syntax error on "def foo(foo fun); end" says syntax error on "def foo(foo fun); end" - parses "->::Foo.foo=" parses "->::Foo.foo=" - parses "+1.0_f32" parses "+1.0_f32" - parses "foo(n &** 2)" parses "foo(n &** 2)" - parses "enum Foo; A\nB; C\nD = 1; end" parses "enum Foo; A\nB; C\nD = 1; end" - parses "property elsif : Int32" parses "property elsif : Int32" - parses "[\n1,2\n]" parses "[\n1,2\n]" - says syntax error on "asm(\"\" : 1)" says syntax error on "asm(\"\" : 1)" - says syntax error on "def foo(if); end" says syntax error on "def foo(if); end" - parses "def foo(var : self.class); end" parses "def foo(var : self.class); end" - parses "foo(z: 0, a: n === 2)" parses "foo(z: 0, a: n === 2)" - parses "module Foo\ndef foo; end; end" parses "module Foo\ndef foo; end; end" - parses "a = b = 2" parses "a = b = 2" - parses "foo %r()" parses "foo %r()" - parses "def foo(&\n); end" parses "def foo(&\n); end" - parses "def self./(); end;" parses "def self./(); end;" - says syntax error on "return do\nend" says syntax error on "return do\nend" + parses "def foo; yield; end" parses "def foo; yield; end" + parses "foo(a: 1\n)" parses "foo(a: 1\n)" + says syntax error on "return / 1" says syntax error on "return / 1" + parses "def self.-(); end;" parses "def self.-(); end;" parses "def foo(**args : Foo)\n1\nend" parses "def foo(**args : Foo)\n1\nend" - says syntax error on "break + 1" says syntax error on "break + 1" - parses "1 +2_i64" parses "1 +2_i64" - parses "def foo; a = 1; x { a }; end" parses "def foo; a = 1; x { a }; end" - parses "foo.=== 1, 2" parses "foo.=== 1, 2" - parses "macro foo\n <<-FOO, <<-BAR + \"\"\n FOO\n BAR\nend" parses "macro foo\n <<-FOO, <<-BAR + \"\"\n FOO\n BAR\nend" - says syntax error on "A = begin; 1; rescue; 1; else; B = 1; end" says syntax error on "A = begin; 1; rescue; 1; else; B = 1; end" - says syntax error on "case 1\nin .nil?; 2" says syntax error on "case 1\nin .nil?; 2" - parses "def >=(*args, **opts, &); end" parses "def >=(*args, **opts, &); end" - parses "Foo(\"foo\": U, \"bar\": V)" parses "Foo(\"foo\": U, \"bar\": V)" - parses "2**3**4" parses "2**3**4" - parses "macro foo(@[Foo] outer inner);end" parses "macro foo(@[Foo] outer inner);end" - parses "def self.==(); end;" parses "def self.==(); end;" - parses "break *1" parses "break *1" - parses "call(foo.as Bar, Baz)" parses "call(foo.as Bar, Baz)" - parses "def foo(x, *args, y = 2); 1; end" parses "def foo(x, *args, y = 2); 1; end" - parses "{1}" parses "{1}" - parses "1 * 2" parses "1 * 2" - parses "def foo(@@pointerof); end" parses "def foo(@@pointerof); end" - parses "def foo=(value); end" parses "def foo=(value); end" + parses "a = 1; a <<= 1" parses "a = 1; a <<= 1" + parses "macro <<;end" parses "macro <<;end" + parses "macro *;end" parses "macro *;end" + parses "\"hello \"\\\r\n\"world\"" parses "\"hello \"\\\r\n\"world\"" + parses "foo.-" parses "foo.-" + parses "def foo(@sizeof); end" parses "def foo(@sizeof); end" + parses "foo(a: n > 2)" parses "foo(a: n > 2)" + parses "def foo(**args)\n1\nend" parses "def foo(**args)\n1\nend" + parses "macro foo\n\"\\'\"\nend" parses "macro foo\n\"\\'\"\nend" + parses "<<-HERE\r\n One\r\n Zero\r\n HERE" parses "<<-HERE\r\n One\r\n Zero\r\n HERE" + parses "(a;\nb)" parses "(a;\nb)" + parses "[..2]" parses "[..2]" + parses "::A::B" parses "::A::B" + parses "f.x &-= 2" parses "f.x &-= 2" + says syntax error on "foo { |struct| }" says syntax error on "foo { |struct| }" + says syntax error on "next[]" says syntax error on "next[]" + says syntax error on "break[0]= 1" says syntax error on "break[0]= 1" + parses "ensure : Int32" parses "ensure : Int32" + parses "foo(0, n * 2)" parses "foo(0, n * 2)" + parses "def []; end" parses "def []; end" + parses "if (\ntrue\n)\n1\nend" parses "if (\ntrue\n)\n1\nend" + parses "property unless : Int32" parses "property unless : Int32" + parses "def foo(x @@out); end" parses "def foo(x @@out); end" + parses "foo(&.as?(T))" parses "foo(&.as?(T))" + parses "{% for _, x, _ in y %}body{% end %}" parses "{% for _, x, _ in y %}body{% end %}" + parses "/ hi /" parses "/ hi /" + says syntax error on "def foo(foo pointerof); end" says syntax error on "def foo(foo pointerof); end" + parses "property end : Int32" parses "property end : Int32" + says syntax error on "def foo(foo instance_sizeof); end" says syntax error on "def foo(foo instance_sizeof); end" + parses "def foo(&@block); end" parses "def foo(&@block); end" + parses "foo { |(_, c)| c }" parses "foo { |(_, c)| c }" + parses "f.x -= 2" parses "f.x -= 2" + parses ":+" parses ":+" + parses "def foo(x @enum); end" parses "def foo(x @enum); end" + parses "call foo : A, end : B" parses "call foo : A, end : B" + says syntax error on " [1, 2, 3 end" says syntax error on " [1, 2, 3 end" + parses "select\nwhen foo\n2\nwhen bar\n4\nend" parses "select\nwhen foo\n2\nwhen bar\n4\nend" + parses "begin; 1; rescue ::Foo | ::Bar; 2; end" parses "begin; 1; rescue ::Foo | ::Bar; 2; end" + says syntax error on "fun Foo : Int64\nend" says syntax error on "fun Foo : Int64\nend" + says syntax error on "break.as(Int32)" says syntax error on "break.as(Int32)" + parses "macro foo;bar{% if x %}body{% else %}body2{%end%}baz;end" parses "macro foo;bar{% if x %}body{% else %}body2{%end%}baz;end" + parses "lib LibC; type A = B*; end" parses "lib LibC; type A = B*; end" + parses "next if true" parses "next if true" + parses "def foo(@@nil); end" parses "def foo(@@nil); end" + parses "<<-FOO\n \t 1\n \t FOO" parses "<<-FOO\n \t 1\n \t FOO" + parses "def foo(x @@false); end" parses "def foo(x @@false); end" + parses "macro : Int32" parses "macro : Int32" + parses "return 1.bar do\nend" parses "return 1.bar do\nend" + says syntax error on "*a" says syntax error on "*a" + parses "begin\n1\nend\nif true; end" parses "begin\n1\nend\nif true; end" + parses "def foo(a); a; end" parses "def foo(a); a; end" + parses "def foo(x @next); end" parses "def foo(x @next); end" + parses "def foo(x : U) : Int32 forall T, U; end" parses "def foo(x : U) : Int32 forall T, U; end" + parses "typeof(a = 1); a" parses "typeof(a = 1); a" + parses "/\\ /" parses "/\\ /" + parses "%x(`which(foo)`)" parses "%x(`which(foo)`)" + says syntax error on "def foo\nmodule\nend" says syntax error on "def foo\nmodule\nend" + parses "Set(Int32) {1, 2, 3}" parses "Set(Int32) {1, 2, 3}" + parses "return 1 if true" parses "return 1 if true" + parses "def foo(a, &block : Int -> Double); end" parses "def foo(a, &block : Int -> Double); end" + says syntax error on "Foo(T, x: U)" says syntax error on "Foo(T, x: U)" + parses "foo(0, n &+ 2)" parses "foo(0, n &+ 2)" + says syntax error on "yield return" says syntax error on "yield return" + says syntax error on "<<-HERE\n One\n \#{1}\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n HERE" + parses "a, b = 1, 2" parses "a, b = 1, 2" + parses "abstract class Foo; end" parses "abstract class Foo; end" + parses "macro ~;end" parses "macro ~;end" + parses "foo { |a, b, | 1 }" parses "foo { |a, b, | 1 }" + says syntax error on "foo { |(next)| }" says syntax error on "foo { |(next)| }" + parses "n >= 2" parses "n >= 2" + parses "select\nwhen foo\n2\nend" parses "select\nwhen foo\n2\nend" + parses "-1_i64" parses "-1_i64" + parses "foo 1;" parses "foo 1;" + says syntax error on "break[0]" says syntax error on "break[0]" + parses "def foo(select foo); end" parses "def foo(select foo); end" + says syntax error on "next > 1" says syntax error on "next > 1" + parses "class Foo\ndef foo; end; end" parses "class Foo\ndef foo; end; end" + parses "def foo(x @private); end" parses "def foo(x @private); end" + parses "def foo(\nvar\n); end" parses "def foo(\nvar\n); end" + parses "enum : Int32" parses "enum : Int32" + parses "require \"foo\"" parses "require \"foo\"" + parses "n >> 2" parses "n >> 2" + says syntax error on "@foo :: Foo" says syntax error on "@foo :: Foo" + parses "foo(0, n <= 2)" parses "foo(0, n <= 2)" + parses "extend Foo\nif true; end" parses "extend Foo\nif true; end" + parses "1.!(\n)" parses "1.!(\n)" + parses "%r(\\/)" parses "%r(\\/)" + parses "def foo(@@in); end" parses "def foo(@@in); end" + says syntax error on "a, b, *c, d = 1, 2" says syntax error on "a, b, *c, d = 1, 2" + parses "protected def foo; end" parses "protected def foo; end" + parses "foo = 1; foo(-1)" parses "foo = 1; foo(-1)" + parses "def foo(x)\n x\nend; foo = 1; b = 2; foo +b" parses "def foo(x)\n x\nend; foo = 1; b = 2; foo +b" + says syntax error on "def foo(x :Int32); end" says syntax error on "def foo(x :Int32); end" + parses "def foo(@var); end" parses "def foo(@var); end" + says syntax error on "Hash {foo: 1} of Int32 => Int32" says syntax error on "Hash {foo: 1} of Int32 => Int32" + parses "def &(); end" parses "def &(); end" + parses "def foo; end" parses "def foo; end" + says syntax error on " {1 => end" says syntax error on " {1 => end" + parses "def ==; end;" parses "def ==; end;" + parses "a, b = 1" parses "a, b = 1" + says syntax error on "Foo(x: T y: U)" says syntax error on "Foo(x: T y: U)" + parses "def foo(x @self); end" parses "def foo(x @self); end" + parses "[1, 2]" parses "[1, 2]" + parses "foo(z: 0, a: n << 2)" parses "foo(z: 0, a: n << 2)" + says syntax error on "1 until 3" says syntax error on "1 until 3" + parses "def []=(*args, **opts, &); end" parses "def []=(*args, **opts, &); end" + says syntax error on "def foo(**a foo); end" says syntax error on "def foo(**a foo); end" + parses ":!=" parses ":!=" + says syntax error on "def Foo(Int32).bar;end" says syntax error on "def Foo(Int32).bar;end" + parses "def foo(x @struct); end" parses "def foo(x @struct); end" + parses "foo(0, n / 2)" parses "foo(0, n / 2)" + parses "foo(a: n &** 2)" parses "foo(a: n &** 2)" + parses "Foo(x: U, y: V)" parses "Foo(x: U, y: V)" + parses "foo = 1; foo a: 1" parses "foo = 1; foo a: 1" + parses "{1.. => 2};" parses "{1.. => 2};" + says syntax error on "{1 2}" says syntax error on "{1 2}" + parses "def foo(sizeof foo); end" parses "def foo(sizeof foo); end" + parses "1 ? a : b ? c : 3" parses "1 ? a : b ? c : 3" + says syntax error on "break ** 1" says syntax error on "break ** 1" + says syntax error on "macro foo(\"\" y); end" says syntax error on "macro foo(\"\" y); end" + parses "foo(a: 1, b: 2)" parses "foo(a: 1, b: 2)" + says syntax error on "class Foo; require \"bar\"; end" says syntax error on "class Foo; require \"bar\"; end" + says syntax error on "1 as? Bar" says syntax error on "1 as? Bar" + says syntax error on "def foo(next); end" says syntax error on "def foo(next); end" + parses "def foo; a = 1; a; end" parses "def foo; a = 1; a; end" + parses ":==" parses ":==" + says syntax error on "asm(\"nop\" :::: \"\#{volatile}\")" says syntax error on "asm(\"nop\" :::: \"\#{volatile}\")" + says syntax error on "break - 1" says syntax error on "break - 1" + parses "def foo(@@macro); end" parses "def foo(@@macro); end" + parses "/fo\\so/" parses "/fo\\so/" + parses "macro foo;if var;true;end;end" parses "macro foo;if var;true;end;end" + parses "-> { }" parses "-> { }" + parses "def foo(x @@class); end" parses "def foo(x @@class); end" + says syntax error on "def foo(foo end); end" says syntax error on "def foo(foo end); end" + says syntax error on "\"\#{<<-HERE}\"\nHERE" says syntax error on "\"\#{<<-HERE}\"\nHERE" + says syntax error on "foo { |(until)| }" says syntax error on "foo { |(until)| }" + parses "def +; end;" parses "def +; end;" + says syntax error on "foo.||()" says syntax error on "foo.||()" + says syntax error on "next &** 1" says syntax error on "next &** 1" Crystal::Repl::Interpreter - math - interprets Float32 + Float64 interprets Float32 + Float64 - interprets Int32 + Float64 interprets Int32 + Float64 - interprets UInt8 | Int32 interprets UInt8 | Int32 - interprets UInt64 | UInt32 interprets UInt64 | UInt32 - interprets Int32.unsafe_shl(Int32) with self interprets Int32.unsafe_shl(Int32) with self - interprets Int8 + Int8 interprets Int8 + Int8 - interprets UInt32 - Int32 interprets UInt32 - Int32 - interprets Int32 + Int32 interprets Int32 + Int32 - interprets UInt64 * Int32 interprets UInt64 * Int32 - interprets Float64 * Float64 interprets Float64 * Float64 - interprets Int32 * Int32 interprets Int32 * Int32 - interprets Int128 + Int32 interprets Int128 + Int32 - interprets Int32 &- Int32 interprets Int32 &- Int32 - interprets Float64 + Float64 interprets Float64 + Float64 - interprets Int32 &* Int32 interprets Int32 &* Int32 - interprets Int64 + Int64 interprets Int64 + Int64 - interprets Float64 - Float64 interprets Float64 - Float64 - discards math discards math - interprets Float64 + Int32 interprets Float64 + Int32 - interprets UInt64 & Int32 interprets UInt64 & Int32 - interprets Int32 &+ Int32 interprets Int32 &+ Int32 - interprets Int32 - Int32 interprets Int32 - Int32 - comparisons - interprets Bool != Bool (false) interprets Bool != Bool (false) - interprets Int32 < Int32 interprets Int32 < Int32 - interprets Int32 > Float64 (false) interprets Int32 > Float64 (false) - interprets UInt32 < Int32 (false) interprets UInt32 < Int32 (false) - interprets UInt64 < Int32 (false, right is less than zero) interprets UInt64 < Int32 (false, right is less than zero) - interprets UInt64 != Int32 (true) interprets UInt64 != Int32 (true) - discards comparison discards comparison - interprets UInt64 > UInt32 (false) interprets UInt64 > UInt32 (false) - interprets UInt64 < Int32 (false, right is greater than zero) interprets UInt64 < Int32 (false, right is greater than zero) - interprets Float64 < Int32 interprets Float64 < Int32 - interprets Int32 != Int32 (false) interprets Int32 != Int32 (false) - interprets Float64 fdiv Float32 interprets Float64 fdiv Float32 - interprets UInt32 < Int32 (true) interprets UInt32 < Int32 (true) - interprets Float32 / Int32 interprets Float32 / Int32 - interprets UInt64 == Int32 (true when Int32 >= 0) interprets UInt64 == Int32 (true when Int32 >= 0) - interprets Int32 == Float64 (false) interprets Int32 == Float64 (false) - interprets UInt64 == Int32 (false when Int32 < 0) interprets UInt64 == Int32 (false when Int32 < 0) - interprets Int128 == Int128 (true) interprets Int128 == Int128 (true) - interprets Int32 == UInt64 (false) interprets Int32 == UInt64 (false) - interprets Bool == Bool (false) interprets Bool == Bool (false) - interprets Int32 < Float64 interprets Int32 < Float64 - interprets Bool == Bool (true) interprets Bool == Bool (true) - interprets Int32 == Float64 (true) interprets Int32 == Float64 (true) - 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 Float32 / Float32 interprets Float32 / Float32 - interprets UInt64 > UInt32 (true) interprets UInt64 > UInt32 (true) - interprets Bool != Bool (true) interprets Bool != Bool (true) - interprets UInt8 < Int32 (true, right is greater than zero) interprets UInt8 < Int32 (true, right is greater than zero) - interprets Int32 != UInt64 (false) interprets Int32 != UInt64 (false) - interprets Int32 != Int32 (true) interprets Int32 != Int32 (true) - interprets UInt8 < Int32 (false, right is greater than zero) interprets UInt8 < Int32 (false, right is greater than zero) - interprets Int128 == Int128 (false) interprets Int128 == Int128 (false) - interprets Int32 > Float64 (true) interprets Int32 > Float64 (true) - interprets Char == Char (true) interprets Char == Char (true) - interprets UInt64 == Int32 (false when Int32 >= 0) interprets UInt64 == Int32 (false when Int32 >= 0) - interprets Int32 == Int32 (true) interprets Int32 == Int32 (true) - interprets Char == Char (false) interprets Char == Char (false) - interprets Float64 / Float64 interprets Float64 / Float64 - interprets Int32 != UInt64 (true) interprets Int32 != UInt64 (true) - interprets UInt8 < Int32 (false, right is less than zero) interprets UInt8 < Int32 (false, right is less than zero) - interprets UInt64.unsafe_mod(UInt64) interprets UInt64.unsafe_mod(UInt64) - interprets Float32 fdiv Float64 interprets Float32 fdiv Float64 - interprets UInt64 != Int32 (false) interprets UInt64 != Int32 (false) - interprets Int32 == UInt64 (true) interprets Int32 == UInt64 (true) - interprets Float64 < Float64 interprets Float64 < Float64 - local variables - interprets variable set and get, second local var interprets variable set and get, second local var - interprets uninitialized interprets uninitialized - doesn't discard underscore right hand side doesn't discard underscore right hand side - interprets variable set with type restriction (#13023) interprets variable set with type restriction (#13023) - interprets variable set and get interprets variable set and get - doesn't declare variable with no type inside method doesn't declare variable with no type inside method - assigns to underscore assigns to underscore - interprets variable set interprets variable set - interprets local variable declaration (#12229) interprets local variable declaration (#12229) - interprets at the class level interprets at the class level - interprets variable set and get with operations interprets variable set and get with operations - doesn't declare variable with no type doesn't declare variable with no type - overflow - + - overlows on 1_i64 + 9223372036854775807_i64 overlows on 1_i64 + 9223372036854775807_i64 - overlows on 1_u64 + 18446744073709551615_u64 overlows on 1_u64 + 18446744073709551615_u64 - overlows on 1_u32 + 4294967295_i64 overlows on 1_u32 + 4294967295_i64 - overlows on 1_u8 + 255 overlows on 1_u8 + 255 - overlows on 1_i8 + 128 overlows on 1_i8 + 128 - overlows on 1 + 2147483647 overlows on 1 + 2147483647 - overlows on 1_u16 + 65535 overlows on 1_u16 + 65535 - overlows on 1_i16 + 32767 overlows on 1_i16 + 32767 - - - overlows on 1_u16 - 2 overlows on 1_u16 - 2 - overlows on 1_i8 - 256 overlows on 1_i8 - 256 - overlows on 1_i16 - 32770 overlows on 1_i16 - 32770 - overlows on 1_u8 - 2 overlows on 1_u8 - 2 - overlows on 1_u32 - 2 overlows on 1_u32 - 2 - overlows on 1_i64 - 9223372036854775810_u64 overlows on 1_i64 - 9223372036854775810_u64 - overlows on 1_u64 - 2 overlows on 1_u64 - 2 - overlows on 1 - 2147483650_i64 overlows on 1 - 2147483650_i64 - conversion - overlows on -1_i8.to_u8 overlows on -1_i8.to_u8 - overlows on -1_i64.to_u8 overlows on -1_i64.to_u8 - overlows on 65536_f64.to_u16 overlows on 65536_f64.to_u16 - overlows on 9223372036854775808_u64.to_i64 overlows on 9223372036854775808_u64.to_i64 - overlows on 128_f64.to_i8 overlows on 128_f64.to_i8 - overlows on 32768_f64.to_i16 overlows on 32768_f64.to_i16 - overlows on -1_i64.to_u64 overlows on -1_i64.to_u64 - overlows on -1.to_u32 overlows on -1.to_u32 - overlows on -1.to_u16 overlows on -1.to_u16 - overlows on 256_f32.to_u8 overlows on 256_f32.to_u8 - overlows on 128_u16.to_i8 overlows on 128_u16.to_i8 - overlows on 32768_u16.to_i16 overlows on 32768_u16.to_i16 - overlows on -1.to_u8 overlows on -1.to_u8 - overlows on 32768_u64.to_i16 overlows on 32768_u64.to_i16 - overlows on 4294967296_f64.to_u32 overlows on 4294967296_f64.to_u32 - overlows on 128_u32.to_i8 overlows on 128_u32.to_i8 - 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 2147483648_u32.to_i32 overlows on 2147483648_u32.to_i32 - overlows on 65536_f32.to_u16 overlows on 65536_f32.to_u16 - overlows on -1_i64.to_u32 overlows on -1_i64.to_u32 - overlows on 1.7976931348623157e+308.to_f32 overlows on 1.7976931348623157e+308.to_f32 - overlows on -1_i8.to_u64 overlows on -1_i8.to_u64 - overlows on -1_i8.to_u32 overlows on -1_i8.to_u32 - overlows on -1.to_u64 overlows on -1.to_u64 - overlows on 128_u8.to_i8 overlows on 128_u8.to_i8 - overlows on -1_i16.to_u32 overlows on -1_i16.to_u32 - overlows on 256_f64.to_u8 overlows on 256_f64.to_u8 - overlows on -1_i16.to_u64 overlows on -1_i16.to_u64 - overlows on -1_i16.to_u8 overlows on -1_i16.to_u8 - overlows on 32768_f32.to_i16 overlows on 32768_f32.to_i16 - overlows on 2147483648_f64.to_i32 overlows on 2147483648_f64.to_i32 - overlows on 32768_u32.to_i16 overlows on 32768_u32.to_i16 - overlows on -1_i16.to_u16 overlows on -1_i16.to_u16 - overlows on 128_u64.to_i8 overlows on 128_u64.to_i8 - overlows on -1_i64.to_u16 overlows on -1_i64.to_u16 - overlows on 2147483648_u64.to_i32 overlows on 2147483648_u64.to_i32 - * - overlows on 20_u64 * 1844674407370955161_i64 overlows on 20_u64 * 1844674407370955161_i64 - overlows on 10_u8 * 26 overlows on 10_u8 * 26 - overlows on 10_u16 * 6600 overlows on 10_u16 * 6600 - overlows on 10_i8 * 14 overlows on 10_i8 * 14 - overlows on 20 * 214748364 overlows on 20 * 214748364 - overlows on 10_i16 * 3300 overlows on 10_i16 * 3300 - overlows on 20_i64 * 922337203685477580_i64 overlows on 20_i64 * 922337203685477580_i64 - overlows on 20_u32 * 429496729 overlows on 20_u32 * 429496729 - literals - interprets an UInt128 interprets an UInt128 - interprets a Float32 interprets a Float32 - interprets a Float64 interprets a Float64 - interprets an Int64 interprets an Int64 - interprets an Int32 interprets an Int32 - interprets an UInt16 interprets an UInt16 - interprets a String literal interprets a String literal - uses a string pool uses a string pool - interprets an UInt32 interprets an UInt32 - interprets a char interprets a char - interprets an UInt64 interprets an UInt64 - interprets a bool (false) interprets a bool (false) - interprets nil interprets nil - interprets an UInt8 interprets an UInt8 - interprets an Int8 interprets an Int8 - interprets a bool (true) interprets a bool (true) - interprets an Int128 interprets an Int128 - interprets an Int16 interprets an Int16 - precomputes string literal length precomputes string literal length - logical operations - interprets not for generic module metaclass interprets not for generic module metaclass - interprets not for nilable type (true) interprets not for nilable type (true) - interprets not for generic module interprets not for generic module - interprets not for module (#12918) interprets not for module (#12918) - interprets not for nilable proc type (false) interprets not for nilable proc type (false) - interprets not for nilable type (false) interprets not for nilable type (false) - interprets not for bool true interprets not for bool true - interprets not for nilable type (true) interprets not for nilable type (true) - interprets not for nilable proc type (true) interprets not for nilable proc type (true) - interprets not for mixed union (true) interprets not for mixed union (true) - interprets not for nil type interprets not for nil type - interprets not for nil interprets not for nil - interprets not for bool false interprets not for bool false - interprets not for generic class instance metaclass interprets not for generic class instance metaclass - does math convert on union does math convert on union - discards nil not discards nil not - does math primitive on union does math primitive on union - interprets not for mixed union (nil) interprets not for mixed union (nil) - interprets not for bool false interprets not for bool false - interprets not for generic class instance type interprets not for generic class instance type - interprets not for mixed union (false) interprets not for mixed union (false) - discards bool not discards bool not - interprets not for nilable type (false) interprets not for nilable type (false) - interprets not for mixed union (other) interprets not for mixed union (other) - conversion - interprets Int64::MIN#to_f32! interprets Int64::MIN#to_f32! - interprets Float64#to_i16! (positive) interprets Float64#to_i16! (positive) - interprets Int16::MIN#to_i64! interprets Int16::MIN#to_i64! - interprets Int8::MAX#to_u64! interprets Int8::MAX#to_u64! - interprets Int64::MAX#to_u8! interprets Int64::MAX#to_u8! - interprets Float32#to_i16! (positive) interprets Float32#to_i16! (positive) - interprets Int32::MAX#to_f64! interprets Int32::MAX#to_f64! - interprets UInt32::MAX#to_u8! interprets UInt32::MAX#to_u8! - discards conversion with local var discards conversion with local var - interprets Float32#to_i64! (negative) interprets Float32#to_i64! (negative) - interprets Int64::MAX#to_u16! interprets Int64::MAX#to_u16! - interprets Float32#to_i32! (negative) interprets Float32#to_i32! (negative) - interprets UInt64::MAX#to_i! interprets UInt64::MAX#to_i! - interprets Float64#to_f64! (positive) interprets Float64#to_f64! (positive) - interprets Int8::MAX#to_f32! interprets Int8::MAX#to_f32! - interprets UInt16::MAX#to_u64! interprets UInt16::MAX#to_u64! - interprets Float64#to_u8! (positive) interprets Float64#to_u8! (positive) - interprets Int16::MAX#to_i8! interprets Int16::MAX#to_i8! - interprets Int8::MAX#to_i16! interprets Int8::MAX#to_i16! - interprets Int32::MIN#to_i32! interprets Int32::MIN#to_i32! - discards conversion discards conversion - interprets UInt8::MAX#to_i16! interprets UInt8::MAX#to_i16! - interprets Int32::MAX#to_i32! interprets Int32::MAX#to_i32! - interprets Float64#to_i! (negative) interprets Float64#to_i! (negative) - interprets Int8::MIN#to_f64! interprets Int8::MIN#to_f64! - interprets Int8::MIN#to_i16! interprets Int8::MIN#to_i16! - interprets Float32#to_i16! (negative) interprets Float32#to_i16! (negative) - interprets UInt32::MAX#to_u16! interprets UInt32::MAX#to_u16! - interprets Int16::MAX#to_f32! interprets Int16::MAX#to_f32! - interprets UInt64::MAX#to_u8! interprets UInt64::MAX#to_u8! - interprets Int32::MIN#to_u! interprets Int32::MIN#to_u! - interprets Int16::MIN#to_u64! interprets Int16::MIN#to_u64! - interprets Int16::MIN#to_i8! interprets Int16::MIN#to_i8! - interprets Int16::MIN#to_i! interprets Int16::MIN#to_i! - interprets Float32#to_i64! (positive) interprets Float32#to_i64! (positive) - Int32#unsafe_chr Int32#unsafe_chr - interprets Int8::MIN#to_i! interprets Int8::MIN#to_i! - interprets Int32::MAX#to_f32! interprets Int32::MAX#to_f32! - interprets Int64::MAX#to_i64! interprets Int64::MAX#to_i64! - interprets Float64#to_i32! (positive) interprets Float64#to_i32! (positive) - interprets UInt32::MAX#to_u64! interprets UInt32::MAX#to_u64! - interprets Float32#to_u! (positive) interprets Float32#to_u! (positive) - interprets UInt16::MAX#to_i8! interprets UInt16::MAX#to_i8! - interprets UInt32::MAX#to_f32! interprets UInt32::MAX#to_f32! - interprets UInt64::MAX#to_u64! interprets UInt64::MAX#to_u64! - interprets Int16::MIN#to_f32! interprets Int16::MIN#to_f32! - interprets Int32::MIN#to_f64! interprets Int32::MIN#to_f64! - interprets Int32::MAX#to_i! interprets Int32::MAX#to_i! - interprets Int64::MAX#to_u32! interprets Int64::MAX#to_u32! - interprets Float32#to_f64! (negative) interprets Float32#to_f64! (negative) - interprets Int8::MIN#to_u16! interprets Int8::MIN#to_u16! - interprets Int64::MIN#to_i8! interprets Int64::MIN#to_i8! - interprets Int16::MIN#to_i16! interprets Int16::MIN#to_i16! - interprets Float64#to_i! (positive) interprets Float64#to_i! (positive) - interprets Float32#to_u8! (positive) interprets Float32#to_u8! (positive) - interprets Int16::MAX#to_u! interprets Int16::MAX#to_u! - interprets Float64#to_i64! (negative) interprets Float64#to_i64! (negative) - interprets UInt16::MAX#to_f64! interprets UInt16::MAX#to_f64! - interprets UInt8::MAX#to_f64! interprets UInt8::MAX#to_f64! - interprets Int64::MIN#to_u! interprets Int64::MIN#to_u! - interprets Int64::MIN#to_i32! interprets Int64::MIN#to_i32! - interprets UInt32::MAX#to_f64! interprets UInt32::MAX#to_f64! - interprets UInt64::MAX#to_u32! interprets UInt64::MAX#to_u32! - interprets UInt16::MAX#to_u8! interprets UInt16::MAX#to_u8! - interprets Int64::MIN#to_i16! interprets Int64::MIN#to_i16! - interprets Int64::MIN#to_i! interprets Int64::MIN#to_i! - interprets Int16::MAX#to_f64! interprets Int16::MAX#to_f64! - interprets Char#ord interprets Char#ord - interprets UInt8::MAX#to_i! interprets UInt8::MAX#to_i! - interprets UInt16::MAX#to_i64! interprets UInt16::MAX#to_i64! - interprets UInt8::MAX#to_u! interprets UInt8::MAX#to_u! - interprets Int32::MIN#to_u16! interprets Int32::MIN#to_u16! - interprets UInt64::MAX#to_i16! interprets UInt64::MAX#to_i16! - interprets UInt64::MAX#to_i8! interprets UInt64::MAX#to_i8! - interprets Int64::MIN#to_f64! interprets Int64::MIN#to_f64! - interprets Int64::MAX#to_u64! interprets Int64::MAX#to_u64! - interprets UInt16::MAX#to_f32! interprets UInt16::MAX#to_f32! - interprets Float64#to_f32! (positive) interprets Float64#to_f32! (positive) - interprets Float32#to_i8! (positive) interprets Float32#to_i8! (positive) - interprets Int16::MAX#to_u64! interprets Int16::MAX#to_u64! - interprets Int8::MAX#to_i8! interprets Int8::MAX#to_i8! - interprets UInt8::MAX#to_u32! interprets UInt8::MAX#to_u32! - interprets Int32::MAX#to_u! interprets Int32::MAX#to_u! - interprets Int8::MAX#to_i! interprets Int8::MAX#to_i! - interprets Int32::MIN#to_i8! interprets Int32::MIN#to_i8! - interprets Float32#to_f32! (negative) interprets Float32#to_f32! (negative) - interprets Int8::MIN#to_u! interprets Int8::MIN#to_u! - interprets Int32::MAX#to_u8! interprets Int32::MAX#to_u8! - interprets Int64::MIN#to_u16! interprets Int64::MIN#to_u16! - interprets Int16::MIN#to_u8! interprets Int16::MIN#to_u8! - interprets UInt16::MAX#to_i! interprets UInt16::MAX#to_i! - interprets Int32::MIN#to_u8! interprets Int32::MIN#to_u8! - interprets Int8::MAX#to_u16! interprets Int8::MAX#to_u16! - interprets Float32#to_u16! (positive) interprets Float32#to_u16! (positive) - interprets UInt8::MAX#to_u8! interprets UInt8::MAX#to_u8! - interprets Int8::MIN#to_i64! interprets Int8::MIN#to_i64! - interprets UInt8::MAX#to_i8! interprets UInt8::MAX#to_i8! - interprets Int64::MIN#to_u64! interprets Int64::MIN#to_u64! - interprets Int16::MAX#to_i32! interprets Int16::MAX#to_i32! - interprets Float64#to_i16! (negative) interprets Float64#to_i16! (negative) - interprets Float32#to_i8! (negative) interprets Float32#to_i8! (negative) - interprets UInt64::MAX#to_f64! interprets UInt64::MAX#to_f64! - interprets Int16::MAX#to_u32! interprets Int16::MAX#to_u32! - interprets Int8::MIN#to_f32! interprets Int8::MIN#to_f32! - interprets Int16::MIN#to_u! interprets Int16::MIN#to_u! - interprets Float64#to_u64! (positive) interprets Float64#to_u64! (positive) - interprets UInt8::MAX#to_u64! interprets UInt8::MAX#to_u64! - interprets UInt16::MAX#to_u! interprets UInt16::MAX#to_u! - interprets Float32#to_f32! (positive) interprets Float32#to_f32! (positive) - interprets Int8::MAX#to_u8! interprets Int8::MAX#to_u8! - interprets UInt32::MAX#to_i16! interprets UInt32::MAX#to_i16! - interprets Float64#to_u! (positive) interprets Float64#to_u! (positive) - interprets Float32#to_i! (positive) interprets Float32#to_i! (positive) - interprets Int64::MAX#to_i! interprets Int64::MAX#to_i! - interprets Int64::MIN#to_i64! interprets Int64::MIN#to_i64! - interprets Int32::MAX#to_u16! interprets Int32::MAX#to_u16! - interprets Int8::MIN#to_u8! interprets Int8::MIN#to_u8! - interprets UInt64::MAX#to_u! interprets UInt64::MAX#to_u! - interprets Int8::MAX#to_i64! interprets Int8::MAX#to_i64! - interprets UInt16::MAX#to_i16! interprets UInt16::MAX#to_i16! - interprets Float32#to_i32! (positive) interprets Float32#to_i32! (positive) - interprets Int32::MAX#to_u32! interprets Int32::MAX#to_u32! - interprets Int64::MAX#to_f64! interprets Int64::MAX#to_f64! - interprets UInt32::MAX#to_u32! interprets UInt32::MAX#to_u32! - interprets Int32::MAX#to_i64! interprets Int32::MAX#to_i64! - interprets Int32::MAX#to_i16! interprets Int32::MAX#to_i16! - interprets UInt16::MAX#to_u16! interprets UInt16::MAX#to_u16! - interprets Float32#to_f64! (positive) interprets Float32#to_f64! (positive) - interprets UInt16::MAX#to_i32! interprets UInt16::MAX#to_i32! - interprets Int32::MAX#to_u64! interprets Int32::MAX#to_u64! - interprets Float64#to_f64! (negative) interprets Float64#to_f64! (negative) - interprets Float64#to_u32! (positive) interprets Float64#to_u32! (positive) - interprets Int64::MAX#to_i32! interprets Int64::MAX#to_i32! - interprets Int8::MAX#to_u32! interprets Int8::MAX#to_u32! - interprets Int16::MAX#to_u16! interprets Int16::MAX#to_u16! - interprets Int16::MIN#to_u32! interprets Int16::MIN#to_u32! - interprets Int16::MAX#to_i64! interprets Int16::MAX#to_i64! - interprets Float32#to_u32! (positive) interprets Float32#to_u32! (positive) - interprets Int64::MAX#to_f32! interprets Int64::MAX#to_f32! - interprets Int8::MAX#to_i32! interprets Int8::MAX#to_i32! - interprets Int32::MIN#to_f32! interprets Int32::MIN#to_f32! - interprets Int64::MAX#to_u! interprets Int64::MAX#to_u! - interprets Float32#to_i! (negative) interprets Float32#to_i! (negative) - interprets Int16::MAX#to_u8! interprets Int16::MAX#to_u8! - interprets UInt8::MAX#to_i32! interprets UInt8::MAX#to_i32! - interprets UInt64::MAX#to_i32! interprets UInt64::MAX#to_i32! - interprets Float64#to_f32! (negative) interprets Float64#to_f32! (negative) - interprets UInt16::MAX#to_u32! interprets UInt16::MAX#to_u32! - interprets Float64#to_i8! (positive) interprets Float64#to_i8! (positive) - interprets Int32::MIN#to_i16! interprets Int32::MIN#to_i16! - interprets Int16::MIN#to_i32! interprets Int16::MIN#to_i32! - interprets Int64::MAX#to_i16! interprets Int64::MAX#to_i16! - interprets Int64::MIN#to_u8! interprets Int64::MIN#to_u8! - interprets Int8::MIN#to_u32! interprets Int8::MIN#to_u32! - interprets UInt8::MAX#to_f32! interprets UInt8::MAX#to_f32! - interprets UInt32::MAX#to_i8! interprets UInt32::MAX#to_i8! - interprets UInt8::MAX#to_i64! interprets UInt8::MAX#to_i64! - interprets Int32::MIN#to_u64! interprets Int32::MIN#to_u64! - interprets Int64::MIN#to_u32! interprets Int64::MIN#to_u32! - interprets UInt64::MAX#to_f32! interprets UInt64::MAX#to_f32! - interprets Float64#to_i8! (negative) interprets Float64#to_i8! (negative) - interprets UInt32::MAX#to_i64! interprets UInt32::MAX#to_i64! - interprets UInt64::MAX#to_i64! interprets UInt64::MAX#to_i64! - interprets Int32::MIN#to_i! interprets Int32::MIN#to_i! - interprets Int8::MAX#to_u! interprets Int8::MAX#to_u! - interprets Int16::MAX#to_i16! interprets Int16::MAX#to_i16! - interprets Int8::MAX#to_f64! interprets Int8::MAX#to_f64! - interprets Int16::MAX#to_i! interprets Int16::MAX#to_i! - interprets Int32::MIN#to_u32! interprets Int32::MIN#to_u32! - interprets Int32::MAX#to_i8! interprets Int32::MAX#to_i8! - interprets Float64#to_i32! (negative) interprets Float64#to_i32! (negative) - interprets Int32::MIN#to_i64! interprets Int32::MIN#to_i64! - interprets UInt32::MAX#to_i! interprets UInt32::MAX#to_i! - interprets UInt8::MAX#to_u16! interprets UInt8::MAX#to_u16! - interprets Float32#to_u64! (positive) interprets Float32#to_u64! (positive) - interprets Int16::MIN#to_f64! interprets Int16::MIN#to_f64! - interprets UInt32::MAX#to_i32! interprets UInt32::MAX#to_i32! - interprets Float64#to_i64! (positive) interprets Float64#to_i64! (positive) - interprets Int16::MIN#to_u16! interprets Int16::MIN#to_u16! - interprets Float64#to_u16! (positive) interprets Float64#to_u16! (positive) - interprets Int8::MIN#to_u64! interprets Int8::MIN#to_u64! - interprets UInt32::MAX#to_u! interprets UInt32::MAX#to_u! - interprets Int8::MIN#to_i32! interprets Int8::MIN#to_i32! - interprets Int8::MIN#to_i8! interprets Int8::MIN#to_i8! - interprets Int64::MAX#to_i8! interprets Int64::MAX#to_i8! - UInt8#unsafe_chr UInt8#unsafe_chr - interprets UInt64::MAX#to_u16! interprets UInt64::MAX#to_u16! -Code gen: magic constants - does __FILE__ in macro does __FILE__ in macro - does __LINE__ in macro does __LINE__ in macro - does __DIR__ does __DIR__ - does __END_LINE__ with block does __END_LINE__ with block - does __END_LINE__ in macro with block does __END_LINE__ in macro with block - does __LINE__ does __LINE__ - does __END_LINE__ in macro without block does __END_LINE__ in macro without block - does __LINE__ when specifying one middle argument does __LINE__ when specifying one middle argument - does __LINE__ when specifying one default arg with __FILE__ does __LINE__ when specifying one default arg with __FILE__ - does __FILE__ does __FILE__ - does __END_LINE__ without block does __END_LINE__ without block - does __LINE__ when specifying one normal default arg does __LINE__ when specifying one normal default arg - does __LINE__ with dispatch does __LINE__ with dispatch - does __DIR__ in macro does __DIR__ in macro + named tuple + interprets named tuple literal and access by known index interprets named tuple literal and access by known index + interprets named tuple metaclass indexer interprets named tuple metaclass indexer + discards named tuple (#12383) discards named tuple (#12383) +Block inference + respects block arg restriction when block has a splat parameter (#6473) respects block arg restriction when block has a splat parameter (#6473) + does next from block with value 2 does next from block with value 2 + yields with different types yields with different types + errors when using local variable with block parameter name errors when using local variable with block parameter name + errors if declares class inside block errors if declares class inside block + errors if alias is not a fun type errors if alias is not a fun type + uses block return type as return type, even if can't infer block type uses block return type as return type, even if can't infer block type + error with self output type doesn't match error with self output type doesn't match + correctly types unpacked tuple block arg after block (#3339) correctly types unpacked tuple block arg after block (#3339) + ignores void return type (2) (#427) ignores void return type (2) (#427) + break from block without value break from block without value + binds to proc, not only to its body (#1796) binds to proc, not only to its body (#1796) + errors if using (Object ->) as block return type (#2358) errors if using (Object ->) as block return type (#2358) + finds type inside module in block finds type inside module in block + sets captured block type to that of restriction with alias sets captured block type to that of restriction with alias + doesn't fail with 'already had enclosing call' (#11200) doesn't fail with 'already had enclosing call' (#11200) + uses splat in block parameter uses splat in block parameter + checks block type with virtual type checks block type with virtual type + auto-unpacks with block arg type auto-unpacks with block arg type + auto-unpacks tuple, too many args, captured block auto-unpacks tuple, too many args, captured block + errors on recursive yield with non ProcNotation restriction (#6896) errors on recursive yield with non ProcNotation restriction (#6896) + allows yielding multiple types when a union is expected allows yielding multiple types when a union is expected + does next from captured block does next from captured block + uses block var with same name as local var uses block var with same name as local var + reports error if yields a type that's not that one in the block specification reports error if yields a type that's not that one in the block specification + can infer block type given that the method has a return type (#7160) can infer block type given that the method has a return type (#7160) + ignores void return type (4) ignores void return type (4) + auto-unpacks tuple, captured empty block auto-unpacks tuple, captured empty block + allows underscore in block return type even if the return type can't be computed allows underscore in block return type even if the return type can't be computed + recalculates call that uses block arg output as free var recalculates call that uses block arg output as free var + reports error on method instantiate (#4543) reports error on method instantiate (#4543) + auto-unpacks tuple auto-unpacks tuple + binds block return type free variable even if there are no block parameters (#1797) binds block return type free variable even if there are no block parameters (#1797) + does next from block with value does next from block with value + infers type of block with generic type infers type of block with generic type + types bug with yield not_nil! that is never not nil types bug with yield not_nil! that is never not nil + maps block of union types to union types maps block of union types to union types + auto-unpacks tuple, too many args auto-unpacks tuple, too many args + yields splat and non splat yields splat and non splat + reports mismatch with generic argument type in input type reports mismatch with generic argument type in input type + respects block arg restriction when block has a splat parameter (2) (#9524) respects block arg restriction when block has a splat parameter (2) (#9524) + errors if declares include inside block errors if declares include inside block + allows initialize with yield (#224) allows initialize with yield (#224) + break without value has nil type break without value has nil type + uses free var in return type in captured block uses free var in return type in captured block + reports error if block didn't return expected type reports error if block didn't return expected type + error with self input type doesn't match error with self input type doesn't match + auto-unpacks tuple, captured block with multiple statements auto-unpacks tuple, captured block with multiple statements + errors if invoking new with block when no initialize is defined errors if invoking new with block when no initialize is defined + auto-unpacks tuple, captured block auto-unpacks tuple, captured block + unpacks block argument unpacks block argument + types recursive hash assignment types recursive hash assignment + auto-unpacks tuple, less than max, captured block auto-unpacks tuple, less than max, captured block + errors if declares enum inside block errors if declares enum inside block + errors if declares extend inside block errors if declares extend inside block + ignores void return type (3) (#427) ignores void return type (3) (#427) + infer type of block parameter infer type of block parameter + infer type of empty block body infer type of empty block body + infer type of local variable infer type of local variable + allows invoking method on a object of a captured block with a type that was never instantiated allows invoking method on a object of a captured block with a type that was never instantiated + passes #233: block with initialize with default args passes #233: block with initialize with default args + doesn't assign block variable type to last value (#694) doesn't assign block variable type to last value (#694) + reports error if yields a type that's not that one in the block specification reports error if yields a type that's not that one in the block specification + allows alias as block fun type allows alias as block fun type + errors if declares class inside captured block errors if declares class inside captured block + infers type of block before call taking other args free vars into account infers type of block before call taking other args free vars into account + infer type of block body infer type of block body + preserves type filters in block preserves type filters in block + types empty block types empty block + doesn't auto-unpack tuple, more args doesn't auto-unpack tuple, more args + errors if yields from top level errors if yields from top level + renders expected block return type of a free variable on mismatch renders expected block return type of a free variable on mismatch + infer type of yield infer type of yield + matches block arg return type matches block arg return type + passes #262 passes #262 + matches block with generic type and free var matches block with generic type and free var + errors if declares module inside block errors if declares module inside block + infers type of block before call infers type of block before call + errors if proc is not instantiated errors if proc is not instantiated + uses splat in block parameter, many args uses splat in block parameter, many args + doesn't crash on #2531 doesn't crash on #2531 + errors on recursive yield with ProcNotation restriction errors on recursive yield with ProcNotation restriction + returns from proc literal returns from proc literal + errors if using Object as block return type (#2358) errors if using Object as block return type (#2358) + errors on recursive yield errors on recursive yield + errors if declares fun inside block errors if declares fun inside block + ignores block parameter if not used ignores block parameter if not used + yields splat yields splat + doesn't crash on cleaning up typeof node without dependencies (#8669) doesn't crash on cleaning up typeof node without dependencies (#8669) + errors if declares lib inside block errors if declares lib inside block + errors if using Bar | Object as block return type (#2358) errors if using Bar | Object as block return type (#2358) + errors if splat parameter becomes a union errors if splat parameter becomes a union + errors if doing next in proc literal errors if doing next in proc literal + uses free var in return type with tuple type uses free var in return type with tuple type + reports mismatch with generic argument type in output type reports mismatch with generic argument type in output type + errors if breaks from captured block errors if breaks from captured block + reports error if yields a type that later changes and that's not that one in the block specification reports error if yields a type that later changes and that's not that one in the block specification + doesn't mix local var with block var, using next (#2314) doesn't mix local var with block var, using next (#2314) + yields in overload, matches type yields in overload, matches type + infer type with self block arg infer type with self block arg + auto-unpacks tuple, less than max auto-unpacks tuple, less than max + reports error if block changes type reports error if block changes type + sets captured block type to that of restriction sets captured block type to that of restriction + errors if using ( -> Object) as block return type (#2358) errors if using ( -> Object) as block return type (#2358) + errors if declares def inside block errors if declares def inside block + errors if declares macro inside block errors if declares macro inside block + ignores void return type (#427) ignores void return type (#427) + reports error if block type doesn't match reports error if block type doesn't match + passes &->f passes &->f + reports error if missing arguments to yield reports error if missing arguments to yield + uses splat in block parameter, but not enough yield expressions uses splat in block parameter, but not enough yield expressions + errors if declares alias inside block errors if declares alias inside block + infer type with union infer type with union + does next from block without value does next from block without value + errors if returns from captured block errors if returns from captured block + uses block arg, too many parameters uses block arg, too many parameters + doesn't mix local var with block var, using break (#2314) doesn't mix local var with block var, using break (#2314) +Semantic: did you mean + says did you mean finds most similar in type says did you mean finds most similar in type + 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 two mistakes in long word in instance method says did you mean for two mistakes in long word in instance method + 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 + doesn't suggest when declaring var inside macro (#466) doesn't suggest when declaring var inside macro (#466) + 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 + says did you mean for instance var in subclass says did you mean for instance var in subclass + says did you mean for global method without parenthesis says did you mean for global method without parenthesis + suggest that there might be a typo for an initialize method suggest that there might be a typo for an initialize method + says did you mean for global method with parenthesis says did you mean for global method with parenthesis + suggests for class variable suggests for class variable + suggests a better alternative to logical operators (#2715) suggests a better alternative to logical operators (#2715) + says did you mean for class says did you mean for class + says did you mean in instance var declaration says did you mean in instance var declaration + says did you mean finds most similar in def says did you mean finds most similar in def + says did you mean for nested class says did you mean for nested class + says did you mean for named argument says did you mean for named argument + 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 instance var says did you mean for instance var Crystal::TablePrint colspan a cell that fits the available size colspan a cell that fits the available size - multiple rows with separator multiple rows with separator - single cell single cell + rows with horizontal separators rows with horizontal separators + single row with separator single row with separator aligns cell content aligns cell content + single cell single cell + multiple rows with separator multiple rows with separator aligns columns borders aligns columns borders - single row with separator single row with separator - rows with horizontal separators rows with horizontal separators -Semantic: exception - types a var after begin rescue as having all possible types in begin and rescue types a var after begin rescue as having all possible types in begin and rescue - marks method that calls another method that raises as raises, recursively marks method that calls another method that raises as raises, recursively - type for exception handler for explicit types type for exception handler for explicit types - can't use next inside block inside ensure (#4470) can't use next inside block inside ensure (#4470) - shadows local variable (1) shadows local variable (1) - doesn't type instance variable as nilable if assigned inside an exception handler after being assigned doesn't type instance variable as nilable if assigned inside an exception handler after being assigned - correctly types variable assigned inside nested exception handler (#9769) correctly types variable assigned inside nested exception handler (#9769) - can't return from ensure (#4470) can't return from ensure (#4470) - types var as nilable if previously nilable (2) types var as nilable if previously nilable (2) - type union with empty rescue block type union with empty rescue block - marks method calling method that raises as raises marks method calling method that raises as raises - errors if caught exception is a union but not all types are valid errors if caught exception is a union but not all types are valid - doesn't infect type to variable before handler (#4002) doesn't infect type to variable before handler (#4002) - types code with abstract exception that delegates method types code with abstract exception that delegates method - detects reading nil-if-read variable after exception handler (#4723) detects reading nil-if-read variable after exception handler (#4723) - type is union of main and rescue blocks type is union of main and rescue blocks - can use break inside while inside ensure (#4470) can use break inside while inside ensure (#4470) - says syntax error on "begin; rescue ex; rescue ex : Foo; end; ex" says syntax error on "begin; rescue ex; rescue ex : Foo; end; ex" - errors if caught exception is a nested union but not all types are valid errors if caught exception is a nested union but not all types are valid - transform nodes in else block transform nodes in else block - types a var after rescue as being nilable types a var after rescue as being nilable - remains nilable after rescue remains nilable after rescue - says syntax error on "begin; rescue ex; rescue; end; ex" says syntax error on "begin; rescue ex; rescue; end; ex" - marks instance variable as nilable if assigned inside rescue inside initialize marks instance variable as nilable if assigned inside rescue inside initialize - types a var after begin rescue with no-return in rescue types a var after begin rescue with no-return in rescue - types a var after begin rescue as having all possible types in begin and rescue (2) types a var after begin rescue as having all possible types in begin and rescue (2) - types var as not nil if defined inside begin and defined inside rescue types var as not nil if defined inside begin and defined inside rescue - types var as nilable inside ensure (2) types var as nilable inside ensure (2) - assigns var inside ensure (1) (#3919) assigns var inside ensure (1) (#3919) - can use break inside block inside ensure (#4470) can use break inside block inside ensure (#4470) - can't return from while inside ensure (#4470) can't return from while inside ensure (#4470) - type union with empty main block type union with empty main block - correctly types variables inside conditional inside exception handler with no-return rescue (#8012) correctly types variables inside conditional inside exception handler with no-return rescue (#8012) - errors if caught exception is not a subclass of Exception errors if caught exception is not a subclass of Exception - can't use next inside while inside ensure (#4470) can't use next inside while inside ensure (#4470) - can use next inside while inside ensure (#4470) can use next inside while inside ensure (#4470) - can't use break inside block inside ensure (#4470) can't use break inside block inside ensure (#4470) - types instance variable as nilable if assigned inside an exception handler (#1845) types instance variable as nilable if assigned inside an exception handler (#1845) - gets a non-nilable type if all rescue are unreachable (#8751) gets a non-nilable type if all rescue are unreachable (#8751) - marks method calling lib fun that raises as raises marks method calling lib fun that raises as raises - marks fun as raises marks fun as raises - doesn't consider vars as nilable inside else (#610) doesn't consider vars as nilable inside else (#610) - types exception var with no types types exception var with no types - doesn't crash on break inside rescue, in while (#2441) doesn't crash on break inside rescue, in while (#2441) - marks proc literal as raises marks proc literal as raises - types var as nilable if previously nilable (1) types var as nilable if previously nilable (1) - types exception with type types exception with type - can't use break inside while inside ensure (#4470) can't use break inside while inside ensure (#4470) - assigns var inside ensure (2) (#3919) assigns var inside ensure (2) (#3919) - says syntax error on "begin; else; 1; end" says syntax error on "begin; else; 1; end" - types var assignment inside block inside exception handler (#3324) types var assignment inside block inside exception handler (#3324) - can use next inside block inside ensure (#4470) can use next inside block inside ensure (#4470) - correctly types #1988 correctly types #1988 - marks def as raises marks def as raises - types var as nilable inside ensure (1) types var as nilable inside ensure (1) - can't return from block inside ensure (#4470) can't return from block inside ensure (#4470) - errors if caught exception is not a subclass of Exception without var errors if caught exception is not a subclass of Exception without var - types a var after begin rescue as having all possible types and nil in begin if read (2) types a var after begin rescue as having all possible types and nil in begin if read (2) -Code gen: proc - doesn't crash on #2196 doesn't crash on #2196 - can assign proc that returns anything to proc that returns nil (#3655) can assign proc that returns anything to proc that returns nil (#3655) - call simple proc literal call simple proc literal - returns ProcPointer inside top-level fun (#14691) returns ProcPointer inside top-level fun (#14691) - codegens nilable proc type dispatch (2) codegens nilable proc type dispatch (2) - codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct codegens issue with missing byval in proc literal inside struct - allows proc type of enum type with base type allows proc type of enum type with base type - binds function pointer to associated call binds function pointer to associated call - passes proc as &->expr to method that yields passes proc as &->expr to method that yields - codegens proc that returns a virtual type codegens proc that returns a virtual type - can assign proc that returns anything to proc that returns nil, using union type (#3655) can assign proc that returns anything to proc that returns nil, using union type (#3655) - codegens proc of generic type codegens proc of generic type - allows invoking a function with a subtype allows invoking a function with a subtype - raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) raises if returning closure from top-level fun (#14691) - codegens captured block that returns tuple codegens captured block that returns tuple - automatically casts proc that returns something to proc that returns void automatically casts proc that returns something to proc that returns void - allows invoking proc literal with smaller type allows invoking proc literal with smaller type - returns proc as function pointer inside top-level fun (#14691) returns proc as function pointer inside top-level fun (#14691) - codegens proc that references struct (bug) codegens proc that references struct (bug) - gets proc pointer using virtual type (#1337) gets proc pointer using virtual type (#1337) - assigns nil and proc to nilable proc type assigns nil and proc to nilable proc type - does new on proc type does new on proc type - allows proc type of enum type allows proc type of enum type - makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference makes sure that proc pointer is transformed after type inference - allows proc pointer where self is a class allows proc pointer where self is a class - call simple proc literal with return call simple proc literal with return - doesn't crash when taking a proc pointer that multidispatches on the top-level (#3822) doesn't crash when taking a proc pointer that multidispatches on the top-level (#3822) - calls proc pointer with union (passed by value) arg calls proc pointer with union (passed by value) arg - uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) uses alias of proc with virtual type (#1347) - can pass Proc(T) to Proc(Nil) in type restriction (#8964) can pass Proc(T) to Proc(Nil) in type restriction (#8964) - codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) codegens proc to implicit self in constant (#647) - doesn't crash when taking a proc pointer that multidispatches on a module (#3822) doesn't crash when taking a proc pointer that multidispatches on a module (#3822) - gets proc to lib fun (#504) gets proc to lib fun (#504) - codegens proc with union type that returns itself codegens proc with union type that returns itself - codegens proc with another var codegens proc with another var - codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) codegens proc literal hard type inference (1) - builds nilable proc type from fun builds nilable proc type from fun - codegens nilable proc type dispatch (1) codegens nilable proc type dispatch (1) - call proc pointer of instance method call proc pointer of instance method - codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type codegens proc that accepts array of type - call proc literal with return type call proc literal with return type - call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises call proc pointer of instance method that raises - takes pointerof function pointer takes pointerof function pointer - saves receiver value of proc pointer `->@ivar.foo` saves receiver value of proc pointer `->@ivar.foo` - allows redefining fun allows redefining fun - calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer calls function pointer - codegens proc in instance var initialize (#3016) codegens proc in instance var initialize (#3016) - codegens nilable proc type (1) codegens nilable proc type (1) - call proc pointer call proc pointer - closures var on ->var.call (#8584) closures var on ->var.call (#8584) - casts from function pointer to proc casts from function pointer to proc - saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` saves receiver value of proc pointer `->@@cvar.foo` - allows using proc arg name shadowing local variable allows using proc arg name shadowing local variable - codegens proc that accepts a union and is called with a single type codegens proc that accepts a union and is called with a single type - codegens nilable proc type (2) codegens nilable proc type (2) - accesses T in macros as a TupleLiteral accesses T in macros as a TupleLiteral - doesn't crash when taking a proc pointer to a virtual type (#9823) doesn't crash when taking a proc pointer to a virtual type (#9823) - mangles strings in such a way they don't conflict with funs (#1006) mangles strings in such a way they don't conflict with funs (#1006) - passes block to another function (bug: mangling of both methods was the same) passes block to another function (bug: mangling of both methods was the same) - executes proc pointer on primitive executes proc pointer on primitive - saves receiver value of proc pointer `->var.foo` saves receiver value of proc pointer `->var.foo` - call proc literal with arguments call proc literal with arguments - allows invoking a function with a subtype when defined as block spec allows invoking a function with a subtype when defined as block spec - allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically allows passing proc type to C automatically - builds proc type from fun builds proc type from fun - call proc pointer with args call proc pointer with args +Codegen: responds_to? + works with generic virtual superclass (2) works with generic virtual superclass (2) + codegens responds_to? with union gives false codegens responds_to? with union gives false + codegens responds_to? with generic class (1) codegens responds_to? with generic class (1) + works with virtual type works with virtual type + codegens responds_to? with generic class (2) codegens responds_to? with generic class (2) + codegens responds_to? with union gives true codegens responds_to? with union gives true + works with virtual class type (1) (#1926) works with virtual class type (1) (#1926) + works with generic virtual superclass (1) works with generic virtual superclass (1) + codegens responds_to? with nilable gives false because other type 1 codegens responds_to? with nilable gives false because other type 1 + doesn't error if result is discarded (#14113) doesn't error if result is discarded (#14113) + works with generic virtual module (1) works with generic virtual module (1) + codegens responds_to? false for simple type codegens responds_to? false for simple type + codegens responds_to? with nilable gives true codegens responds_to? with nilable gives true + works with generic virtual module (2) (#8334) works with generic virtual module (2) (#8334) + codegens responds_to? with nilable gives false because other type 2 codegens responds_to? with nilable gives false because other type 2 + works with two virtual types works with two virtual types + works with module works with module + does for generic instance type metaclass (#4353) does for generic instance type metaclass (#4353) + codegens responds_to? true for simple type codegens responds_to? true for simple type + works with virtual class type (2) (#1926) works with virtual class type (2) (#1926) +Code gen: nilable cast + does cast to nil (2) does cast to nil (2) + casts with block var that changes type (#3341) casts with block var that changes type (#3341) + upcasts type to virtual (2) (#3304) upcasts type to virtual (2) (#3304) + does nilable cast (false) does nilable cast (false) + upcasts type to virtual (#3304) upcasts type to virtual (#3304) + casts union type to nilable type (#9342) casts union type to nilable type (#9342) + does nilable cast (always true) does nilable cast (always true) + types as? with wrong type (#2775) types as? with wrong type (#2775) + does cast to nil (1) does cast to nil (1) + codegens with NoReturn codegens with NoReturn + does nilable cast (true) does nilable cast (true) + does upcast does upcast +Semantic: alias + uses constant in alias (#3259) uses constant in alias (#3259) + can pass recursive alias to proc can pass recursive alias to proc + reopens class through alias reopens class through alias + errors if defining infinite recursive alias in union errors if defining infinite recursive alias in union + errors if alias is already defined as another type errors if alias is already defined as another type + errors if alias already defined errors if alias already defined + errors if trying to resolve type of recursive alias errors if trying to resolve type of recursive alias + errors if trying to use typeof in alias errors if trying to use typeof in alias + declares alias inside type declares alias inside type + resolves type through alias (#563) resolves type through alias (#563) + doesn't find type parameter in alias (#3502) doesn't find type parameter in alias (#3502) + reopens class through alias within itself reopens class through alias within itself + reopens module through alias within itself reopens module through alias within itself + doesn't crash by infinite recursion against type alias and generics (#5329) doesn't crash by infinite recursion against type alias and generics (#5329) + works with alias type as restriction works with alias type as restriction + can use .class in alias (#2835) can use .class in alias (#2835) + resolves alias type resolves alias type + allows using generic type of recursive alias as restriction (#488) allows using generic type of recursive alias as restriction (#488) + includes module through alias includes module through alias + uses constant in alias with math (#3259) uses constant in alias with math (#3259) + reopens struct through alias within itself reopens struct through alias within itself + errors if declares alias inside if errors if declares alias inside if + overloads union type through alias overloads union type through alias + reopens struct through alias reopens struct through alias + errors if defining infinite recursive alias errors if defining infinite recursive alias + inherits struct through alias inherits struct through 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 + allows defining recursive fun aliases allows defining recursive fun aliases + finds type through alias (#4645) finds type through alias (#4645) + allows recursive array with alias allows recursive array with alias + allows using alias type as generic type allows using alias type as generic type + inherits class through alias inherits class through alias Crystal::Repl::Interpreter - enum - does enum value does enum value - does enum new does enum new -Init invocation - errors if files will be overwritten by a generated file errors if files will be overwritten by a generated file - prints error if a file is already present prints error if a file is already present - doesn't error when asked to skip existing files doesn't error when asked to skip existing files - honors the custom set directory name honors the custom set directory name - doesn't error if files will be overwritten by a generated file and --force is used doesn't error if files will be overwritten by a generated file and --force is used - produces valid yaml file produces valid yaml file -Lexer comments - lexes without comments enabled lexes without comments enabled - lexes with comments enabled (2) lexes with comments enabled (2) - lexes correct number of spaces lexes correct number of spaces - lexes with comments enabled lexes with comments enabled -Semantic: doc - stores doc for abstract class stores doc for abstract class - attaches doc in double macro expansion (#8463) attaches doc in double macro expansion (#8463) - stores doc for class stores doc for class - stores doc for struct when reopening stores doc for struct when reopening - stores doc for class when reopening stores doc for class when reopening - stores doc for def with visibility stores doc for def with visibility - stores doc for enum with @[Flags] stores doc for enum with @[Flags] - stores locations for auto-generated module stores locations for auto-generated module - attaches doc to annotation in macro expansion (#9628) attaches doc to annotation in macro expansion (#9628) - stores doc for enum member stores doc for enum member - stores doc for nodes defined in macro call stores doc for nodes defined in macro call - stores doc for module when reopening stores doc for module when reopening - stores doc for def with annotation stores doc for def with annotation - stores doc for abstract def stores doc for abstract def - stores location for implicit flag enum members stores location for implicit flag enum members - stores doc for struct stores doc for struct - stores doc for alias stores doc for alias - overwrites doc for macro when redefining overwrites doc for macro when redefining - stores doc for enum when reopening stores doc for enum when reopening - overwrites doc for module when reopening overwrites doc for module when reopening - overwrites doc for enum when reopening overwrites doc for enum when reopening - overwrites doc for struct when reopening overwrites doc for struct when reopening - stores doc for constant stores doc for constant - overwrites doc for class when reopening overwrites doc for class when reopening - stores doc for def stores doc for def - :ditto: - stores doc for macro stores doc for macro - :ditto: references last non-ditto doc :ditto: references last non-ditto doc - stores doc for const stores doc for const - stores doc for def stores doc for def - amend previous doc amend previous doc - amend previous doc (without empty line) amend previous doc (without empty line) - stores doc for flags enum with base type stores doc for flags enum with base type - overwrites doc for def when redefining overwrites doc for def when redefining - stores doc for module stores doc for module - stores doc for macro defined in macro call stores doc for macro defined in macro call - stores doc for enum stores doc for enum - doc before annotation - attached to enum attached to enum - attached to macro attached to macro - attached to alias attached to alias - attached to module attached to module - attached to def attached to def - attached to macro call attached to macro call - attached to constant attached to constant - attached to struct/class attached to struct/class - attached to macro call that produces multiple types attached to macro call that produces multiple types - stores doc for nodes defined in macro call (2) stores doc for nodes defined in macro call (2) - stores doc for fun def stores doc for fun def - stores doc for enum and doesn't mix with value stores doc for enum and doesn't mix with value - stores doc for def with annotation stores doc for def with annotation - stores doc for macro stores doc for macro -Crystal::Repl::Interpreter - calls - does Assign var with wants_struct_pointer does Assign var with wants_struct_pointer - mutates through inlined instance var without receiver mutates through inlined instance var without receiver - does call on instance var that's a struct, from a struct does call on instance var that's a struct, from a struct - mutates through pointer (2) mutates through pointer (2) - interprets implicit self call for pointer interprets implicit self call for pointer - inlines method that just reads an instance var, but produces side effects of args inlines method that just reads an instance var, but produces side effects of args - inlines call that returns self (2) inlines call that returns self (2) - does ReadInstanceVar with wants_struct_pointer does ReadInstanceVar with wants_struct_pointer - does call on instance var that's a struct, from a class does call on instance var that's a struct, from a class - inlines method that just reads an instance var (2) inlines method that just reads an instance var (2) - inlines call that returns self inlines call that returns self - calls a top-level method without arguments but with local vars calls a top-level method without arguments but with local vars - interprets self for primitive types interprets self for primitive types - mutates call argument mutates call argument - interprets call with default values interprets call with default values - does call with struct as obj does call with struct as obj - mutates through pointer (1) mutates through pointer (1) - mutates through pointer (3) mutates through pointer (3) - interprets call with named arguments interprets call with named arguments - does Assign class var with wants_struct_pointer does Assign class var with wants_struct_pointer - does Assign instance var with wants_struct_pointer does Assign instance var with wants_struct_pointer - mutates through read instance var mutates through read instance var - inlines method that just reads an instance var inlines method that just reads an instance var - mutates through inlined instance var with receiver mutates through inlined instance var with receiver - does call with struct as obj (2) does call with struct as obj (2) - does call on read instance var that's a struct, takes a pointer to instance var does call on read instance var that's a struct, takes a pointer to instance var - interprets explicit self call for primitive types interprets explicit self call for primitive types - does call on ivar that's a struct, takes a pointer to instance var, inside if does call on ivar that's a struct, takes a pointer to instance var, inside if - interprets call with if interprets call with if - does call on var that's a struct, takes a pointer to instance var, inside if does call on var that's a struct, takes a pointer to instance var, inside if - does call on constant that's a struct, takes a pointer to instance var does call on constant that's a struct, takes a pointer to instance var - calls a top-level method with two arguments calls a top-level method with two arguments - calls a top-level method without arguments and no local vars calls a top-level method without arguments and no local vars - puts struct pointer after tuple indexer puts struct pointer after tuple indexer - does call on Pointer#value that's a struct, takes a pointer to instance var does call on Pointer#value that's a struct, takes a pointer to instance var - does call on self that's a struct, takes a pointer to instance var, inside if does call on self that's a struct, takes a pointer to instance var, inside if - does call on constant that's a struct, takes a pointer to instance var, inside if does call on constant that's a struct, takes a pointer to instance var, inside if - discards call with struct as obj discards call with struct as obj -Semantic: not - doesn't restrict and doesn't restrict and - types not types not - filters types inside if filters types inside if - filters types inside if/else filters types inside if/else - doesn't restrict and in while (#4243) doesn't restrict and in while (#4243) - types not as NoReturn if exp is NoReturn types not as NoReturn if exp is NoReturn - filters types with !is_a? filters types with !is_a? -Semantic: yield with scope - mentions with yield scope and current scope in error mentions with yield scope and current scope in error - errors if using instance variable at top level errors if using instance variable at top level - infer type of block body with yield scope and arguments infer type of block body with yield scope and arguments - passes #229 passes #229 - uses instance variable of enclosing scope uses instance variable of enclosing scope - invokes nested calls invokes nested calls - infer type of block body with yield scope infer type of block body with yield scope - finds macro finds macro - uses method of enclosing scope uses method of enclosing scope - infer type of empty block body infer type of empty block body - infer type of block body infer type of block body -Code gen: if - doesn't crash with if !var using var in else doesn't crash with if !var using var in else - codegens if of nilable type in then 2 codegens if of nilable type in then 2 - codegens if with an else with false codegens if with an else with false - codegens if with virtual codegens if with virtual - codes if with two whiles codes if with two whiles - codegens if of nilable type in then codegens if of nilable type in then - codegens if with return in both branches codegens if with return in both branches - codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises - codegens if with pointer 0x100000000 pointer codegens if with pointer 0x100000000 pointer - doesn't crash with if !is_a? using var in then doesn't crash with if !is_a? using var in then - codegens if with an else with true codegens if with an else with true - codegens bug #1729 codegens bug #1729 - codegens if without an else with true codegens if without an else with true - codegens if of nilable type in else codegens if of nilable type in else - restricts with || always falsey restricts with || always falsey - codegen if with union type and else without type codegen if with union type and else without type - codegens if inside def without an else with true codegens if inside def without an else with true - doesn't generate truthy if branch if doesn't need value (bug) doesn't generate truthy if branch if doesn't need value (bug) - doesn't crash no NoReturn var (non-true left cond) (#1823) doesn't crash no NoReturn var (non-true left cond) (#1823) - codegens if with return and no else codegens if with return and no else - codegen if with union type and then without type codegen if with union type and then without type - codegens if with nil codegens if with nil - codegen if with nested if that returns codegen if with nested if that returns - codegens if of nilable type in else 3 codegens if of nilable type in else 3 - codegens #3104 codegens #3104 - doesn't crash no NoReturn var (true left cond) (#1823) doesn't crash no NoReturn var (true left cond) (#1823) - codegens nested if with var (ssa bug) codegens nested if with var (ssa bug) - codegens if without an else with false codegens if without an else with false - codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter - codegens if with int codegens if with int - codegen if inside if codegen if inside if - considers or truthy/falsey right considers or truthy/falsey right - codegens if with union codegens if with union - codegens if value from then codegens if value from then -Semantic: nil - restricts type of 'if foo' restricts type of 'if foo' - marks instance variables as nil but doesn't explode on macros marks instance variables as nil but doesn't explode on macros - marks instance variables as nil when not in initialize 2 marks instance variables as nil when not in initialize 2 - restricts type of 'if foo' on assign restricts type of 'if foo' on assign - can call a fun with nil for pointer can call a fun with nil for pointer - restricts type of 'while foo' restricts type of 'while foo' - doesn't check return type for void doesn't check return type for void - types nil types nil - marks instance variables as nil when not in initialize marks instance variables as nil when not in initialize - can call a fun with nil for typedef pointer can call a fun with nil for typedef pointer - doesn't check return type for nil doesn't check return type for nil - types empty types empty - restricts type of 'while foo' on assign restricts type of 'while foo' on assign -Codegen: is_a? - transforms else if condition is always falsey transforms else if condition is always falsey - codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true - doesn't consider generic type to be a generic type of a recursive alias (#3524) doesn't consider generic type to be a generic type of a recursive alias (#3524) - codegens is_a? on right side of and codegens is_a? on right side of and - does is_a? for virtual generic instance type against generic does is_a? for virtual generic instance type against generic - works with inherited generic class against an instantiation works with inherited generic class against an instantiation - visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) - codegens is_a? from virtual type to module codegens is_a? from virtual type to module - codegens is_a? with union gives true codegens is_a? with union gives true - evaluate method on filtered type evaluate method on filtered type - codegens is_a? true for simple type codegens is_a? true for simple type - codegens is_a? with union gives false codegens is_a? with union gives false - evaluates method on filtered union type 2 evaluates method on filtered union type 2 - codegens is_a? with virtual and module codegens is_a? with virtual and module - says true for Class.is_a?(Class.class.class) (#4374) says true for Class.is_a?(Class.class.class) (#4374) - doesn't error if result is discarded (#14113) doesn't error if result is discarded (#14113) - does is_a?/responds_to? twice (#1451) does is_a?/responds_to? twice (#1451) - codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false - doesn't skip assignment when used in combination with .is_a? (true case, else) (#1121) doesn't skip assignment when used in combination with .is_a? (true case, else) (#1121) - restricts metaclass against virtual metaclass type restricts metaclass against virtual metaclass type - doesn't work with inherited generic class against an instantiation (2) doesn't work with inherited generic class against an instantiation (2) - doesn't skip assignment when used in combination with .is_a? (true case, then) (#1121) doesn't skip assignment when used in combination with .is_a? (true case, then) (#1121) - codegens is_a? with virtual and nil codegens is_a? with virtual and nil - resets truthy state after visiting nodes (bug) resets truthy state after visiting nodes (bug) - does is_a?(generic type) for nested generic inheritance, through upcast (1) does is_a?(generic type) for nested generic inheritance, through upcast (1) - restricts type in else but lazily restricts type in else but lazily - codegens is_a? with nilable gives false because other type 2 codegens is_a? with nilable gives false because other type 2 - gives false if generic type doesn't match exactly gives false if generic type doesn't match exactly - codegens is_a? with union gives true codegens is_a? with union gives true - does is_a? with generic class metaclass does is_a? with generic class metaclass - codegens is_a? with nilable gives false because no type codegens is_a? with nilable gives false because no type - evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 - doesn't type merge (2) (#548) doesn't type merge (2) (#548) - transforms then if condition is always truthy transforms then if condition is always truthy - evaluate method on filtered type nilable type nil evaluate method on filtered type nilable type nil - evaluates method on filtered union type evaluates method on filtered union type - does is_a?(generic type) for nested generic inheritance, through upcast (2) does is_a?(generic type) for nested generic inheritance, through upcast (2) - restricts simple type with union restricts simple type with union - does is_a?(generic type) for nested generic inheritance (1) (#9660) does is_a?(generic type) for nested generic inheritance (1) (#9660) - doesn't type merge (1) (#548) doesn't type merge (1) (#548) - codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used - codegens untyped var (#4009) codegens untyped var (#4009) - doesn't skip assignment when used in combination with .is_a? (false case) (#1121) doesn't skip assignment when used in combination with .is_a? (false case) (#1121) - restricts virtual metaclass against virtual metaclass type restricts virtual metaclass against virtual metaclass type - codegens is_a? with nilable gives false because other type 1 codegens is_a? with nilable gives false because other type 1 - restricts union metaclass to metaclass (#12295) restricts union metaclass to metaclass (#12295) - does is_a? for union of module and type does is_a? for union of module and type - says false for value.is_a?(Class) says false for value.is_a?(Class) - does is_a? with && and true condition does is_a? with && and true condition - codegens is_a? from nilable reference union type to nil codegens is_a? from nilable reference union type to nil - does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) - codegens is_a? casts union to nilable in method codegens is_a? casts union to nilable in method - codegens is_a? with virtual codegens is_a? with virtual - virtual metaclass type is not virtual instance type (#12628) virtual metaclass type is not virtual instance type (#12628) - doesn't skip assignment when used in combination with .is_a? and && (#1121) doesn't skip assignment when used in combination with .is_a? and && (#1121) - says true for Class.is_a?(Class.class) (#4374) says true for Class.is_a?(Class.class) (#4374) - restricts union with union restricts union with union - codegens is_a? false for simple type codegens is_a? false for simple type - works with inherited generic class against an instantiation (3) works with inherited generic class against an instantiation (3) - says false for GenericChild(Base).is_a?(GenericBase(Child)) (#1294) says false for GenericChild(Base).is_a?(GenericBase(Child)) (#1294) - codegens is_a? from nilable reference union type to type codegens is_a? from nilable reference union type to type - codegens is_a? with nilable gives false because no type codegens is_a? with nilable gives false because no type - evaluate method on filtered type nilable type not-nil evaluate method on filtered type nilable type not-nil - does is_a? with union type as Union(X, Y), don't resolve to virtual type (#10244) does is_a? with union type as Union(X, Y), don't resolve to virtual type (#10244) - does is_a? with more strict virtual type does is_a? with more strict virtual type - codegens is_a? with union gives false codegens is_a? with union gives false - passes is_a? with generic module type on virtual type (#10302) passes is_a? with generic module type on virtual type (#10302) - does is_a?(generic type) for nested generic inheritance (2) does is_a?(generic type) for nested generic inheritance (2) - does is_a? with union type, don't resolve to virtual type (#10244) does is_a? with union type, don't resolve to virtual type (#10244) - codegens is_a? casts union to nilable codegens is_a? casts union to nilable - codegens is_a? with nilable gives true codegens is_a? with nilable gives true -Code gen: hooks - fixes empty types in hooks (#3946) fixes empty types in hooks (#3946) - does finished does finished - does added method macro does added method 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 inherited macro does inherited macro - does extended macro does extended macro - does inherited macro recursively does inherited macro recursively -Semantic: alias - errors if alias already defined errors if alias already defined - resolves type through alias (#563) resolves type through alias (#563) - allows using alias type as generic type allows using alias type as generic type - works with alias type as restriction works with alias type as restriction - uses constant in alias (#3259) uses constant in alias (#3259) - reopens module through alias within itself reopens module through alias within itself - can pass recursive alias to proc can pass recursive alias to proc - doesn't find type parameter in alias (#3502) doesn't find type parameter in alias (#3502) - errors if trying to resolve type of recursive alias errors if trying to resolve type of recursive alias - errors if alias is already defined as another type errors if alias is already defined as another type - inherits class through alias inherits class through alias - looks up alias for macro resolution (#3548) looks up alias for macro resolution (#3548) - doesn't crash by infinite recursion against type alias and generics (#5329) doesn't crash by infinite recursion against type alias and generics (#5329) - finds type through alias (#4645) finds type through alias (#4645) - overloads union type through alias overloads union type through alias - can use .class in alias (#2835) can use .class in alias (#2835) - inherits struct through alias inherits struct through alias - resolves alias type resolves alias type - reopens struct through alias within itself reopens struct through alias within itself - includes module through alias includes module through alias - allows defining recursive aliases allows defining recursive aliases - allows recursive array with alias allows recursive array with alias - allows defining recursive fun aliases allows defining recursive fun aliases - reopens class through alias reopens class through alias - reopens struct through alias reopens struct through alias - errors if trying to use typeof in alias errors if trying to use typeof in alias - declares alias inside type declares alias inside type - reopens class through alias within itself reopens class through alias within itself - reopens module through alias reopens module through alias - allows using generic type of recursive alias as restriction (#488) allows using generic type of recursive alias as restriction (#488) - uses constant in alias with math (#3259) uses constant in alias with math (#3259) - errors if defining infinite recursive alias in union errors if defining infinite recursive alias in union - errors if defining infinite recursive alias errors if defining infinite recursive alias - errors if declares alias inside if errors if declares alias inside if -Code gen: ssa - codegens ssa bug (2) codegens ssa bug (2) - codegens a redefined var inside method codegens a redefined var inside method - codegens a redefined var codegens a redefined var - codegens declaration of var inside then when true codegens declaration of var inside then when true - codegens a redefined var inside method with argument codegens a redefined var inside method with argument - codegens declaration of var inside then when false codegens declaration of var inside then when false - codegens a var that is re-assigned in a block (2) codegens a var that is re-assigned in a block (2) - codegens a var that is declared in a block (2) codegens a var that is declared in a block (2) - codegens ssa bug with if/else on var codegens ssa bug with if/else on var - 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 re-assigned in a block (1) codegens a var that is re-assigned in a block (1) - codegens a var that is declared in a block (1) codegens a var that is declared in a block (1) -Code gen: class - does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) - doesn't crash if not using undefined instance variable in superclass doesn't crash if not using undefined instance variable in superclass - codegens new which calls initialize codegens new which calls initialize - works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) - codegens instance var codegens instance var - doesn't skip false initializers (#3272) doesn't skip false initializers (#3272) - reads a virtual type instance var reads a virtual type instance var - changes instance variable in method (ssa bug) changes instance variable in method (ssa bug) - transfers initializer from generic module to non-generic class transfers initializer from generic module to non-generic class - doesn't crash on #1216 with pointerof doesn't crash on #1216 with pointerof - codegens assignment of generic metaclasses (4) (#10394) codegens assignment of generic metaclasses (4) (#10394) - reads a union type instance var (reference union, second type) reads a union type instance var (reference union, second type) - codegens class method codegens class method - never considers read instance var as closure (#12181) never considers read instance var as closure (#12181) - codegens assignment of generic metaclasses (2) (#10394) codegens assignment of generic metaclasses (2) (#10394) - can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) - codegens assignment of generic metaclasses (3) (#10394) codegens assignment of generic metaclasses (3) (#10394) - calls method on Class class calls method on Class class - does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class - reads a union type instance var (mixed union, second type) reads a union type instance var (mixed union, second type) - resolves type declaration when accessing instance var (#348) resolves type declaration when accessing instance var (#348) - codegens bug #168 codegens bug #168 - does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) - works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) - codegens method from another method without obj and accesses instance vars codegens method from another method without obj and accesses instance vars - codegens assignment of generic metaclasses, base is non-generic (1) (#10394) codegens assignment of generic metaclasses, base is non-generic (1) (#10394) - runs with nil instance var when inheriting runs with nil instance var when inheriting - doesn't crash on #1216 (reduced) doesn't crash on #1216 (reduced) - reads other instance var reads other instance var - codegens method of class union including Int (#1476) codegens method of class union including Int (#1476) - codegens assignment of generic metaclasses, base is non-generic (2) (#10394) codegens assignment of generic metaclasses, base is non-generic (2) (#10394) - allows using self in class scope allows using self in class scope - codegens virtual metaclass union bug (#2597) codegens virtual metaclass union bug (#2597) - codegens virtual class method codegens virtual class method - runs with nilable instance var runs with nilable instance var - gets class of virtual type gets class of virtual type - can assign virtual metaclass to virtual metaclass (#3007) can assign virtual metaclass to virtual metaclass (#3007) - calls class method without self (2) calls class method without self (2) - doesn't crash on instance variable assigned a proc, and never instantiated (#923) doesn't crash on instance variable assigned a proc, and never instantiated (#923) - doesn't crash on abstract class never instantiated (#2840) doesn't crash on abstract class never instantiated (#2840) - doesn't crash on #1216 doesn't crash on #1216 - codegens virtual method of generic class codegens virtual method of generic class - codegens initialize with instance var codegens initialize with instance var - allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope - codegens recursive type codegens recursive type - notifies superclass recursively on inheritance (#576) notifies superclass recursively on inheritance (#576) - runs instance variable initializer at the class level, for generic type runs instance variable initializer at the class level, for generic type - codegens assignment of generic metaclasses (1) (#10394) codegens assignment of generic metaclasses (1) (#10394) - does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class - invokes class method inside instance method (#1119) invokes class method inside instance method (#1119) - transfers initializer from generic module to generic class transfers initializer from generic module to generic class - codegens virtual generic class instance metaclass (#3819) codegens virtual generic class instance metaclass (#3819) - codegens class with recursive tuple to class (#4520) codegens class with recursive tuple to class (#4520) - reads a union type instance var (reference union, first type) reads a union type instance var (reference union, first type) - runs instance variable initializer at the class level runs instance variable initializer at the class level - reads a union type instance var (mixed union, first type) reads a union type instance var (mixed union, first type) - transfers initializer from module to generic class transfers initializer from module to generic class - makes .class always be a virtual type even if no subclasses makes .class always be a virtual type even if no subclasses - allows initializing var with constant allows initializing var with constant - codegens method call of instance var codegens method call of instance var - assigns type to reference union type assigns type to reference union type - codegens virtual call that calls another method codegens virtual call that calls another method - builds generic class bug builds generic class bug - allows fixing an instance variable's type allows fixing an instance variable's type - does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) - codegens call to same instance codegens call to same instance - doesn't skip zero initializers (#3272) doesn't skip zero initializers (#3272) - codegens singleton (#718) codegens singleton (#718) - calls class method without self calls class method without self - uses number type var uses number type var -Crystal - normalize_path - assert assert - assert assert - assert assert - assert assert -Code gen: multi assign - 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 (2) supports m to n assignment, splat is empty tuple (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, with splat on left-hand side (2) supports m to n assignment, with splat on left-hand side (2) - supports 1 to n assignment, splat is empty (3) supports 1 to n assignment, splat is empty (3) - supports 1 to n assignment, splat is empty (2) supports 1 to n assignment, splat is empty (2) - supports m to n assignment, splat is empty tuple (1) supports m to n assignment, splat is empty tuple (1) - 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 (3) supports m to n assignment, with splat on left-hand side (3) - without strict_multi_assign - 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 supports 1 to n assignment - supports m to n assignment, splat is empty tuple (3) supports m to n assignment, splat is empty tuple (3) - 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, with splat on left-hand side (3) supports 1 to n assignment, with splat on left-hand side (3) - 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, 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, 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 m to n assignment, with splat on left-hand side (1) supports m to n assignment, with splat on left-hand side (1) - supports n to n assignment supports n to n assignment -Code gen: named tuple - codegens tuple nilable index (2) codegens tuple nilable index (2) - codegens tuple nilable index (1) codegens tuple nilable index (1) - gets keys at compile time (2) gets keys at compile time (2) - assigns named tuple to compatible named tuple assigns named tuple to compatible named tuple - codegens tuple index codegens tuple index - does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class - codegens tuple index another order codegens tuple index another order - passes named tuple to def passes named tuple to def - doesn't crash when overload doesn't match doesn't crash when overload doesn't match - accesses T and creates instance from it accesses T and creates instance from it - downcasts union inside tuple to value (#3907) downcasts union inside tuple to value (#3907) - doesn't error if NamedTuple includes a non-generic module (#10380) doesn't error if NamedTuple includes a non-generic module (#10380) - allows named tuple covariance allows named tuple covariance - merges two named tuple types with same keys but different types (1) merges two named tuple types with same keys but different types (1) - upcasts named tuple inside compatible named tuple upcasts named tuple inside compatible named tuple - assigns named tuple inside union to union with compatible named tuple assigns named tuple inside union to union with compatible named tuple - upcasts named tuple inside union to union with compatible named tuple upcasts named tuple inside union to union with compatible named tuple - gets size at compile time gets size at compile time - merges two named tuple types with same keys but different types (2) merges two named tuple types with same keys but different types (2) - assigns two same-size named tuple types to a same var (#3132) assigns two same-size named tuple types to a same var (#3132) - assigns named tuple union to compatible named tuple assigns named tuple union to compatible named tuple - provides T as a named tuple literal provides T as a named tuple literal - codegens union of tuple of float with tuple of tuple of float codegens union of tuple of float with tuple of tuple of float - upcasts named tuple union to compatible named tuple upcasts named tuple union to compatible named tuple - codegens tuple nilable index (3) codegens tuple nilable index (3) - gets keys at compile time (1) gets keys at compile time (1) -file_exists? - with relative path - reads file (exists) reads file (exists) - reads file (doesn't exist) reads file (doesn't exist) - with absolute path - returns true if file exists returns true if file exists - returns false if file doesn't exist returns false if file doesn't exist -View#module_name - namespace is divided by hyphen namespace is divided by hyphen - underscore is ignored underscore is ignored - hyphen followed by non-ascii letter is replaced by its character hyphen followed by non-ascii letter is replaced by its character -Semantic: automatic cast - doesn't do multidispatch if an overload matches exactly (#8217) doesn't do multidispatch if an overload matches exactly (#8217) - says ambiguous call for integer (2) says ambiguous call for integer (2) - autocasts integer variable to float type (#9565) autocasts integer variable to float type (#9565) - autocasts nested type from non-nested type (#10315) autocasts nested type from non-nested type (#10315) - casts literal integer (Int64 -> Int32, too big) casts literal integer (Int64 -> Int32, too big) - can autocast to union in default value (multiple enums) can autocast to union in default value (multiple enums) - casts symbol literal to enum casts symbol literal to enum - casts Symbol to Enum in ivar assignment casts Symbol to Enum in ivar assignment - casts literal integer (Int32 -> Float32) casts literal integer (Int32 -> Float32) - casts Int32 to Int64 in ivar type declaration in generic casts Int32 to Int64 in ivar type declaration in generic - can match multiple times with the same argument type (#7578) can match multiple times with the same argument type (#7578) - can autocast to union in default value (symbol and int) can autocast to union in default value (symbol and int) - says ambiguous call for integer on alias (#6620) says ambiguous call for integer on alias (#6620) - casts Int32 -> Int64 in arg restriction casts Int32 -> Int64 in arg restriction - casts literal integer through alias with union casts literal integer through alias with union - doesn't cast integer variable to larger type (not #9565) doesn't cast integer variable to larger type (not #9565) - can't cast integer to another type when it doesn't fit (#9565) can't cast integer to another type when it doesn't fit (#9565) - autocasts first argument and second matches without autocast autocasts first argument and second matches without autocast - can autocast to alias in default value can autocast to alias in default value - casts literal integer in private top-level method (#7016) casts literal integer in private top-level method (#7016) - casts literal integer through alias with union casts literal integer through alias with union - casts Int32 to Int64 in ivar assignment casts Int32 to Int64 in ivar assignment - casts Symbol to Enum in cvar type declaration casts Symbol to Enum in cvar type declaration - casts integer expression to larger type (#9565) casts integer expression to larger type (#9565) - casts integer variable to larger type (Int64 to Int128) (#9565) casts integer variable to larger type (Int64 to Int128) (#9565) - errors when autocast default value doesn't match enum member errors when autocast default value doesn't match enum member - says ambiguous call for integer var to larger type (#9565) says ambiguous call for integer var to larger type (#9565) - casts Int32 to Int64 in cvar type declaration casts Int32 to Int64 in cvar type declaration - can autocast to union in default value can autocast to union in default value - autocasts float32 variable to float64 type (#9565) autocasts float32 variable to float64 type (#9565) - can use automatic cast with `with ... yield` (#7736) can use automatic cast with `with ... yield` (#7736) - casts literal float (Float32 -> Float64) casts literal float (Float32 -> Float64) - casts literal integer (Int32 -> no restriction) casts literal integer (Int32 -> no restriction) - casts literal float (Float64 -> Float32) casts literal float (Float64 -> Float32) - 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 - matches correct overload matches correct overload - casts Int32 to Int64 in ivar type declaration casts Int32 to Int64 in ivar type declaration - casts literal integer (Int32 -> Float64) casts literal integer (Int32 -> Float64) - errors if symbol name doesn't match enum member errors if symbol name doesn't match enum member - says ambiguous call for symbol says ambiguous call for symbol - casts literal integer (Int32 -> Int64) casts literal integer (Int32 -> Int64) - doesn't do multidispatch if an overload matches exactly (#8217) doesn't do multidispatch if an overload matches exactly (#8217) - casts Symbol to Enum in ivar type declaration casts Symbol to Enum in ivar type declaration - says ambiguous call for integer says ambiguous call for integer - casts Int32 to Int64 in cvar assignment casts Int32 to Int64 in cvar assignment - doesn't say 'ambiguous call' when there's an exact match for integer (#6601) doesn't say 'ambiguous call' when there's an exact match for integer (#6601) - says ambiguous call on union (#8655) says ambiguous call on union (#8655) - says ambiguous call for integer var to union type (#9565) says ambiguous call for integer var to union type (#9565) - casts literal integer (Int64 -> Int32, ok) casts literal integer (Int64 -> Int32, ok) - casts integer variable to larger type (#9565) casts integer variable to larger type (#9565) - doesn't say 'ambiguous call' when there's an exact match for symbol (#6601) doesn't say 'ambiguous call' when there's an exact match for symbol (#6601) -Semantic: multi assign - can pass splat variable at top-level to macros (#11596) can pass splat variable at top-level to macros (#11596) - strict_multi_assign - errors if assigning non-Indexable (#11414) errors if assigning non-Indexable (#11414) - errors if assigning union of tuples to fewer targets errors if assigning union of tuples to fewer targets - errors if assigning tuple to fewer targets errors if assigning tuple to fewer targets - doesn't error if some type in union has no constant size doesn't error if some type in union has no constant size - doesn't error if some type in union matches target count doesn't error if some type in union matches target count - errors if assigning tuple to more targets errors if assigning tuple to more targets - errors if assigning non-Indexable to splat (#11414) errors if assigning non-Indexable to splat (#11414) - without strict_multi_assign - doesn't error if assigning tuple to fewer targets doesn't error if assigning tuple to fewer targets - doesn't error if assigning non-Indexable (#11414) doesn't error if assigning non-Indexable (#11414) - errors if assigning non-Indexable to splat (#11414) errors if assigning non-Indexable to splat (#11414) -Semantic: array - types array literal of union types array literal of union - types non-empty typed array literal of int types non-empty typed array literal of int - types array literal with splats (2) types array literal with splats (2) - types array literal with splats types array literal with splats - types non-empty typed array literal of int types non-empty typed array literal of int - types array literal size correctly types array literal size correctly - types empty typed array literal of int32 types empty typed array literal of int32 - types array literal of int with splats types array literal of int with splats - types array literal of int types array literal of int - assignment in array literal works (#3195) assignment in array literal works (#3195) -unreachable - finds method called from expanded macro expression finds method called from expanded macro expression - finds virtual method finds virtual method - finds method with free variable finds method with free variable - handles circular hierarchy references (#14034) handles circular hierarchy references (#14034) - tallies calls tallies calls - finds method called from block finds method called from block - finds abstract method finds abstract method - finds initializer finds initializer - finds instance methods in nested types finds instance methods in nested types - finds method called from proc finds method called from proc - finds method with `previous_def` finds method with `previous_def` - ignores autogenerated enum predicates ignores autogenerated enum predicates - finds method called from expanded macro finds method called from expanded macro - finds yielding methods finds yielding methods - finds methods called from reachable code finds methods called from reachable code - finds methods in generic type finds methods in generic type - finds methods with proc parameter finds methods with proc parameter - finds instance methods finds instance methods - finds top level methods finds top level methods - finds shadowed method finds shadowed method - finds method in abstract type finds method in abstract type - finds method called from instance variable initializer finds method called from instance variable initializer - finds method with `super` finds method with `super` - finds class methods finds class methods -Code gen: virtual type - codegens new twice for virtual codegens new twice for virtual - codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) - codegens virtual call with explicit self and nilable type codegens virtual call with explicit self and nilable type - codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types - returns type with virtual type def type returns type with virtual type def type - correctly dispatch call with block when the obj is a virtual type correctly dispatch call with block when the obj is a virtual type - codegens virtual call with explicit self codegens virtual call with explicit self - codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type - dispatch call with nilable virtual arg dispatch call with nilable virtual arg - calls class method 3 calls class method 3 - codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type - casts virtual type to base virtual type casts virtual type to base virtual type - dispatches on virtual metaclass (3) dispatches on virtual metaclass (3) - dispatches on virtual metaclass (1) dispatches on virtual metaclass (1) - casts virtual type to union casts virtual type to union - assign instance variable in virtual type assign instance variable in virtual type - codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type - lookup instance variables in parent types lookup instance variables in parent types - calls class method 1 calls class method 1 - doesn't lookup in Value+ when virtual type is Object+ doesn't lookup in Value+ when virtual type is Object+ - call base overwritten method call base overwritten method - codegens virtual method of abstract metaclass codegens virtual method of abstract metaclass - can belong to union can belong to union - call overwritten method call overwritten method - calls class method 2 calls class method 2 - dispatches on virtual metaclass (2) dispatches on virtual metaclass (2) - call base method call base method - dispatch call with virtual type argument dispatch call with virtual type argument - initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated - codegens non-virtual call that calls virtual call to another virtual call codegens non-virtual call that calls virtual call to another virtual call - codegens allocate for virtual type with custom new codegens allocate for virtual type with custom new - casts metaclass union type to virtual metaclass type (#6298) casts metaclass union type to virtual metaclass type (#6298) - casts union to virtual casts union to virtual - codegens new for simple type, then for virtual codegens new for simple type, then for virtual -Compiler - runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename - compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file - treats all arguments post-filename as program arguments treats all arguments post-filename as program arguments - has a valid version has a valid version -Semantic: instance var - declares instance var with initial value, with subclass declares instance var with initial value, with subclass - errors if declaring var in Float errors if declaring var in Float - 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 - doesn't duplicate instance var in subclass doesn't duplicate instance var in subclass - guesses virtual hash type (1) (#5342) guesses virtual hash type (1) (#5342) - doesn't solve instance var initializer in instance context (1) (#5876) doesn't solve instance var initializer in instance context (1) (#5876) - 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) - infers type for generic class, with T.new infers type for generic class, with T.new - infers from another instance var with type declaration infers from another instance var with type declaration - declares instance var of generic class declares instance var of generic class - 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 - declares instance var of generic type, with static array declares instance var of generic type, with static array - errors if declaring generic type without type vars errors if declaring generic type without type vars - errors with macro def but another def doesn't initialize all errors with macro def but another def doesn't initialize all - infers type from offsetof infers type from offsetof - infers type to be nilable if self is used in same assign infers type to be nilable if self is used in same assign - infers type for generic class, with T.new and literal infers type for generic class, with T.new and literal - declares instance var of generic type, with splat inside Proc declares instance var of generic type, with splat inside Proc - considers var as assigned in multi-assign considers var as assigned in multi-assign - declares instance var in module, inherits to type declares instance var in module, inherits to type - 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 - guesses virtual array type (2) (#5342) guesses virtual array type (2) (#5342) - solves instance var initializer in metaclass context (#5876) solves instance var initializer in metaclass context (#5876) - infers from new with return type infers from new with return type - doesn't infer type to be nilable if using self.class doesn't infer type to be nilable if using self.class - declares instance var with self, on generic declares instance var with self, on generic - declares instance var of generic module declares instance var of generic module - guesses inside macro expression guesses inside macro expression - infers type from regex literal with interpolation infers type from regex literal with interpolation - 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 - errors if declaring var in Tuple(*T) errors if declaring var in Tuple(*T) - infers type from string interpolation infers type from string interpolation - infers type from argument with restriction, in generic infers type from argument with restriction, in generic - doesn't error if not initializing variables but calling super for module doesn't error if not initializing variables but calling super for module - declares instance var in module, inherits to type recursively declares instance var in module, inherits to type recursively - declares instance var of generic type, with splat declares instance var of generic type, with splat - infers from another instance var in generic type infers from another instance var in generic type - infers type for generic class, with assign (2) infers type for generic class, with assign (2) - errors if adds instance variable to Object via guess errors if adds instance variable to Object via guess - infers type from custom hash literal infers type from custom hash literal - infers type for generic class, with if infers type for generic class, with if - doesn't error if inheriting generic instance (#3635) doesn't error if inheriting generic instance (#3635) - errors if not initializing super variables errors if not initializing super variables - infers type from self as virtual type (#2575) infers type from self as virtual type (#2575) - doesn't infer generic type without type argument inside generic doesn't infer generic type without type argument inside generic - infers type from included module, outside def infers type from included module, outside def - infers from new with return type returning generic infers from new with return type returning generic - infers type from included module recursively infers type from included module recursively - 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 - infers type from ||= inside another assignment infers type from ||= inside another assignment - doesn't complain if declared type is recursive alias that's nilable doesn't complain if declared type is recursive alias that's nilable - 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 - 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 if not initialized in all initialize errors if not initialized in all initialize - 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) - errors if declaring variable with number errors if declaring variable with number - doesn't error when redeclaring subclass variable with the same type doesn't error when redeclaring subclass variable with the same type - infers from assign to local var in generic type (#2467) infers from assign to local var in generic type (#2467) - errors when assigning instance variable at top level block errors when assigning instance variable at top level block - infer from class method where new is redefined infer from class method where new is redefined - errors if declaring var in Int32 errors if declaring var in Int32 - infers type from custom generic array literal infers type from custom generic array literal - 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 - infers from Pointer.malloc infers from Pointer.malloc - 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 - 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 - transfers initializer from generic module to class transfers initializer from generic module to class - doesn't infer for subclass if assigns another type (1) doesn't infer for subclass if assigns another type (1) - infers type from two literals infers type from two literals - 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 begin infers type from begin - says undefined instance variable on read says undefined instance variable on read - errors when redeclaring subclass variable with a different type errors when redeclaring subclass variable with a different type - infers type from lib out (3) infers type from lib out (3) - infers type from case infers type from case - infers type from is_a? infers type from is_a? - infers type from ||= infers type from ||= - errors if unknown ivar through macro (#4050) errors if unknown ivar through macro (#4050) - accepts overriding inherited instance variable with compatible type accepts overriding inherited instance variable with compatible type - errors if declaring var in Reference errors if declaring var in Reference - infers from class method that invokes new infers from class method that invokes new - declares instance var declares instance var - errors if declaring var in Union(*T) errors if declaring var in Union(*T) - looks up self restriction in instantiated type, not defined type looks up self restriction in instantiated type, not defined type - infers type from hash literal with of infers type from hash literal with of - 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 from method in generic type, with type annotation infers from method in generic type, with type annotation - 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 - infers type from named tuple literal infers type from named tuple literal - doesn't error if not initializing variables but calling super doesn't error if not initializing variables but calling super - declares instance var of generic module from non-generic module declares instance var of generic module from non-generic module - declares instance var of generic module (2) declares instance var of generic module (2) - doesn't check call of non-self instance (#4830) doesn't check call of non-self instance (#4830) - infers type from lib out (1) infers type from lib out (1) - infers type for generic class, with begin infers type for generic class, with begin - doesn't combine union of Number and Number subclass (#5073) doesn't combine union of Number and Number subclass (#5073) - errors if not initializing super variables (2) errors if not initializing super variables (2) - declares instance var of generic type, with splat inside Tuple declares instance var of generic type, with splat inside Tuple - uses T.new (#4291) uses T.new (#4291) - doesn't error if uses typeof(@var) doesn't error if uses typeof(@var) - declares instance var multiple times, last one wins declares instance var multiple times, last one wins - cannot guess the type from splat argument with not splatted type cannot guess the type from splat argument with not splatted type - declares instance var of generic type subclass declares instance var of generic type subclass - 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 range literal infers type from range literal - errors if not initializing super variables (3) errors if not initializing super variables (3) - errors if declaring var in StaticArray(T, N) errors if declaring var in StaticArray(T, N) - doesn't complain in second part of #2575 doesn't complain in second part of #2575 - infers type from uninitialized infers type from uninitialized - infers type from as infers type from as - infer from class method with multiple statements and return infer from class method with multiple statements and return - declares instance var of generic type, with virtual metaclass declares instance var of generic type, with virtual metaclass - 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 - 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 generic type declares instance var of generic type, with generic type - errors if finally not initialized in macro def errors if finally not initialized in macro def - errors if declaring var in Int errors if declaring var in Int - 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 Pointer.null infers from Pointer.null - guesses inside macro for guesses inside macro for - infers type from self (#2575) infers type from self (#2575) - infers type from hash literal from elements infers type from hash literal from elements - doesn't consider self.initialize as initializer (#3239) doesn't consider self.initialize as initializer (#3239) - can guess the type from splat argument with splatted type variable can guess the type from splat argument with splatted type variable - uses virtual types in fun uses virtual types in fun - infers type from argument default value infers type from argument default value - errors if declaring instance variable in module included in Object errors if declaring instance variable in module included in Object - declares instance var of generic type, with proc declares instance var of generic type, with proc - errors if declaring var in Proc(*T, R) errors if declaring var in Proc(*T, R) - is more permissive with macro def initialize, multiple is more permissive with macro def initialize, multiple - infers type from path that is a type infers type from path that is a type - errors if declaring var in Pointer(T) errors if declaring var in Pointer(T) - 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 char literal infers type from char literal - errors when overriding inherited instance variable with incompatible type errors when overriding inherited instance variable with incompatible type - says undefined instance variable on assign says undefined instance variable on assign - infers type from as? infers type from as? - infers type for generic class, with assign (1) infers type for generic class, with assign (1) - says can't infer (#2536) says can't infer (#2536) - infers type for generic module infers type for generic module - can declare type even if included module has a guessed var can declare type even if included module has a guessed var - errors on undefined instance var and subclass calling super errors on undefined instance var and subclass calling super - infers from class method that has type annotation, in generic class infers from class method that has type annotation, in generic class - doesn't crash on #3580 doesn't crash on #3580 - infers from class method that has number literal infers from class method that has number literal - infers from Pointer.malloc with two arguments in generic type infers from Pointer.malloc with two arguments in generic type - doesn't error when using generic because guessed elsewhere doesn't error when using generic because guessed elsewhere - can't infer type when using operation on const (#4054) can't infer type when using operation on const (#4054) - guesses inside macro if guesses inside macro if - infers from generic class method that has type annotation infers from generic class method that has type annotation - declares instance var with union type with a virtual member declares instance var with union type with a virtual member - cannot guess type from argument assigned in body cannot guess type from argument assigned in body - declares with `self` declares with `self` - infers type to be nilable if not initialized infers type to be nilable if not initialized - guesses from as.(typeof(...)) guesses from as.(typeof(...)) - errors if declaring var in Enum errors if declaring var in Enum - infers type from || infers type from || - guesses virtual array type (3) (#5342) guesses virtual array type (3) (#5342) - 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 - infers type from symbol literal infers type from symbol literal - can't infer type of generic method that returns self (#5383) can't infer type of generic method that returns self (#5383) - doesn't crash on recursive method call doesn't crash on recursive method call - 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) - module and class, with declarations module and class, with declarations - module and class, with declarations (2) module and class, with declarations (2) - accepts module and module, with declarations accepts module and module, with declarations - accepts module and module, with definitions accepts module and module, with definitions - with incompatible type - module and class, with declarations module and class, with declarations - module and class, with definitions module and class, with definitions - errors module and module, with definitions errors module and module, with definitions - errors module and module, with declarations errors module and module, with declarations - infers type from proc literal with return type infers type from proc literal with return type - infers type in multi assign infers type in multi assign - infers type from new expression infers type from new expression - transfers initializer from module to generic class transfers initializer from module to generic class - infers type from tuple literal infers type from tuple literal - doesn't error if calling initialize from another initialize (2) doesn't error if calling initialize from another initialize (2) - declares instance var which appears in initialize declares instance var which appears in initialize - errors when assigning instance variable inside nested expression errors when assigning instance variable inside nested expression - errors when using Class (#2605) errors when using Class (#2605) - errors if adds instance variable to Object via guess via included module errors if adds instance variable to Object via guess via included module - infers in multiple assign for tuple type (1) infers in multiple assign for tuple type (1) - errors if declaring var in Value errors if declaring var in Value - infers nilable instance var of generic type infers nilable instance var of generic type - can guess the type from splat argument with splatted type can guess the type from splat argument with splatted type - infers type from included module infers type from included module - guesses from hash literal with of, with subclass guesses from hash literal with of, with subclass - infers type from responds_to? infers type from responds_to? - infers type from custom generic hash literal infers type from custom generic hash literal - infers type from custom hash literal in generic infers type from custom hash literal in generic - can't infer type from initializer in generic module type can't infer type from initializer in generic module type - infers from Pointer.malloc in generic type infers from Pointer.malloc in generic type - infers type from assign (2) infers type from assign (2) - doesn't error if not calling super but initializing all variables doesn't error if not calling super but initializing all variables - infers type by removing nil from || left side infers type by removing nil from || left side - infers type to be non-nilable if initialized in all initialize infers type to be non-nilable if initialized in all initialize - doesn't error when using Class but specifying type doesn't error when using Class but specifying type - errors if declaring var in NamedTuple(T) errors if declaring var in NamedTuple(T) - infers type from enum member infers type from enum member - infers type for generic class, with && infers type for generic class, with && - infers type from array literal in generic type infers type from array literal in generic type - infers type from block argument infers type from block argument - infers type from instance_sizeof infers type from instance_sizeof - errors when using Class in generic type errors when using Class in generic type - declares as named tuple declares as named tuple - errors if declaring instance var and turns out to be nilable errors if declaring instance var and turns out to be nilable - guesses virtual array type (1) (#5342) guesses virtual array type (1) (#5342) - 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 - can guess the type from double-splat argument with double-splatted type can guess the type from double-splat argument with double-splatted type - doesn't solve instance var initializer in instance context (3) (#5876) doesn't solve instance var initializer in instance context (3) (#5876) - ignores super module initialize (#456) ignores super module initialize (#456) - infers type from ! infers type from ! - declares instance var of generic class after reopen declares instance var of generic class after reopen - can type ivar from class inherited by generic class (#5281) can type ivar from class inherited by generic class (#5281) - infers type from lib out (2) infers type from lib out (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 bool literal infers type from bool literal - infers from Pointer.null in generic type infers from Pointer.null in generic type - 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 lib variable infers type from lib variable - doesn't error if initializes via super in macro def doesn't error if initializes via super in macro def - is more permissive with macro def initialize, bug with named args is more permissive with macro def initialize, bug with named args - declares instance var of generic type through module declares instance var of generic type through module - declares instance var of generic type, with union declares instance var of generic type, with union - uses virtual types in self uses virtual types in self - infers type from && infers type from && - infers from method on integer literal, with type annotation infers from method on integer literal, with type annotation - infers from assign to local var (#2467) infers from assign to local var (#2467) - uses virtual types in union uses virtual types in union - infers nilable instance var of generic module infers nilable instance var of generic module - doesn't error if initializing var in superclass, and then empty initialize doesn't error if initializing var in superclass, and then empty initialize - doesn't error if not initializing variables but calling previous_def (#3210) doesn't error if not initializing variables but calling previous_def (#3210) - infers type from array literal with literals in generic type infers type from array literal with literals in generic type - doesn't infer type from redefined method doesn't infer type from redefined method - guesses from as.(typeof(...)) in generic type guesses from as.(typeof(...)) in generic type - infers from class method that refers to constant infers from class method that refers to constant - doesn't error if not initialized in macro def but outside it doesn't error if not initialized in macro def but outside it - instance variables initializers are used in class variables initialized objects (#3988) instance variables initializers are used in class variables initialized objects (#3988) - infers from Pointer.malloc with two arguments infers from Pointer.malloc with two arguments - infers type from sizeof infers type from sizeof - guesses from splat (#3149) guesses from splat (#3149) - inferrs Proc(Void) to Proc(Nil) inferrs Proc(Void) to Proc(Nil) - infers from generic class method that has type annotation, without instantiating infers from generic class method that has type annotation, without instantiating - 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 - declares instance var with initial value declares instance var with initial value - infers type from lib fun call infers type from lib fun call - 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 - infers type from hash literal in generic type infers type from hash literal in generic type - declares instance var of generic type, with tuple declares instance var of generic type, with tuple - guesses from array literal with of, with subclass guesses from array literal with of, with subclass - says can't infer type if only nil was assigned says can't infer type if only nil was assigned - 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) - infers type from all call matches infers type from all call matches - infers type from redefined method if calls previous_def infers type from redefined method if calls previous_def - infers from restriction using virtual type infers from restriction using virtual type - 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 assign (1) infers type from assign (1) - errors if declaring var in Number errors if declaring var in Number - ignores redefined initialize (#456) ignores redefined initialize (#456) - 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 var in Class errors if declaring var in Class - infers type from array literal with of infers type from array literal with of - errors if not initializing super variable in generic errors if not initializing super variable in generic - 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 - declares instance var of generic type, with metaclass declares instance var of generic type, with metaclass - infers type for generic class, with lib call infers type for generic class, with lib call - infers type from regex literal infers type from regex literal - infers type from string literal infers type from string literal - allow usage of instance variable initializer from instance variable initializer allow usage of instance variable initializer from instance variable initializer - errors if declaring var in Object errors if declaring var in Object - infers from class method that has type annotation infers from class method that has type annotation - infers from another instance var infers from another instance var - infers from new with return type in generic type infers from new with return type in generic type - doesn't crash when inferring from new without matches (#2538) doesn't crash when inferring from new without matches (#2538) - obeys super module initialize (#456) obeys super module initialize (#456) - errors when assigning instance variable at top level control block errors when assigning instance variable at top level control block - can't infer type from initializer can't infer type from initializer - 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 - types generic instance as virtual type if generic type has subclasses (#3805) types generic instance as virtual type if generic type has subclasses (#3805) - infers type from block argument without restriction infers type from block argument without restriction - infers type from unless infers type from unless - declares instance var of generic type, with no type parameter declares instance var of generic type, with no type parameter - guesses virtual hash type (2) (#5342) guesses virtual hash type (2) (#5342) - is more permissive with macro def initialize, other initialize is more permissive with macro def initialize, other initialize - guesses from splat (2) (#3149) guesses from splat (2) (#3149) - infers type from path that is a constant infers type from path that is a constant - can't infer type from initializer in non-generic module can't infer type from initializer in non-generic module - infers type from number literal infers type from number literal - errors on undefined constant errors on undefined constant - infers type from array literal with of metaclass infers type from array literal with of 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 if declaring nilable instance var and turns out to be nilable doesn't if declaring nilable instance var and turns out to be nilable - infers type from if infers type from if - declares instance var of generic type declares instance var of generic type - infers type from literal outside def infers type from literal outside 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 - infers from another instance var in generic type with type declaration infers from another instance var in generic type with type declaration - doesn't infer for subclass if assigns another type (2) doesn't infer for subclass if assigns another type (2) - allows nil instance var because it's a generic type allows nil instance var because it's a generic type - can type ivar from module included by generic class (#5281) can type ivar from module included by generic class (#5281) - infers type for non-generic class, with assign infers type for non-generic class, with assign - doesn't error if not initializing nilable var in subclass doesn't error if not initializing nilable var in subclass - errors when typing an instance variable inside a method errors when typing an instance variable inside a method - infers type from array literal from its literals infers type from array literal from its literals - guesses virtual array type (3) (#5342) guesses virtual array type (3) (#5342) - infers type for generic class, with literal infers type for generic class, with literal - guesses from new on abstract class guesses from new on abstract class - infers type from custom array literal infers type from custom array literal - infers from class method that has type annotation, with overload infers from class method that has type annotation, with overload - doesn't error if calling initialize from another initialize (1) doesn't error if calling initialize from another initialize (1) - infers type from custom array literal in generic infers type from custom array literal in generic - infers type for generic class, with case infers type for generic class, with case - infers type from argument restriction infers type from argument restriction - is more permissive with macro def initialize is more permissive with macro def initialize - infers type from hash literal with literals in generic type infers type from hash literal with literals in generic type -Normalize: multi assign - normalizes n to n normalizes n to n - normalizes 1 to *_ on left-hand side normalizes 1 to *_ on left-hand side - 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 call normalizes n to n with call - normalizes 1 to n, with *_ on left-hand side (3) normalizes 1 to n, with *_ on left-hand side (3) - 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) - strict_multi_assign - 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 [] normalizes 1 to n with [] - 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 n to *_ on left-hand side normalizes n to *_ on left-hand side - normalizes 1 to n, with *_ on left-hand side (1) normalizes 1 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 normalizes 1 to n, with splat on left-hand side - 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, splat after other targets normalizes 1 to n, with splat on left-hand side, splat after other targets - without 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 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 splat on left-hand side normalizes n to 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) -Normalize: expressions - normalizes expressions with begin/end normalizes expressions with begin/end - normalizes an empty expression with begin/end normalizes an empty expression with begin/end - normalizes an expression normalizes an expression + exception handling + executes ensure when returning a big value from a block executes ensure when returning a big value from a block + executes ensure when breaking from a block executes ensure when breaking from a block + does rescue when nothing is raised does rescue when nothing is raised + executes ensure when exception is raised in body executes ensure when exception is raised in body + does ensure without rescue/raise does ensure without rescue/raise + does ensure with explicit return does ensure with explicit return + does ensure for else when else raises does ensure for else when else raises + executes ensure when returning from a block executes ensure when returning from a block + executes ensure when exception is raised in rescue executes ensure when exception is raised in rescue + does else does else + captures exception in variable captures exception in variable + executes ensure when returning from a block (2) executes ensure when returning from a block (2) + does ensure for else does ensure for else + raises and rescues anything raises and rescues anything + raises and rescues specific exception type raises and rescues specific exception type + raises and rescues anything, does ensure when an exception is rescued raises and rescues anything, does ensure when an exception is rescued +Semantic: closure + marks variable as closured inside block in fun marks variable as closured inside block in fun + marks variable as closured in program marks variable as closured in program + can use fun typedef as block type can use fun typedef as block type + allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal + doesn't mark var as closured if only used in block doesn't mark var as closured if only used in block + 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 + 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 + errors if sending closured proc pointer to C (1) errors if sending closured proc pointer to C (1) + doesn't crash for non-existing variable (#3789) doesn't crash for non-existing variable (#3789) + 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 + errors if forwarding block param doesn't match input type size errors if forwarding block param doesn't match input type size + unifies types of closured var (2) unifies types of closured var (2) + errors when transforming block to proc literal if type mismatch errors when transforming block to proc literal if type mismatch + doesn't mark var as closured if only used in two block doesn't mark var as closured if only used in two block + marks outer fun inside a block as closured marks outer fun inside a block as closured + 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 + says can't send closure to C with captured block says can't send closure to C with captured block + errors if sending closured proc pointer to C (2) errors if sending closured proc pointer to C (2) + marks method as self closured if instance var is read marks method as self closured if instance var is read + 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 without parameters transforms block to proc literal without parameters + correctly captures type of closured block arg correctly captures type of closured block arg + lookups return type in correct scope lookups return type in correct scope + transforms block to proc literal with void type transforms block to proc literal with void type + doesn't closure typeof instance var (#9479) doesn't closure typeof instance var (#9479) + passes #227 passes #227 + errors if sending closured proc pointer to C (1.2) errors if sending closured proc pointer to C (1.2) + 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 closure typeof local var doesn't closure typeof local var + gives error when doing yield inside proc literal gives error when doing yield inside proc literal + allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize + errors if forwarding block param doesn't match input type errors if forwarding block param doesn't match input type + transforms block to proc literal with free var transforms block to proc literal with free var + marks method as self closured if used inside a block marks method as self closured if used inside a block + errors if sending closured proc literal to C errors if sending closured proc literal to C + 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 + unifies types of closured var (1) unifies types of closured var (1) + 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 variable as closured in block marks variable as closured in block + gives error when doing yield inside proc literal gives error when doing yield inside proc literal + marks variable as closured in program on assign marks variable as closured in program on assign + 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 + marks variable as closured in def marks variable as closured in def + marks method as self closured if implicit self call is made marks method as self closured if implicit self call is made + says can't send closure to C with new notation says can't send closure to C with new notation + correctly detects previous var as closured (#5609) correctly detects previous var as closured (#5609) + 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 + errors if giving more block args when transforming block to proc literal errors if giving more block args when transforming block to proc literal + errors if sending closured proc pointer to C (3) errors if sending closured proc pointer to C (3) + marks outer fun as closured when using self marks outer fun as closured when using self + marks method as self closured if instance var is written marks method as self closured if instance var is written + transforms block to proc literal transforms block to proc literal Crystal::Repl::Interpreter - blocks - interprets break inside block (union, through return) interprets break inside block (union, through return) - casts yield expression to block var type (not block arg type) casts yield expression to block var type (not block arg type) - captures non-closure block captures non-closure block - interprets next inside block (union, through normal exit) interprets next inside block (union, through normal exit) - interprets block with multiple yields interprets block with multiple yields - interprets with ... yield with struct interprets with ... yield with struct - interprets next inside block (union, through next) interprets next inside block (union, through next) - counts with ... yield scope in block args bytesize (#12316) counts with ... yield scope in block args bytesize (#12316) - interprets break inside block (union, through normal flow) interprets break inside block (union, through normal flow) - interprets block with args that conflict with a local var interprets block with args that conflict with a local var - caches method with captured block (#12276) caches method with captured block (#12276) - interprets break inside block (union, through break) interprets break inside block (union, through break) - interprets with ... yield with extra arguments (#12296) interprets with ... yield with extra arguments (#12296) - considers block arg without type as having NoReturn type (#12270) considers block arg without type as having NoReturn type (#12270) - considers block arg without type as having NoReturn type (2) (#12270) considers block arg without type as having NoReturn type (2) (#12270) - interprets yield expression interprets yield expression - clears block local variables when calling block clears block local variables when calling block - interprets break inside block interprets break inside block - interprets block with args that conflict with a local var interprets block with args that conflict with a local var - interprets yield inside another block interprets yield inside another block - interprets next inside block interprets next inside block - clears block local variables when calling block (2) clears block local variables when calling block (2) - yields different values to form a union yields different values to form a union - interprets with ... yield interprets with ... yield - interprets yield with splat, block with splat interprets yield with splat, block with splat - interprets yield inside def with arguments interprets yield inside def with arguments - interprets yield with splat (2) interprets yield with splat (2) - interprets simplest block interprets simplest block - interprets yield expressions interprets yield expressions - discards yield expression discards yield expression - interprets block with splat interprets block with splat - interprets yield return value interprets yield return value - interprets yield with splat, less block arguments interprets yield with splat, less block arguments - interprets yield with splat (1) interprets yield with splat (1) - interprets yield with splat, block with splat (#12227) interprets yield with splat, block with splat (#12227) - returns from block returns from block -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 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 - 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 -Code gen: nilable cast - casts union type to nilable type (#9342) casts union type to nilable type (#9342) - upcasts type to virtual (2) (#3304) upcasts type to virtual (2) (#3304) - does upcast does upcast - types as? with wrong type (#2775) types as? with wrong type (#2775) - does nilable cast (true) does nilable cast (true) - does cast to nil (1) does cast to nil (1) - does cast to nil (2) does cast to nil (2) + structs + mutates struct stored in class var mutates struct stored in class var + does simple class instance var initializer does simple class instance var initializer + discards allocate discards allocate + does simple struct instance var initializer does simple struct instance var initializer + does constructor does constructor + does allocate, set instance var and get instance var does allocate, set instance var and get instance var + mutates struct inside union mutates struct inside union + sets multiple instance vars in virtual abstract struct call (#12187) sets multiple instance vars in virtual abstract struct call (#12187) + interprets read instance var of struct interprets read instance var of struct + casts def body to def type casts def body to def type + does complex class instance var initializer does complex class instance var initializer + does class instance var initializer inheritance does class instance var initializer inheritance + does call receiver by value from VirtualType abstract struct to union does call receiver by value from VirtualType abstract struct to union + inlines struct method that returns self (#12253) inlines struct method that returns self (#12253) + does call receiver by value from VirtualType abstract struct to concrete struct (#12190) does call receiver by value from VirtualType abstract struct to concrete struct (#12190) +Semantic: previous_def + types previous def types previous def + types previous def when inside fun types previous def when inside fun + types previous def with named arguments, def has double splat parameter (#8895) types previous def with named arguments, def has double splat parameter (#8895) + 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 in generic class types previous def in generic class + errors if there's no previous def errors if there's no 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) + types previous def with forwarded arguments, different internal names (#8895) types previous def with forwarded arguments, different internal names (#8895) + 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 + says wrong number of arguments for previous_def (#1223) says wrong number of arguments for previous_def (#1223) + types previous def when inside fun and forwards args types previous def when inside fun and forwards args +Code gen: case + 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 + 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 class codegens case with class + 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 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 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 value-less case codegens value-less case + codegens case when constant bug (#1028) codegens case when constant bug (#1028) + 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 +Code gen: cast + casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int + casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError + casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil + casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError + casts to base class making it virtual casts to base class making it virtual + allows casting nilable type to Void* (3) allows casting nilable type to Void* (3) + allows casting nilable type to Void* (1) allows casting nilable type to Void* (1) + upcasts from non-generic to generic upcasts from non-generic to generic + can cast to metaclass (#11121) can cast to metaclass (#11121) + casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError + doesn't corrupt stack when downcasting union to union with different alignment (#14285) doesn't corrupt stack when downcasting union to union with different alignment (#14285) + casts between union types, where union has a tuple type (#3377) casts between union types, where union has a tuple type (#3377) + cast virtual metaclass type to nilable virtual instance type (#12628) cast virtual metaclass type to nilable virtual instance type (#12628) + casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts with block var that changes type (#3341) casts with block var that changes type (#3341) + allows casting object to pointer and back allows casting object to pointer and back + casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) + casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type + casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type + casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) + can cast from Void* to virtual type (#3014) can cast from Void* to virtual type (#3014) + upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment + codegens class method when type id is available but not a virtual type (#3490) codegens class method when type id is available but not a virtual type (#3490) + casts to module casts to module casts to module casts to module casts to module casts to module casts to module casts to module casts to module casts to module + upcasts type to virtual (2) (#3304) upcasts type to virtual (2) (#3304) + casts to bigger union casts to bigger union + casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError + allows casting nilable type to Void* (2) allows casting nilable type to Void* (2) upcasts type to virtual (#3304) upcasts type to virtual (#3304) - does nilable cast (always true) does nilable cast (always true) - codegens with NoReturn codegens with NoReturn - does nilable cast (false) does nilable cast (false) -error reporting - reports unexpected named argument (2) reports unexpected named argument (2) - reports wrong number of arguments reports wrong number of arguments - uses correct name for top-level macro methods uses correct name for top-level macro methods - reports wrong number of arguments, with optional parameters reports wrong number of arguments, with optional parameters - reports unexpected named argument reports unexpected named argument - reports unexpected block reports unexpected block - reports missing block reports missing block -Semantic: warnings - abstract def positional parameter name mismatch - detects mismatch within many parameters detects mismatch within many parameters - respects external names of positional parameters (2) respects external names of positional parameters (2) - detects mismatch with single parameter detects mismatch with single parameter - doesn't compare single splats doesn't compare single splats - stops warning after implementation with matching parameters is found (#12150) - contravariant restrictions contravariant restrictions - reordered named parameters reordered named parameters - different single splats different single splats - exact match exact match - doesn't warn if current type is a module (#12266) doesn't warn if current type is a module (#12266) - doesn't warn if current type is abstract (#12266) doesn't warn if current type is abstract (#12266) - doesn't warn if external parameter name matches (2) doesn't warn if external parameter name matches (2) - detects multiple mismatches detects multiple mismatches - informs warnings once per matching overload (1) informs warnings once per matching overload (1) - doesn't compare positional parameters to single splat doesn't compare positional parameters to single splat - respects external names of positional parameters (1) respects external names of positional parameters (1) - doesn't warn if external parameter name matches (1) doesn't warn if external parameter name matches (1) - informs warnings once per matching overload (2) informs warnings once per matching overload (2) - continues warning if implementation with matching parameters is not found (#12150) - not a full implementation not a full implementation - double splat double splat - single splat single splat - deprecated macros - informs warnings once per call site location (a) informs warnings once per call site location (a) - ignore deprecation excluded locations ignore deprecation excluded locations - informs warnings once per call site location (b) informs warnings once per call site location (b) - errors if too many arguments errors if too many arguments - errors if invalid argument type errors if invalid argument type - detects deprecated class macros detects deprecated class macros - errors if invalid named argument errors if invalid named argument - detects deprecated module macros detects deprecated module macros - detects top-level deprecated macros detects top-level deprecated macros - detects deprecated macros with named arguments detects deprecated macros with named arguments - detects deprecated generic class macros detects deprecated generic class macros - deprecation reason is optional deprecation reason is optional - deprecated annotations - detects deprecated namespaced annotations detects deprecated namespaced annotations - detects deprecated annotations detects deprecated annotations - deprecated constants - detects deprecated constants in type declarations (2) detects deprecated constants in type declarations (2) - detects deprecated constants in type declarations (3) detects deprecated constants in type declarations (3) - detects deprecated constants in type declarations (1) detects deprecated constants in type declarations (1) - detects deprecated constants inside macros detects deprecated constants inside macros - detects deprecated constants detects deprecated constants - exposes syntax warnings exposes syntax warnings - exposes syntax warnings after macro interpolation exposes syntax warnings after macro interpolation - deprecated methods - detects deprecated class methods detects deprecated class methods - deprecation reason is optional deprecation reason is optional - informs warnings once per target type informs warnings once per target type - detects deprecated instance methods detects deprecated instance methods - detects deprecated initialize with named arguments detects deprecated initialize with named arguments - errors if too many arguments errors if too many arguments - detects deprecated methods with named arguments detects deprecated methods with named arguments - errors if invalid argument type errors if invalid argument type - informs warnings once per call site location (a) informs warnings once per call site location (a) - detects deprecated generic instance methods detects deprecated generic instance methods - errors if invalid named arguments errors if invalid named arguments - detects deprecated generic class methods detects deprecated generic class methods - informs warnings once per call site location (b) informs warnings once per call site location (b) - ignore deprecation excluded locations ignore deprecation excluded locations - detects top-level deprecated methods detects top-level deprecated methods - detects deprecated initialize detects deprecated initialize - detects deprecated module methods detects deprecated module methods - ignores nested calls to deprecated methods ignores nested calls to deprecated methods - informs warnings once per yield informs warnings once per yield + allows casting nil to Void* allows casting nil to Void* + casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union + sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment + downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment Lexer doc - resets doc after non newline or space token resets doc after non newline or space token lexes with doc enabled and docs, two line comment with leading whitespace lexes with doc enabled and docs, two line comment with leading whitespace - lexes with doc enabled and docs, one line comment with two newlines and another comment lexes with doc enabled and docs, one line comment with two newlines and another comment - lexes with doc enabled and docs lexes with doc enabled and docs lexes with doc enabled but without docs lexes with doc enabled but without docs - lexes without doc enabled lexes without doc enabled lexes with doc enabled and docs, two line comment lexes with doc enabled and docs, two line comment -Code gen: closure - transforms block to proc literal with free var transforms block to proc literal with free var - codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars - 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 simple closure in function with argument codegens simple closure in function with argument - codegens closure with block that declares same var codegens closure with block that declares same var - codegens closure inside initialize inside block with self codegens closure inside initialize inside block with self - codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars - ensures it can raise from the closure check ensures it can raise from the closure check - allows passing an external function along allows passing an external function along - codegens multiple nested blocks codegens multiple nested blocks - codegens closure with instance var and block codegens closure with instance var and block - codegens super nested closure with nested closured variable codegens super nested closure with nested closured variable - 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 nested context without new closured vars but with block arg codegens closure with nested context without new closured vars but with block arg - codegens nested closure that mentions var in both contexts codegens nested closure that mentions var in both contexts - allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize - codegens simple closure in block codegens simple closure in block - 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 - codegens closure with block codegens closure with block - codegens closured nested in block codegens closured nested in block - codegens closure with self and var codegens closure with self and var - closures struct self closures struct self - codegens closure with def that has an if codegens closure with def that has an if - codegens super nested closure codegens super nested closure - codegens closure with self and arguments codegens closure with self and arguments - codegens nested closure with block (2) codegens nested closure with block (2) - codegen closure in instance method without self closured codegen closure in instance method without self closured - 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) - codegens proc literal with struct codegens proc literal with struct - doesn't incorrectly consider local as closured (#4948) doesn't incorrectly consider local as closured (#4948) - allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal - codegens nested closure with nested closured variable codegens nested closure with nested closured variable - codegens closured self in block (#3388) codegens closured self in block (#3388) - codegens closure with instance var and var codegens closure with instance var and var - codegens closure with struct codegens closure with struct - 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 implicit self and var codegens closure with implicit self and var - codegens nested closure with block (1) codegens nested closure with block (1) - allows passing an external function along (2) allows passing an external function along (2) - codegens nested closure codegens nested closure - unifies types of closured var unifies types of closured var - transforms block to proc literal transforms block to proc literal - codegens closure with instance var codegens closure with instance var - codegens simple closure in function codegens simple closure in function - allows passing proc literal to def that captures block with & allows passing proc literal to def that captures block with & - allows mixing yield and block.call allows mixing yield and block.call - codegens simple closure at global scope codegens simple closure at global scope + lexes with doc enabled and docs lexes with doc enabled and docs + lexes with doc enabled and docs, one line comment with two newlines and another comment lexes with doc enabled and docs, one line comment with two newlines and another comment + lexes without doc enabled lexes without doc enabled + resets doc after non newline or space token resets doc after non newline or space token +Semantic: var + declares local variable and assigns wrong type declares local variable and assigns wrong type + reports there's no self reports there's no self + types an assign with type declaration types an assign with type declaration + errors if reads from underscore errors if reads from underscore + 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 + reports variable always nil reports variable always nil + errors if declaring generic type without type vars (with local var) errors if declaring generic type without type vars (with local var) + declares local variable but doesn't assign it in all branches declares local variable but doesn't assign it in all branches + declares local variable and immediately reads it declares local variable and immediately reads it + reports undefined local variable or method reports undefined local variable or method + 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 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 and then assigns it declares local variable and then assigns it + errors if variable already exists errors if variable already exists + declares local variable and assigns it with if declares local variable and assigns it with if + types an assign types an assign +context + can get context inside a module can get context inside a module + can get context inside class methods can get context inside class methods + includes assignments includes assignments + can get context of yielded block can get context of yielded block + can display json output can display json output + use type filters from if var use type filters from if var + can get context of nested yielded block can get context of nested yielded block + can get context inside initialize can get context inside initialize + includes top level vars includes top level vars + does includes self on classes does includes self on classes + can't get context from uncalled method can't get context from uncalled method + consider different instances of def consider different instances of def + can get context in file private module can get context in file private module + does includes args, instance vars, local variables and expressions on instance methods does includes args, instance vars, local variables and expressions on instance methods + can display text output can display text output + can get context in generic class can get context in generic class + does includes regex special variables does includes regex special variables + includes last call includes last call + use type filters from is_a? use type filters from is_a? + includes block args includes block args + can get context in file private method can get context in file private method + can handle union types can handle union types + can get context in contained class' class method can get context in contained class' class method + can get context of empty def can get context of empty def + does not includes temp variables does not includes temp variables + can get context of empty yielded block can get context of empty yielded block + includes args includes args +Crystal::Playground::AgentInstrumentorTransformer + instrument single statement var def instrument single statement var def + instrument string interpolations instrument string interpolations + do not instrument macro calls in class do not instrument macro calls in class + instrument returns inside def instrument returns inside def + instrument instance variable and class variables reads and writes instrument instance variable and class variables reads and writes + instrument unless statement instrument unless statement + instrument blocks and single yields instrument blocks and single yields + instrument ivar with obj instrument ivar with obj + instrument nested blocks unless in same line instrument nested blocks unless in same line + instrument nested class defs instrument nested class defs + instrument typeof instrument typeof + instrument binary expressions instrument binary expressions + instrument exceptions instrument exceptions + instrument while statement instrument while statement + do not instrument top level macro calls do not instrument top level macro calls + instrument puts with args instrument puts with args + instrument if statement instrument if statement + instrument multi assignments in the rhs instrument multi assignments in the rhs + instrument blocks and but non multi yields instrument blocks and but non multi yields + instrument literals instrument literals + instrument print with args instrument print with args + do not instrument records class do not instrument records class + instrument not expressions instrument not expressions + instrument class defs instrument class defs + instrument chained comparisons (#4663) instrument chained comparisons (#4663) + instrument assignments in the rhs instrument assignments in the rhs + instrument inside modules instrument inside modules + do not instrument constants assignments do not instrument constants assignments + do not instrument class/module declared macro do not instrument class/module declared macro + instrument unary expressions instrument unary expressions + instrument single variables expressions instrument single variables expressions + allow visibility modifiers allow visibility modifiers + instrument case statement instrument case statement + instrument multi statement def instrument multi statement def + instrument literals with expression names instrument literals with expression names + instrument single statement def instrument single statement def + do not instrument class initializing arguments do not instrument class initializing arguments + instrument is_a? expressions instrument is_a? expressions +error reporting + reports unexpected named argument reports unexpected named argument + reports wrong number of arguments, with optional parameters reports wrong number of arguments, with optional parameters + reports missing block reports missing block + uses correct name for top-level macro methods uses correct name for top-level macro methods + reports unexpected block reports unexpected block + reports wrong number of arguments reports wrong number of arguments + reports unexpected named argument (2) reports unexpected named argument (2) +Codegen: special vars + allows with primitive allows with primitive + codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) + codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block + codegens $? codegens $? + preserves special vars in macro expansion with call with default arguments (#824) preserves special vars in macro expansion with call with default arguments (#824) + codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block + codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) + codegens $~ two levels codegens $~ two levels + works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily + codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) + preserves special vars if initialized inside block (#2194) preserves special vars if initialized inside block (#2194) + allows with struct allows with struct + codegens with default argument codegens with default argument + codegens $~ codegens $~ + codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block + codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) + codegens after block 2 codegens after block 2 +Code gen: struct + allows using named arguments for new allows using named arguments for new + codegens assign struct to union codegens assign struct to union + automatically converts nil to pointer automatically converts nil to pointer + codegens struct property setter codegens struct property setter + codegens struct property default value codegens struct property default value + codegens set struct value with constant codegens set struct value with constant + builds struct setter with fun type (2) builds struct setter with fun type (2) + automatically converts numeric type in struct field assignment automatically converts numeric type in struct field assignment + automatically converts numeric union type in struct field assignment automatically converts numeric union type in struct field assignment + codegens union inside struct codegens union inside struct + automatically converts by invoking to_unsafe automatically converts by invoking to_unsafe + can access instance var from the outside (#1092) can access instance var from the outside (#1092) + sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc + codegens struct access with -> and then . codegens struct access with -> and then . + yields struct via -> yields struct via -> + codegens struct property setter via pointer codegens struct property setter via pointer + codegens struct get inside struct codegens struct get inside struct + passes struct to method (1) passes struct to method (1) + codegens struct property setter via pointer codegens struct property setter via pointer + codegens struct set inside struct codegens struct set inside struct + 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 + can access member of uninitialized struct behind type (#8774) can access member of uninitialized struct behind type (#8774) + codegens passing pointerof(struct) to fun codegens passing pointerof(struct) to fun + builds struct setter with fun type (1) builds struct setter with fun type (1) + passes struct to method (2) passes struct to method (2) + codegens pointer malloc of struct codegens pointer malloc of struct +Crystal::FFI::CallInterface + .variadic + basic basic + zero varargs zero varargs + validates args size validates args size + .new + simple call simple call + make struct make struct + all primitive arg types all primitive arg types + with args with args + array array + sum struct sum struct +Semantic: class + reports wrong number of arguments for initialize reports wrong number of arguments for initialize + doesn't crash on instance variable assigned a proc, and never instantiated (#923) doesn't crash on instance variable assigned a proc, and never instantiated (#923) + doesn't use initialize from base class with virtual type doesn't use initialize from base class with virtual type + doesn't use initialize from base class doesn't use initialize from base class + reads a virtual type instance var reads a virtual type instance var + types class and subclass as one type types class and subclass as one type + does automatic inference of new for generic types does automatic inference of new for generic types + reports undefined method when method inside a class reports undefined method when method inside a class + errors if using underscore in generic class errors if using underscore in generic class + types generic of generic type types generic of generic type + says no overload matches for class new says no overload matches for class new + allows instantiating generic class with number allows instantiating generic class with number + errors if using read-instance-var with non-typed variable errors if using read-instance-var with non-typed variable + type def does not reopen type from parent namespace (#11181) type def does not reopen type from parent namespace (#11181) + hoists instance variable initializer hoists instance variable initializer + can't reopen as module can't reopen as module + types bug #168 (it inherits instance var even if not mentioned in initialize) types bug #168 (it inherits instance var even if not mentioned in initialize) + types as no return if calling method on abstract class with all abstract subclasses (#6996) types as no return if calling method on abstract class with all abstract subclasses (#6996) + reports can't instantiate abstract class on new reports can't instantiate abstract class on new + allows defining classes inside modules or classes with :: allows defining classes inside modules or classes with :: + errors if creating instance before typing instance variable errors if creating instance before typing instance variable + reports can't instantiate abstract class on allocate reports can't instantiate abstract class on allocate + types recursive type types recursive type + preserves order of instance vars (#3050) preserves order of instance vars (#3050) + does automatic type inference of new for nested generic type does automatic type inference of new for nested generic type + reports undefined instance method reports undefined instance method + doesn't lookup type in parents' namespaces, and lookups and in program doesn't lookup type in parents' namespaces, and lookups and in program + errors if reopening generic class with different splat index (3) errors if reopening generic class with different splat index (3) + errors if reopening non-generic class as generic errors if reopening non-generic class as generic + errors if assigning superclass to declared instance var errors if assigning superclass to declared instance var + doesn't crash with top-level initialize (#2601) doesn't crash with top-level initialize (#2601) + errors on no method found on abstract class, class method (#2241) errors on no method found on abstract class, class method (#2241) + types class and subclass as one type types class and subclass as one type + errors when creating Number errors when creating Number + types class inside class types class inside class + inherits Gen(self) (#2890) inherits Gen(self) (#2890) + allows using self in class scope allows using self in class scope + uses self as type var uses self as type var + uses number type var in class method uses number type var in class method + errors if reopening generic class with different splat index errors if reopening generic class with different splat index + errors if inheriting Gen(self) and there's no self (#2890) errors if inheriting Gen(self) and there's no self (#2890) + errors if inherits from metaclass errors if inherits from metaclass + allows declaring a variable in an initialize and using it allows declaring a variable in an initialize and using it + can invoke method on abstract type without subclasses nor instances can invoke method on abstract type without subclasses nor instances + can invoke method on abstract generic type with subclasses but no instances can invoke method on abstract generic type with subclasses but no instances + errors if reading non-existent ivar errors if reading non-existent ivar + doesn't error on new on abstract virtual type class doesn't error on new on abstract virtual type class + says wrong number of arguments for abstract class new says wrong number of arguments for abstract class new + can't reopen as struct can't reopen as struct + doesn't mix classes on definition (#2352) doesn't mix classes on definition (#2352) + errors if inherits from module errors if inherits from module + finds in global scope if includes module finds in global scope if includes module + inherits self (#2890) inherits self (#2890) + reports superclass mismatch reports superclass mismatch + can't use implicit initialize if defined in parent can't use implicit initialize if defined in parent + errors if reopening generic class with different splat index (2) errors if reopening generic class with different splat index (2) + types instance variable types instance variable + can mark initialize as private can mark initialize as private + types Const#new types Const#new + says wrong number of arguments for abstract class new (2) says wrong number of arguments for abstract class new (2) + types virtual method of generic class types virtual method of generic class + types as no return if calling method on generic class with subclasses (#6996) types as no return if calling method on generic class with subclasses (#6996) + errors if reopening generic class with different type vars errors if reopening generic class with different type vars + says that instance vars are not allowed in metaclass says that instance vars are not allowed in metaclass + errors if reopening generic class with different type vars (2) errors if reopening generic class with different type vars (2) + does automatic type inference of new for generic types 2 does automatic type inference of new for generic types 2 + infers generic type after instance was created with explicit type infers generic type after instance was created with explicit type + correctly types #680 correctly types #680 + can use short name for top-level type can use short name for top-level type + uses self as type var uses self as type var + types as no return if calling method on abstract class with generic subclasses but no instances (#6996) types as no return if calling method on abstract class with generic subclasses but no instances (#6996) + errors if reading ivar from non-ivar container errors if reading ivar from non-ivar container + doesn't lookup new in supermetaclass doesn't lookup new in supermetaclass + reads an object instance var from a union type reads an object instance var from a union type + types type var union types type var union + types as no return if calling method on abstract generic class (#6996) types as no return if calling method on abstract generic class (#6996) + errors when creating Value errors when creating Value + types instance variable types instance variable + doesn't mark instance variable as nilable if calling another initialize doesn't mark instance variable as nilable if calling another initialize + types class and subclass as one type types class and subclass as one type + reads an object instance var reads an object instance var + errors when wrong arguments for new errors when wrong arguments for new + correctly types #680 (2) correctly types #680 (2) + errors if declares class inside if errors if declares class inside if + types self inside method call without obj types self inside method call without obj + reports uninitialized constant reports uninitialized constant + types instance variable on getter types instance variable on getter + inherits self twice (#5495) inherits self twice (#5495) + types Const#new#method types Const#new#method + types Const#allocate types Const#allocate + can invoke method on abstract generic type without subclasses nor instances can invoke method on abstract generic type without subclasses nor instances + reports unknown class when extending reports unknown class when extending +Semantic: uninitialized + declares an instance variable in initialize as uninitialized declares an instance variable in initialize as uninitialized + errors if declares var and then assigns other type errors if declares var and then assigns other type + errors if declaring variable multiple times with different types (#917) errors if declaring variable multiple times with different types (#917) + declares as uninitialized and reads it declares as uninitialized and reads it + uses virtual type for uninitialized (#8216) uses virtual type for uninitialized (#8216) + can uninitialize variable outside initialize, generic (#2828) can uninitialize variable outside initialize, generic (#2828) + errors if declaring generic type without type vars (with instance var) errors if declaring generic type without type vars (with instance var) + disallows declaring var of type Struct disallows declaring var of type Struct + disallows declaring var of type Int disallows declaring var of type Int + disallows declaring var of type Reference disallows declaring var of type Reference + works with uninitialized NoReturn (#3314) works with uninitialized NoReturn (#3314) + disallows declaring var of type Number disallows declaring var of type Number + disallows declaring var of type Float disallows declaring var of type Float + has type (#3641) has type (#3641) + disallows declaring var of type Class disallows declaring var of type Class + can uninitialize variable outside initialize (#2828) can uninitialize variable outside initialize (#2828) + can use uninitialized with class type (#2940) can use uninitialized with class type (#2940) + disallows declaring var of type Value disallows declaring var of type Value + disallows declaring var of type Object disallows declaring var of type Object + declares as uninitialized declares as uninitialized + disallows declaring var of type Enum disallows declaring var of type Enum + errors if declaring generic type without type vars (with class var) errors if declaring generic type without type vars (with class var) +Normalize: or + normalizes or with ! on var normalizes or with ! on var + normalizes or with assignment on the left normalizes or with assignment on the left + normalizes or with variable on the left normalizes or with variable on the left + normalizes or with ! on var.is_a?(...) normalizes or with ! on var.is_a?(...) + normalizes or without variable normalizes or without variable + normalizes or with is_a? on var normalizes or with is_a? on var +Normalize: return next break + removes nodes after if that returns in both branches removes nodes after if that returns in both branches + doesn't remove after return when there's an unless doesn't remove after return when there's an unless + removes nodes after return removes nodes after return + removes nodes after break removes nodes after break + 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 next removes nodes after next +Parser warnings + warns on missing space before colon + in type declaration in type declaration + in anonymous block param type restriction in anonymous block param type restriction + in block param type restriction in block param type restriction + in return type restriction in return type restriction + warns on suffix-less UInt64 literals > Int64::MAX warns on suffix-less UInt64 literals > Int64::MAX Crystal::Repl::Interpreter - extern - discards primitive struct_or_union_set and get (struct) discards primitive struct_or_union_set and get (struct) - discards primitive struct_or_union_set because it's a copy discards primitive struct_or_union_set because it's a copy - interprets primitive struct_or_union_set and get (union) interprets primitive struct_or_union_set and get (union) - interprets primitive struct_or_union_set and get (struct) interprets primitive struct_or_union_set and get (struct) - does automatic C cast does automatic C cast - sets extern struct proc field sets extern struct proc field - sets struct field through pointer sets struct field through pointer -Crystal::Doc::Method - args_to_s - shows block args with underscore shows block args with underscore - shows default value of arg with highlighting shows default value of arg with highlighting - shows double splat args shows double splat args - shows block args shows block args - shows simple args shows simple args - shows args and return type restriction shows args and return type restriction - shows splat args shows splat args - shows external name of arg with quotes and escaping shows external name of arg with quotes and escaping - shows return type restriction shows return type restriction - shows underscore restriction shows underscore restriction - shows block args if a def has `yield` shows block args if a def has `yield` - shows typeof restriction of arg with highlighting shows typeof restriction of arg with highlighting - shows external name of arg shows external name of arg - doc - inherits doc from previous def (no extra comment) inherits doc from previous def (no extra comment) - inherits doc from ancestor (no extra comment) inherits doc from ancestor (no extra comment) - trailing comment is not a doc comment trailing comment is not a doc comment - inherits doc from ancestor (use :inherit:) inherits doc from ancestor (use :inherit:) - inherits doc from ancestor (use :inherit: plus more content) inherits doc from ancestor (use :inherit: plus more content) - trailing comment is not part of a doc comment trailing comment is not part of a doc comment - gets doc from underlying method gets doc from underlying method -Restrictions - errors if using typeof in block restriction errors if using typeof in block restriction - works with union against unions of generics works with union against unions of generics - works with static array (#637) works with static array (#637) - matches virtual type against alias matches virtual type against alias - self always matches instance type in return type self always matches instance type in return type - works with generic class metaclass vs. generic class metaclass works with generic class metaclass vs. generic class metaclass - matches number in bound free variable (#13605) matches number in bound free variable (#13605) - works with generic compared to fixed (primitive) type works with generic compared to fixed (primitive) type - errors if using NamedTuple with positional args errors if using NamedTuple with positional args - sets number as free variable (#2699) sets number as free variable (#2699) - matches free variable for type variable matches free variable for type variable - errors if using Tuple with named args errors if using Tuple with named args - should not let GenericChild(Base) pass as a GenericBase(Child) (#1294) should not let GenericChild(Base) pass as a GenericBase(Child) (#1294) - restricts aliased typedef type (#9474) restricts aliased typedef type (#9474) - works with static array that uses underscore works with static array that uses underscore - self always matches instance type in restriction self always matches instance type in restriction - restricts virtual metaclass type against metaclass (#3438) restricts virtual metaclass type against metaclass (#3438) - errors if can't find type on lookup with nested type errors if can't find type on lookup with nested type - allows passing recursive type to free var (#1076) allows passing recursive type to free var (#1076) - passes #278 passes #278 - errors if can't find type on lookup errors if can't find type on lookup - does not treat single path as free variable when given number (2) (#11859) does not treat single path as free variable when given number (2) (#11859) - restricts class union type to overloads with classes restricts class union type to overloads with classes - errors on T::Type that's a union when used from block type restriction errors on T::Type that's a union when used from block type restriction - errors if using typeof errors if using typeof - errors if using typeof in block restriction errors if using typeof in block restriction - restricts class union type to overloads with classes (2) restricts class union type to overloads with classes (2) - does not treat single path as free variable when given number (1) (#11859) does not treat single path as free variable when given number (1) (#11859) - errors if using typeof inside generic type errors if using typeof inside generic type - errors on T::Type that's union when used from type restriction errors on T::Type that's union when used from type restriction - errors if using free var without forall errors if using free var without forall - doesn't error if using NamedTuple with no args doesn't error if using NamedTuple with no args - restriction_of? - Generic vs Path - keeps typed Generic before untyped Path keeps typed Generic before untyped Path - inserts untyped Generic before untyped Path inserts untyped Generic before untyped Path - inserts untyped Generic before untyped Path (2) inserts untyped Generic before untyped Path (2) - keeps untyped Generic before untyped Path keeps untyped Generic before untyped Path - inserts typed Generic before untyped Path inserts typed Generic before untyped Path - Path vs NumberLiteral - inserts constant before number literal of same value with generic arguments inserts constant before number literal of same value with generic arguments - inserts number literal before constant of same value with generic arguments inserts number literal before constant of same value with generic arguments - GenericClassType vs GenericClassInstanceType - keeps GenericClassInstanceType before GenericClassType keeps GenericClassInstanceType before GenericClassType - doesn't mix different generic classes doesn't mix different generic classes - inserts GenericClassInstanceType before GenericClassType inserts GenericClassInstanceType before GenericClassType - works with classes in different namespaces works with classes in different namespaces - Path vs Path - inserts typed Path before untyped Path inserts typed Path before untyped Path - keeps typed Path before untyped Path keeps typed Path before untyped Path - Union - orders union before generic (#12330) orders union before generic (#12330) - handles redefinitions (1) (#12330) handles redefinitions (1) (#12330) - handles redefinitions (2) (#12330) handles redefinitions (2) (#12330) - Generic vs Generic - keeps typed Generic before untyped Generic keeps typed Generic before untyped Generic - inserts typed Generic before untyped Generic inserts typed Generic before untyped Generic - free variables - keeps path before free variable with same name keeps path before free variable with same name - inserts path before free variable even if free var resolves to a more specialized type inserts path before free variable even if free var resolves to a more specialized type - keeps constant before free variable with same name keeps constant before free variable with same name - inserts constant before free variable with same name inserts constant before free variable with same name - keeps path before free variable even if free var resolves to a more specialized type keeps path before free variable even if free var resolves to a more specialized type - inserts path before free variable with same name inserts path before free variable with same name - NamedTuple vs NamedTuple - keeps more specialized NamedTuple before less specialized one keeps more specialized NamedTuple before less specialized one - doesn't mix incompatible NamedTuples (#10238) doesn't mix incompatible NamedTuples (#10238) - inserts more specialized NamedTuple before less specialized one inserts more specialized NamedTuple before less specialized one - Underscore vs Path - keeps underscore after Path (#12854) keeps underscore after Path (#12854) - works with splats and modules, under -Dpreview_overload_order (#12854) works with splats and modules, under -Dpreview_overload_order (#12854) - inserts Path before underscore (#12854) inserts Path before underscore (#12854) - Metaclass vs Path - doesn't error if path is undefined and method is not called (2) (#12516) doesn't error if path is undefined and method is not called (2) (#12516) - keeps metaclass before Value keeps metaclass before Value - inserts metaclass before Class inserts metaclass before Class - doesn't error if path is undefined and method is not called (1) (#12516) doesn't error if path is undefined and method is not called (1) (#12516) - inserts metaclass before Object inserts metaclass before Object - inserts metaclass before Value inserts metaclass before Value - keeps metaclass before Class keeps metaclass before Class - keeps metaclass before Object keeps metaclass before Object - Metaclass vs Metaclass - keeps typed Metaclass before untyped Metaclass keeps typed Metaclass before untyped Metaclass - inserts typed Metaclass before untyped Metaclass inserts typed Metaclass before untyped Metaclass - restrict - restricts type with superclass restricts type with superclass - restricts type with included module restricts type with included module - restricts class against uninstantiated generic base class through multiple inheritance (2) (#9660) restricts class against uninstantiated generic base class through multiple inheritance (2) (#9660) - restricts virtual type with included module 2 restricts virtual type with included module 2 - restricts module through generic include (#4287) restricts module through generic include (#4287) - restricts generic module instance with another module restricts generic module instance with another module - restricts type with same type restricts type with same type - restricts generic module instance with another generic module instance restricts generic module instance with another generic module instance - restricts virtual type with included module 1 restricts virtual type with included module 1 - restricts generic module instance with class restricts generic module instance with class - restricts module with another module restricts module with another module - restricts type with another type restricts type with another type - restricts class against uninstantiated generic base class through multiple inheritance (1) (#9660) restricts class against uninstantiated generic base class through multiple inheritance (1) (#9660) - restricts virtual generic class against uninstantiated generic subclass (2) restricts virtual generic class against uninstantiated generic subclass (2) - restricts virtual generic class against uninstantiated generic subclass (1) restricts virtual generic class against uninstantiated generic subclass (1) - works with generic class metaclass vs. generic instance class metaclass works with generic class metaclass vs. generic instance class metaclass - doesn't error if using Tuple with no args doesn't error if using Tuple with no args - sets number as unbound generic type var (#13110) sets number as unbound generic type var (#13110) - makes metaclass subclass pass parent metaclass restriction (#2079) makes metaclass subclass pass parent metaclass restriction (#2079) - matches alias against alias in block type matches alias against alias in block type -.system - failing command failing command -sh: 1: commanddoesnotexist: not found - command does not exist command does not exist - successful command with output successful command with output - successful command successful command -ASTNode#to_s - does to_s of "%r()imx" does to_s of "%r()imx" - 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 "def foo(@[Foo] x : T = 1)\nend" does to_s of "def foo(@[Foo] x : T = 1)\nend" - does to_s of "{ {1, 2, 3} }" does to_s of "{ {1, 2, 3} }" - 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 "def foo(*args : _)\nend" does to_s of "def foo(*args : _)\nend" - does to_s of "foo { |i| i.bar { i } }" does to_s of "foo { |i| i.bar { i } }" - does to_s of "(1 + 2).as(Int32)" does to_s of "(1 + 2).as(Int32)" - does to_s of "begin\n ()\nend" does to_s of "begin\n ()\nend" - does to_s of "&-1" does to_s of "&-1" - 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 "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 "{(1 + 2)}" does to_s of "{(1 + 2)}" - does to_s of "def foo(x, **args, &block)\nend" does to_s of "def foo(x, **args, &block)\nend" - does to_s of "lib Foo\nend" does to_s of "lib Foo\nend" - does to_s of "macro foo(**args)\nend" does to_s of "macro foo(**args)\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 "macro foo\n{% verbatim do %}1{% end %}\nend" does to_s of "macro foo\n{% verbatim do %}1{% end %}\nend" - does to_s of "%r()" does to_s of "%r()" - does to_s of "foo.*" does to_s of "foo.*" - 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 "def foo(**options, &block)\nend" does to_s of "def foo(**options, &block)\nend" - does to_s of "foo(a.as(Int32))" does to_s of "foo(a.as(Int32))" - does to_s of ":\"{\"" does to_s of ":\"{\"" - does to_s of "1 && (a = 2)" does to_s of "1 && (a = 2)" - does to_s of "{{ foo }}" does to_s of "{{ foo }}" - does to_s of "/a/x" does to_s of "/a/x" - 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 "yield(1)" does to_s of "yield(1)" - does to_s of "macro foo\n 123\nend" does to_s of "macro foo\n 123\nend" - does to_s of "if true\n (1)\nend" does to_s of "if true\n (1)\nend" - does to_s of "`\\n\\0`" does to_s of "`\\n\\0`" - does to_s of "(1 & 2) & (3 | 4)" does to_s of "(1 & 2) & (3 | 4)" - 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 "{% if foo %}\n foo_then\n{% end %}" does to_s of "{% if foo %}\n foo_then\n{% end %}" - does to_s of "/hello world/imx" does to_s of "/hello world/imx" - does to_s of "asm(\"nop\" :::: \"volatile\")" does to_s of "asm(\"nop\" :::: \"volatile\")" - does to_s of "%r{\#{1}\\/\\0}" does to_s of "%r{\#{1}\\/\\0}" - 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 "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 "enum Foo\n A = 0\n B\nend" does to_s of "enum Foo\n A = 0\n B\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 "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 "/ /" does to_s of "/ /" - does to_s of `#{::String.interpolation(x)}` does to_s of `#{::String.interpolation(x)}` - does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" - does to_s of "@foo.bar" does to_s of "@foo.bar" - 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 "Foo(\"bar baz\": Int32)" does to_s of "Foo(\"bar baz\": Int32)" - does to_s of "def foo(x, @[Foo] **args)\nend" does to_s of "def foo(x, @[Foo] **args)\nend" - does to_s of "foo()" does to_s of "foo()" - does to_s of "macro foo\n\\{{ @type }}\nend" does to_s of "macro foo\n\\{{ @type }}\nend" - does to_s of "1.+(a: 2)" does to_s of "1.+(a: 2)" - does to_s of "&+1" does to_s of "&+1" - 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 "_foo.bar" does to_s of "_foo.bar" - does to_s of x = (1 -2 -) does to_s of x = (1 -2 -) - 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 "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 "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" does to_s of "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" - does to_s of "foo : A | (B -> C)" does to_s of "foo : A | (B -> C)" - does to_s of "({} of K => V).foo" does to_s of "({} of K => V).foo" - does to_s of "1.+(&block)" does to_s of "1.+(&block)" - does to_s of "Foo()" does to_s of "Foo()" - does to_s of "asm(\"nop\" ::::)" does to_s of "asm(\"nop\" ::::)" - does to_s of "lib Foo\n FOO = 0\nend" does to_s of "lib Foo\n FOO = 0\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 "begin\n (1)\n 2\nend" does to_s of "begin\n (1)\n 2\nend" - does to_s of "1.[](2) do\nend" does to_s of "1.[](2) do\nend" - 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 "1 <= 2 <= 3" does to_s of "1 <= 2 <= 3" - does to_s of "foo(x : (T -> U).class)" does to_s of "foo(x : (T -> U).class)" - does to_s of "def foo(\"bar baz\" qux)\nend" does to_s of "def foo(\"bar baz\" qux)\nend" - does to_s of "->::foo(Int32, String)" does to_s of "->::foo(Int32, String)" - does to_s of "1.~(2)" does to_s of "1.~(2)" - does to_s of "foo(x : (T -> U) | V)" does to_s of "foo(x : (T -> U) | V)" - does to_s of "\"\\e\\0\\\"\"" does to_s of "\"\\e\\0\\\"\"" - does to_s of "def foo(x y)\nend" does to_s of "def foo(x y)\nend" - does to_s of "1.//(2, a: 3)" does to_s of "1.//(2, a: 3)" - does to_s of "foo.%" does to_s of "foo.%" - does to_s of "foo &.bar(1, 2, 3)" does to_s of "foo &.bar(1, 2, 3)" - does to_s of "1_f32" does to_s of "1_f32" - does to_s of "begin\n (1)\nrescue\nend" does to_s of "begin\n (1)\nrescue\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 "def foo(**args : T)\nend" does to_s of "def foo(**args : T)\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).as?(Int32)" does to_s of "(1 + 2).as?(Int32)" - does to_s of "return true ? 1 : 2" does to_s of "return true ? 1 : 2" - does to_s of "foo(x : Foo((T -> U)))" does to_s of "foo(x : Foo((T -> U)))" - does to_s of "!a" does to_s of "!a" - does to_s of "foo.nil?" does to_s of "foo.nil?" - does to_s of "foo._bar" does to_s of "foo._bar" - 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 "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 "begin\n (1)\nend" does to_s of "begin\n (1)\nend" - does to_s of "1e10_f64" does to_s of "1e10_f64" - does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" - 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 "/\\?/" does to_s of "/\\?/" - does to_s of "a.as?(Int32)" does to_s of "a.as?(Int32)" - does to_s of "macro foo\n\\{%@type %}\nend" does to_s of "macro foo\n\\{%@type %}\nend" - does to_s of "他.说 = \"你好\"" does to_s of "他.说 = \"你好\"" - does to_s of "1.~(2) do\nend" does to_s of "1.~(2) do\nend" - does to_s of "{% foo %}" does to_s of "{% foo %}" - 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 : (T -> U) -> V, W] = 1" does to_s of "foo[x : (T -> U) -> V, W] = 1" - does to_s of "/\\(group\\)/" does to_s of "/\\(group\\)/" - does to_s of "case 1; when .foo?; 2; end" does to_s of "case 1; when .foo?; 2; end" - does to_s of "1.[]=" does to_s of "1.[]=" - does to_s of "def foo(**args)\nend" does to_s of "def foo(**args)\nend" - does to_s of "%r(/)" does to_s of "%r(/)" - does to_s of "%x(whoami)" does to_s of "%x(whoami)" - does to_s of "def foo(& : (->))\nend" does to_s of "def foo(& : (->))\nend" - does to_s of "macro foo(x, *y)\nend" does to_s of "macro foo(x, *y)\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\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 "他.说(\"你好\")" does to_s of "他.说(\"你好\")" - does to_s of "def foo(@[Foo] *args)\nend" does to_s of "def foo(@[Foo] *args)\nend" - does to_s of "def foo(& : ->)\nend" does to_s of "def foo(& : ->)\nend" - does to_s of "1.&**" does to_s of "1.&**" - does to_s of "enum A : B\nend" does to_s of "enum A : B\nend" - does to_s of "foo &.bar" does to_s of "foo &.bar" - does to_s of "(1 || 1.1).as(Int32)" does to_s of "(1 || 1.1).as(Int32)" - does to_s of "macro foo(x, **args)\nend" does to_s of "macro foo(x, **args)\nend" - does to_s of "%r( )" does to_s of "%r( )" - does to_s of "[(1 + 2)] of Int32" does to_s of "[(1 + 2)] of Int32" - does to_s of "\"\#{(1 + 2)}\"" does to_s of "\"\#{(1 + 2)}\"" - does to_s of "def foo(x : T = 1)\nend" does to_s of "def foo(x : T = 1)\nend" - does to_s of "->::Foo::Bar.foo" does to_s of "->::Foo::Bar.foo" - does to_s of "macro foo(*, __var var)\nend" does to_s of "macro foo(*, __var var)\nend" - does to_s of "lib Foo::Bar\nend" does to_s of "lib Foo::Bar\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 "1.+ do\nend" does to_s of "1.+ do\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 "foo(bar)" does to_s of "foo(bar)" - 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((T -> U)))\nend" does to_s of "def foo(x : Foo((T -> U)))\nend" - does to_s of "foo : (A | B).class" does to_s of "foo : (A | B).class" - does to_s of "macro foo\n{% @type %}\nend" does to_s of "macro foo\n{% @type %}\nend" - 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 "macro foo\n{{ @type }}\nend" does to_s of "macro foo\n{{ @type }}\nend" - does to_s of "(1 <= 2) <= 3" does to_s of "(1 <= 2) <= 3" - does to_s of "alias Foo::Bar = Void" does to_s of "alias Foo::Bar = Void" - does to_s of "1.as(Int32)" does to_s of "1.as(Int32)" - does to_s of "(a = 2) && 1" does to_s of "(a = 2) && 1" - does to_s of "macro foo(*, var)\nend" does to_s of "macro foo(*, var)\nend" - does to_s of "-> : Int32 do\nend" does to_s of "-> : Int32 do\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 "lib LibC\n fun getchar(Int, Float)\nend" does to_s of "lib LibC\n fun getchar(Int, Float)\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 "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 "{ {foo: 2} }" does to_s of "{ {foo: 2} }" - does to_s of "!(1 < 2)" does to_s of "!(1 < 2)" - does to_s of "/hello world/" does to_s of "/hello world/" - 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 "foo(1, (2 + 3), bar: (4 + 5))" does to_s of "foo(1, (2 + 3), bar: (4 + 5))" - does to_s of "asm(\"bl trap\" :::: \"unwind\")" does to_s of "asm(\"bl trap\" :::: \"unwind\")" - does to_s of "1[2, x: 3, &.foo] = 4" does to_s of "1[2, x: 3, &.foo] = 4" - does to_s of "..3" does to_s of "..3" - does to_s of "1.responds_to?(:to_s)" does to_s of "1.responds_to?(:to_s)" - 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)\n yield\nend" does to_s of "def foo(**x)\n yield\nend" - does to_s of "1 <= (2 <= 3)" does to_s of "1 <= (2 <= 3)" - does to_s of "macro foo(x, @[Foo] *y)\nend" does to_s of "macro foo(x, @[Foo] *y)\nend" - does to_s of "macro foo(@[Foo] &block)\nend" does to_s of "macro foo(@[Foo] &block)\nend" - does to_s of ":foo" does to_s of ":foo" - does to_s of "macro foo(@[Foo] id)\nend" does to_s of "macro foo(@[Foo] id)\nend" - 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 "foo(&.==(2))" does to_s of "foo(&.==(2))" - does to_s of "1_f64" does to_s of "1_f64" - does to_s of "(~1).foo" does to_s of "(~1).foo" - does to_s of "(1..)" does to_s of "(1..)" - 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 "`\#{1}\\n\\0`" does to_s of "`\#{1}\\n\\0`" - does to_s of "foo x: 1, y: 2, &.bar" does to_s of "foo x: 1, y: 2, &.bar" - does to_s of "1[2, x: 3, &.foo]?" does to_s of "1[2, x: 3, &.foo]?" - does to_s of "{ {1 => 2} }" does to_s of "{ {1 => 2} }" - 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 "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 "macro foo\n %bar = 1; end" does to_s of "macro foo\n %bar = 1; end" - does to_s of "%(\"\#{foo}\")" does to_s of "%(\"\#{foo}\")" - does to_s of "1.&*" does to_s of "1.&*" - does to_s of "def foo(@[Foo] x y)\nend" does to_s of "def foo(@[Foo] x y)\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 "macro foo\n %bar{1, x} = 1\nend" does to_s of "macro foo\n %bar{1, x} = 1\nend" - does to_s of "1 & 2 & (3 | 4)" does to_s of "1 & 2 & (3 | 4)" - does to_s of "1[2, x: 3, &.foo]" does to_s of "1[2, x: 3, &.foo]" - does to_s of "def foo(@[Foo] **args)\nend" does to_s of "def foo(@[Foo] **args)\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 "alias Foo = Void" does to_s of "alias Foo = Void" - 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 "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 "macro foo(&)\nend" does to_s of "macro foo(&)\nend" - does to_s of "{ {1, 2, 3} => 4 }" does to_s of "{ {1, 2, 3} => 4 }" - does to_s of "{(1 + 2) => (3 + 4)}" does to_s of "{(1 + 2) => (3 + 4)}" - does to_s of "あ.い, う.え.お = 1, 2" does to_s of "あ.い, う.え.お = 1, 2" - does to_s of "type(Foo = Void)" does to_s of "type(Foo = Void)" - does to_s of "{foo: (1 + 2)}" does to_s of "{foo: (1 + 2)}" - does to_s of "\"\#{1}\\0\"" does to_s of "\"\#{1}\\0\"" - does to_s of "foo { |(x, (y, z))| x }" does to_s of "foo { |(x, (y, z))| x }" - does to_s of "def foo(x, **args)\nend" does to_s of "def foo(x, **args)\nend" - does to_s of "foo(\"bar baz\": 2)" does to_s of "foo(\"bar baz\": 2)" - does to_s of "foo(3, &.*(2))" does to_s of "foo(3, &.*(2))" - does to_s of "fun foo\nend" does to_s of "fun foo\nend" - does to_s of "case 1; in .foo?; 2; end" does to_s of "case 1; in .foo?; 2; end" - does to_s of "/\\s/" does to_s of "/\\s/" - does to_s of "foo._bar(1)" does to_s of "foo._bar(1)" - does to_s of "1[&.foo]?" does to_s of "1[&.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 "([] of T).foo" does to_s of "([] of T).foo" - does to_s of "offsetof(Foo, @bar)" does to_s of "offsetof(Foo, @bar)" - does to_s of "macro foo(*var)\nend" does to_s of "macro foo(*var)\nend" - does to_s of "1[&.foo] = 2" does to_s of "1[&.foo] = 2" - does to_s of "/\#{1 / 2}/" does to_s of "/\#{1 / 2}/" - does to_s of "(1 + 2)..3" does to_s of "(1 + 2)..3" - does to_s of "1.//(2, &block)" does to_s of "1.//(2, &block)" - 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.responds_to?(:\"&&\")" does to_s of "1.responds_to?(:\"&&\")" - does to_s of "# doc\ndef foo\nend" does to_s of "# doc\ndef foo\nend" - does to_s of "%r{\\/\\0}" does to_s of "%r{\\/\\0}" - does to_s of "foo { |(x, y)| x }" does to_s of "foo { |(x, y)| x }" - does to_s of "macro foo(@[Foo] &)\nend" does to_s of "macro foo(@[Foo] &)\nend" - does to_s of "/\\//" does to_s of "/\\//" - does to_s of "macro foo(&block)\nend" does to_s of "macro foo(&block)\nend" - does to_s of "def foo\n yield\nend" does to_s of "def foo\n yield\nend" - does to_s of "1.0" does to_s of "1.0" - 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 "macro foo(@[Foo] **args)\nend" does to_s of "macro foo(@[Foo] **args)\nend" - does to_s of "macro foo\n %bar = 1\nend" does to_s of "macro foo\n %bar = 1\nend" - does to_s of "def foo(x, **args, &block : _ -> _)\nend" does to_s of "def foo(x, **args, &block : _ -> _)\nend" -Semantic: return - infers return type with many returns (2) infers return type with many returns (2) - errors if non-type free var cannot be inferred errors if non-type free var cannot be inferred - can use type var as return type with an inherited generic class can use type var as return type with an inherited generic class - can use free var in return type (#2492) can use free var in return type (#2492) - infers return type infers return type - doesn't confuse return type from base class doesn't confuse return type from base class - infers return type with many returns (1) infers return type with many returns (1) - can use type var as return type (#1226) can use type var as return type (#1226) - forms a tuple from multiple return values forms a tuple from multiple return values - can use non-type free var in return type (2) (#6543) can use non-type free var in return type (2) (#6543) - allows returning NoReturn instead of the wanted type allows returning NoReturn instead of the wanted type - types return if true types return if true - allows nilable return type to match subclasses (#1735) allows nilable return type to match subclasses (#1735) - types bug (#1823) types bug (#1823) - can use type var as return type with an included generic module can use type var as return type with an included generic module - errors on return in top level errors on return in top level - flattens splats inside multiple return values flattens splats inside multiple return values - can use non-type free var in return type (#6543) can use non-type free var in return type (#6543) + command expansion + expands ldflags expands ldflags + variadic calls + promotes float promotes float + promotes int promotes int + promotes enum promotes enum Crystal::Macro - macro if methods - executes then executes then - executes cond executes cond - executes else executes else - uninitialized var methods - executes var executes var - executes type executes type - Crystal::ClassDef - executes type_vars executes type_vars - executes kind executes kind - executes superclass executes superclass - executes struct? executes struct? - executes body executes body - executes splat_index executes splat_index - executes abstract? executes abstract? - executes name executes name - Crystal::EnumDef - executes base_type executes base_type - executes body executes body - executes kind executes kind - executes name executes name macro for methods - executes vars executes vars executes exp executes exp executes body executes body - Crystal::Select - executes whens executes whens - executes else executes else + executes vars executes vars + Crystal::NamedTupleLiteral + creates a named tuple literal with a var creates a named tuple literal with a var + executes has_key? executes has_key? + executes []= executes []= + executes double splat with arg executes double splat with arg + executes double splat executes double splat + #each + without the value argument + builds the correct array builds the correct array + without either argument + builds the correct array builds the correct array + with both arguments + builds the correct array builds the correct array + without the key argument + builds the correct array builds the correct array + executes is_a? executes is_a? + executes values executes values + executes size executes size + executes to_a executes to_a + executes [] with invalid key type executes [] with invalid key type + executes double splat executes double splat + executes map executes map + executes [] executes [] + executes [] not found executes [] not found + executes keys executes keys + executes empty? executes empty? + executes assign executes assign + Crystal::RangeLiteral + #each #each + executes begin executes begin + executes excludes_end? executes excludes_end? + executes end executes end + executes to_a executes to_a + executes map executes map cast methods executes to executes to executes obj executes obj - Crystal::CStructOrUnionDef - executes name executes name - executes body executes body - executes kind executes kind - executes union? executes union? - case methods - when - executes cond executes cond - executes exhaustive? executes exhaustive? - executes when conds executes when conds - executes when exhaustive? executes when exhaustive? - executes when body executes when body - executes whens executes whens - executes else executes else - in - executes exhaustive? executes exhaustive? - executes whens executes whens - executes when exhaustive? executes when exhaustive? - block methods - executes body executes body - executes args executes args - executes splat_index executes splat_index - #warning - emits a top level warning emits a top level warning - flag? - has flag has flag - doesn't have flag doesn't have flag - readinstancevar methods - executes obj executes obj - executes name executes name - Crystal::Include - executes name executes name - regex methods - executes source executes source - executes options executes options - Crystal::Asm - executes alignstack? executes alignstack? - executes inputs executes inputs - executes can_throw? executes can_throw? - executes intel? executes intel? - executes outputs executes outputs - executes text executes text - executes volatile? executes volatile? - executes clobbers executes clobbers - classvar methods - executes name executes name - Crystal::LibDef - executes body executes body - executes kind executes kind - executes name executes name - metaclass methods - executes instance executes instance - executes resolve executes resolve - executes resolve? executes resolve? - call methods - executes named args name executes named args name - executes block arg (nop) executes block arg (nop) - executes global? executes global? - executes named args value executes named args value - executes block executes block - executes named args executes named args - executes receiver executes receiver + Crystal::MacroVar executes name executes name - executes block arg executes block arg - executes args executes args - executes assign without output executes assign without output - visibility modifier methods - executes exp executes exp - executes visibility executes visibility - union methods - executes resolve executes resolve - executes types executes types - executes resolve? executes resolve? - expressions methods executes expressions executes expressions - multi_assign methods - executes targets executes targets - executes values executes values - proc pointer methods - executes obj when present executes obj when present - executes args when not empty executes args when not empty - executes args when empty executes args when empty - executes obj when absent executes obj when absent - executes name executes name - executes global? executes global? - nilable cast methods - executes to executes to - executes obj executes obj - Crystal::AsmOperand - executes exp executes exp - executes constraint executes constraint + number methods + executes | executes | + executes & executes & + executes <= (false) executes <= (false) + executes <= (true) executes <= (true) + executes << executes << + executes <=> (returns nil) executes <=> (returns nil) + executes > (true) executes > (true) + executes kind executes kind + executes % executes % + #to_number #to_number + executes < (true) executes < (true) + executes >= (false) executes >= (false) + executes unary + executes unary + + executes ^ executes ^ + executes > (false) executes > (false) + executes + executes + + executes < (false) executes < (false) + preserves integer size (#10713) preserves integer size (#10713) + executes // executes // + executes + and preserves type executes + and preserves type + executes math operations using U/Int128 executes math operations using U/Int128 + executes * executes * + executes ** executes ** + executes unary - executes unary - + executes + with float executes + with float + executes <=> executes <=> + executes >> executes >> + executes - executes - + executes >= (true) executes >= (true) + executes unary ~ executes unary ~ node methods - #is_a? - union argument, unimplemented types union argument, unimplemented types - union argument, contains NoReturn union argument, contains NoReturn - union argument, undefined types union argument, undefined types - union argument, mergeable union argument, mergeable - union argument union argument - union argument, duplicate type union argument, duplicate type - #doc - returns the call's docs if present (wants_doc = true) returns the call's docs if present (wants_doc = true) - returns a multiline comment returns a multiline comment - returns an empty string if there are no docs on the node (wants_doc = false) returns an empty string if there are no docs on the node (wants_doc = false) - executes == on symbols (true) (#240) executes == on symbols (true) (#240) - executes == on numbers (true) executes == on numbers (true) stringify - expands macro with stringify call on call expands macro with stringify call on call + expands macro with stringify call on string expands macro with stringify call on string expands macro with stringify call on symbol expands macro with stringify call on symbol + expands macro with stringify call on call expands macro with stringify call on call expands macro with stringify call on number expands macro with stringify call on number - expands macro with stringify call on string expands macro with stringify call on string executes == on symbols (false) (#240) executes == on symbols (false) (#240) + executes == on numbers (true) executes == on numbers (true) + symbolize + expands macro with symbolize call on string expands macro with symbolize call on string + expands macro with symbolize call on id expands macro with symbolize call on id + expands macro with symbolize call on symbol expands macro with symbolize call on symbol + executes != on numbers (true) executes != on numbers (true) + location + column number column number + end line_number end line_number + end column number end column number + filename filename + line_number line_number + #doc_comment + ensures each newline has a `#` prefix ensures each newline has a `#` prefix + returns an empty MacroId if there are no docs on the node (wants_doc = false) returns an empty MacroId if there are no docs on the node (wants_doc = false) + returns the call's docs if present as a MacroId (wants_doc = true) returns the call's docs if present as a MacroId (wants_doc = true) #nil? NumberLiteral NumberLiteral NilLiteral NilLiteral Nop Nop - executes == on numbers (false) executes == on numbers (false) - location - filename filename - line_number line_number - end line_number end line_number - end column number end column number - column number column number - symbolize - expands macro with symbolize call on symbol expands macro with symbolize call on symbol - expands macro with symbolize call on id expands macro with symbolize call on id - expands macro with symbolize call on string expands macro with symbolize call on string id - expands macro with id call on call expands macro with id call on call + expands macro with id call on symbol expands macro with id call on symbol expands macro with id call on char expands macro with id call on char expands macro with id call on global path expands macro with id call on global path expands macro with id call on string expands macro with id call on string - expands macro with id call on path expands macro with id call on path - expands macro with id call on symbol expands macro with id call on symbol expands macro with id call on number expands macro with id call on number + expands macro with id call on path expands macro with id call on path + expands macro with id call on call expands macro with id call on call executes != on numbers (false) executes != on numbers (false) - executes != on numbers (true) executes != on numbers (true) - #doc_comment - ensures each newline has a `#` prefix ensures each newline has a `#` prefix - returns the call's docs if present as a MacroId (wants_doc = true) returns the call's docs if present as a MacroId (wants_doc = true) - returns an empty MacroId if there are no docs on the node (wants_doc = false) returns an empty MacroId if there are no docs on the node (wants_doc = false) + executes == on symbols (true) (#240) executes == on symbols (true) (#240) + executes == on numbers (false) executes == on numbers (false) + #is_a? + union argument union argument + union argument, contains NoReturn union argument, contains NoReturn + union argument, undefined types union argument, undefined types + union argument, duplicate type union argument, duplicate type + union argument, mergeable union argument, mergeable + union argument, unimplemented types union argument, unimplemented types + #doc + returns a multiline comment returns a multiline comment + returns the call's docs if present (wants_doc = true) returns the call's docs if present (wants_doc = true) + returns an empty string if there are no docs on the node (wants_doc = false) returns an empty string if there are no docs on the node (wants_doc = false) class_name executes class_name executes class_name executes class_name executes class_name @@ -6886,10601 +5560,8824 @@ executes class_name executes class_name executes class_name executes class_name executes class_name executes class_name - Crystal::Primitive + #parse_type + union - Union union - Union + generic generic + raises on extra unparsed tokens before the type raises on extra unparsed tokens before the type + union - | union - | + union - in generic union - in generic + proc proc + raises on empty string raises on empty string + path path + raises on extra unparsed tokens after the type raises on extra unparsed tokens after the type + raises on non StringLiteral arguments raises on non StringLiteral arguments + metaclass metaclass + exposes syntax warnings exposes syntax warnings + metavar methods + executes is_a? executes is_a? + executes id executes id + executes nothing executes nothing executes name executes name - printing - print print - pp pp - p p - p! p! - pp! pp! - puts puts - Crystal::TupleLiteral - executes map with constants executes map with constants - executes any? (false) executes any? (false) + #warning + emits a top level warning emits a top level warning + Crystal::LibDef + executes name executes name + executes body executes body + executes kind executes kind + global methods + executes name executes name + responds_to methods + executes receiver executes receiver + executes name executes name + Crystal::ExternalVar + executes name executes name + executes real_name executes real_name + executes type executes type + flag? + has flag has flag + doesn't have flag doesn't have flag + compares versions compares versions + Crystal::Include + executes name executes name + offsetof methods + executes type executes type + executes offset executes offset + regex methods + executes options executes options + executes source executes source + unary expression methods + executes is_a? executes is_a? + executes exp executes exp + type declaration methods + executes var executes var + executes value executes value + executes type executes type + executes var when instance var executes var when instance var + call methods + executes name executes name + executes block executes block + executes block arg executes block arg + executes args executes args + executes named args name executes named args name + executes named args value executes named args value + executes block arg (nop) executes block arg (nop) + executes receiver executes receiver + executes global? executes global? + executes named args executes named args + Crystal::External + executes is_a? executes is_a? + expressions methods + executes expressions executes expressions + classvar methods + executes name executes name + Crystal::MacroLiteral + executes value executes value + macro methods + executes name executes name + executes visibility executes visibility + executes args executes args + executes body executes body + executes splat_index executes splat_index + executes double_splat executes double_splat + executes block_arg executes block_arg + macro if methods + executes else executes else + executes then executes then + executes cond executes cond + multi_assign methods + executes values executes values + executes targets executes targets + Crystal::TypeDef + executes name executes name + executes type executes type + Crystal::ArrayLiteral + executes index out of bounds executes index out of bounds + #+ + with ArrayLiteral argument + concatenates the literals into an ArrayLiteral concatenates the literals into an ArrayLiteral + with TupleLiteral argument + concatenates the literals into an ArrayLiteral concatenates the literals into an ArrayLiteral + executes [] with computed range executes [] with computed range + executes find (finds) executes find (finds) + executes select executes select executes unshift executes unshift - executes includes? executes includes? - executes [] with range executes [] with range + executes splat executes splat + executes first executes first + executes [] with incomplete range executes [] with incomplete range + #map_with_index + without the element argument + returns the resulting array returns the resulting array + with both arguments + returns the resulting array returns the resulting array + without the index argument + returns the resulting array returns the resulting array + without either argument + returns the resulting array returns the resulting array + executes sort with numbers executes sort with numbers executes splat with symbols and strings executes splat with symbols and strings - executes join with strings executes join with strings - executes find (finds) executes find (finds) - executes uniq executes uniq - executes size executes size - executes splat with arg executes splat with arg - executes all? (true) executes all? (true) - executes all? (false) executes all? (false) + executes index 1 executes index 1 + executes splat with splat executes splat with splat + executes join executes join #each #each - executes push executes push + executes sort_by executes sort_by + executes of executes of + #each_with_index + without either argument + builds the correct array builds the correct array + without the index argument + builds the correct array builds the correct array + without the element argument + builds the correct array builds the correct array + with both arguments + builds the correct array builds the correct array + executes all? (true) executes all? (true) + executes reject executes reject executes empty? executes empty? + executes identify executes identify executes sort with ids and strings executes sort with ids and strings + executes is_a? executes is_a? executes map with arg executes map with arg + executes size executes size + executes map executes map + #- + with ArrayLiteral argument + removes the elements in RHS from LHS into an ArrayLiteral removes the elements in RHS from LHS into an ArrayLiteral + with TupleLiteral argument + removes the elements in RHS from LHS into an ArrayLiteral removes the elements in RHS from LHS into an ArrayLiteral + executes find (doesn't find) executes find (doesn't find) + creates an array literal with a var creates an array literal with a var + executes index 0 executes index 0 + executes [] with range executes [] with range + executes []= executes []= + executes reduce with no initial value executes reduce with no initial value + executes all? (false) executes all? (false) + executes join with strings executes join with strings + executes [] with two numbers executes [] with two numbers + executes type executes type executes last executes last - #each_with_index - without the element argument + executes includes? executes includes? + executes any? (false) executes any? (false) + executes map with constants executes map with constants + executes of (nop) executes of (nop) + executes sort with strings executes sort with strings + executes push executes push + executes sort with ids executes sort with ids + calls block exactly once for each element in #sort_by calls block exactly once for each element in #sort_by + executes any? (true) executes any? (true) + executes type (nop) executes type (nop) + executes reduce with initial value executes reduce with initial value + executes uniq executes uniq + def methods + executes abstract? executes abstract? + executes return_type executes return_type + executes accepts_block? executes accepts_block? + executes body executes body + executes receiver executes receiver + executes name executes name + executes double_splat executes double_splat + executes splat_index executes splat_index + executes block_arg executes block_arg + executes args executes args + executes visibility executes visibility + executes free_vars executes free_vars + Crystal::Select + executes else executes else + executes whens executes whens + path methods + executes global? executes global? + executes types executes types + executes resolve executes resolve + executes global executes global + executes names executes names + executes resolve? executes resolve? + require methods + executes path executes path + env + has key has key + doesn't have key doesn't have key + metaclass methods + executes resolve executes resolve + executes resolve? executes resolve? + executes instance executes instance + visibility modifier methods + executes exp executes exp + executes visibility executes visibility + is_a methods + executes receiver executes receiver + executes arg executes arg + Crystal::HashLiteral + executes [] executes [] + executes has_key? executes has_key? + executes type executes type + executes of_key (nop) executes of_key (nop) + executes values executes values + executes of_value (nop) executes of_value (nop) + executes empty? executes empty? + executes to_a executes to_a + executes of_key executes of_key + #each + without the key argument + builds the correct array builds the correct array + without the value argument builds the correct array builds the correct array without either argument builds the correct array builds the correct array with both arguments builds the correct array builds the correct array - without the index argument - builds the correct array builds the correct array + executes size executes size + executes double splat executes double splat + executes double splat executes double splat + executes double splat with arg executes double splat with arg + executes is_a? executes is_a? + creates a hash literal with a var creates a hash literal with a var + executes keys executes keys executes map executes map - executes select executes select - executes sort with numbers executes sort with numbers - executes [] with computed range executes [] with computed range + executes []= executes []= + executes [] not found executes [] not found + executes type (nop) executes type (nop) + executes of_value executes of_value + generic methods + executes types executes types + executes name executes name + executes resolve? executes resolve? + executes named_args executes named_args + executes resolve executes resolve + executes type_vars executes type_vars + Crystal::Alias + executes type executes type + executes name executes name + proc pointer methods + executes global? executes global? + executes obj when absent executes obj when absent + executes obj when present executes obj when present + executes args when not empty executes args when not empty + executes args when empty executes args when empty + executes name executes name + char methods + executes ord executes ord + Crystal::TupleLiteral + #+ + with ArrayLiteral argument + concatenates the literals into a TupleLiteral concatenates the literals into a TupleLiteral + with TupleLiteral argument + concatenates the literals into a TupleLiteral concatenates the literals into a TupleLiteral + executes empty? executes empty? executes splat executes splat - executes splat with splat executes splat with splat - executes sort with strings executes sort with strings - executes [] with 0 executes [] with 0 - executes any? (true) executes any? (true) - executes first executes first - executes find (doesn't find) executes find (doesn't find) - executes is_a? executes is_a? - executes [] with 1 executes [] with 1 - executes join executes join - executes [] out of bounds executes [] out of bounds + executes map with arg executes map with arg #map_with_index with both arguments returns the resulting tuple returns the resulting tuple - without the element argument + without the index argument returns the resulting tuple returns the resulting tuple without either argument returns the resulting tuple returns the resulting tuple - without the index argument + without the element argument returns the resulting tuple returns the resulting tuple - executes reject executes reject - #+ - with ArrayLiteral argument - concatenates the literals into a TupleLiteral concatenates the literals into a TupleLiteral - with TupleLiteral argument - concatenates the literals into a TupleLiteral concatenates the literals into a TupleLiteral + executes [] with computed range executes [] with computed range + executes is_a? executes is_a? + executes select executes select + executes all? (false) executes all? (false) + executes splat with arg executes splat with arg + executes map executes map + executes splat with symbols and strings executes splat with symbols and strings + executes any? (true) executes any? (true) + executes all? (true) executes all? (true) + executes map with constants executes map with constants + executes join with strings executes join with strings + executes [] with range executes [] with range #- with TupleLiteral argument removes the elements in RHS from LHS into a TupleLiteral removes the elements in RHS from LHS into a TupleLiteral with ArrayLiteral argument removes the elements in RHS from LHS into a TupleLiteral removes the elements in RHS from LHS into a TupleLiteral - executes [] with incomplete range executes [] with incomplete range executes sort with ids executes sort with ids + executes unshift executes unshift creates a tuple literal with a var creates a tuple literal with a var - Crystal::RangeLiteral - #each #each - executes excludes_end? executes excludes_end? - executes begin executes begin - executes map executes map - executes to_a executes to_a - executes end executes end - #parse_type - proc proc - union - | union - | - path path - generic generic - union - Union union - Union - exposes syntax warnings exposes syntax warnings - raises on empty string raises on empty string - raises on extra unparsed tokens after the type raises on extra unparsed tokens after the type - raises on extra unparsed tokens before the type raises on extra unparsed tokens before the type - metaclass metaclass - union - in generic union - in generic - raises on non StringLiteral arguments raises on non StringLiteral arguments - macro methods - executes block_arg executes block_arg - executes args executes args - executes double_splat executes double_splat - executes name executes name - executes splat_index executes splat_index - executes body executes body - executes visibility executes visibility - Crystal::Extend - executes name executes name - while methods - executes body executes body - executes cond executes cond - compares versions compares versions - type declaration methods - executes value executes value - executes type executes type - executes var when instance var executes var when instance var - executes var executes var - Crystal::ModuleDef - executes name executes name - executes type_vars executes type_vars - executes splat_index executes splat_index - executes body executes body - executes kind executes kind - Crystal::NamedTupleLiteral executes size executes size - executes double splat executes double splat - executes double splat executes double splat - executes [] not found executes [] not found - executes values executes values - executes is_a? executes is_a? - executes map executes map - executes to_a executes to_a - executes empty? executes empty? - executes keys executes keys - executes []= executes []= - executes [] with invalid key type executes [] with invalid key type - creates a named tuple literal with a var creates a named tuple literal with a var - executes [] executes [] - executes has_key? executes has_key? - #each - with both arguments - builds the correct array builds the correct array + executes sort with strings executes sort with strings + executes uniq executes uniq + executes [] with incomplete range executes [] with incomplete range + executes includes? executes includes? + #each_with_index without either argument builds the correct array builds the correct array - without the key argument + without the index argument builds the correct array builds the correct array - without the value argument + without the element argument builds the correct array builds the correct array - executes double splat with arg executes double splat with arg + with both arguments + builds the correct array builds the correct array + #each #each + executes reject executes reject + executes push executes push + executes find (finds) executes find (finds) + executes sort with ids and strings executes sort with ids and strings + executes [] out of bounds executes [] out of bounds + executes last executes last + executes sort with numbers executes sort with numbers + executes any? (false) executes any? (false) + executes splat with splat executes splat with splat + executes [] with 0 executes [] with 0 + executes first executes first + executes [] with 1 executes [] with 1 + executes find (doesn't find) executes find (doesn't find) + executes join executes join + Crystal::TypeOf + executes args executes args Crystal::TypeNode - executes union_types (union) executes union_types (union) - executes union_types (non-union) executes union_types (non-union) - executes < executes < - executes instance executes instance - executes class vars (with inheritance) executes class vars (with inheritance) - executes class vars executes class vars - #abstract? - Crystal::GenericModuleType Crystal::GenericModuleType - Crystal::NonGenericClassType - struct - abstract abstract - non-abstract non-abstract - class - abstract abstract - non-abstract non-abstract - Crystal::NonGenericModuleType Crystal::NonGenericModuleType - Crystal::GenericClassType - struct - abstract abstract - non-abstract non-abstract - class - non-abstract non-abstract - abstract abstract executes resolve executes resolve - visibility - private private - public public - #module? - Crystal::GenericModuleType Crystal::GenericModuleType - Crystal::NonGenericModuleType Crystal::NonGenericModuleType - Crystal::GenericClassType - class class - struct struct + #struct? Crystal::NonGenericClassType - struct struct class class - executes class methods executes class methods - executes instance_vars on symbol type executes instance_vars on symbol type - executes size of tuple metaclass executes size of tuple metaclass - #struct? - Crystal::NonGenericModuleType Crystal::NonGenericModuleType + struct struct Crystal::GenericClassType class class struct struct Crystal::GenericModuleType Crystal::GenericModuleType + Crystal::NonGenericModuleType Crystal::NonGenericModuleType + executes class_vars on symbol type executes class_vars on symbol type + executes class vars executes class vars + executes <= executes <= + executes union_types (non-union) executes union_types (non-union) + executes superclass executes superclass + visibility + public public + private private + #class? Crystal::NonGenericClassType + class class struct struct + Crystal::GenericModuleType Crystal::GenericModuleType + Crystal::NonGenericModuleType Crystal::NonGenericModuleType + Crystal::GenericClassType class class - executes <= executes <= - #nilable? - true true - false false - executes private? - false false - true true - executes resolve? executes resolve? - executes >= executes >= - #union? - true true - false false - executes ancestors executes ancestors - executes > executes > - executes ancestors (with generic) executes ancestors (with generic) - #has_inner_pointers? - works on references works on references - works on structs works on structs - works on primitive values works on primitive values - works on ReferenceStorage works on ReferenceStorage - == and != devirtualize generic type arguments (#10730) == and != devirtualize generic type arguments (#10730) - executes type_vars executes type_vars - #warning - emits a warning at a specific node emits a warning at a specific node - executes superclass executes superclass - executes class_vars on symbol type executes class_vars on symbol type - #id - does not include trailing + for virtual type does not include trailing + for virtual type - executes == executes == - executes class executes class - #includers - returns an array of types `self` is directly included in returns an array of types `self` is directly included in - executes instance_vars executes instance_vars - executes instance_vars on metaclass executes instance_vars on metaclass + struct struct #name + generic instance + prints generic type arguments prints generic type arguments + does not print extra commas for empty splat type var (1) does not print extra commas for empty splat type var (1) + does not print extra commas for empty splat type var (2) does not print extra commas for empty splat type var (2) + prints multiple arguments for splat type var prints multiple arguments for splat type var + does not print extra commas for empty splat type var (3) does not print extra commas for empty splat type var (3) + prints empty splat type var prints empty splat type var generic_args true - includes the generic_args of the type includes the generic_args of the type includes the generic_args of the instantiated type includes the generic_args of the instantiated type - with an invalid type argument - should raise the proper exception should raise the proper exception + includes the generic_args of the type includes the generic_args of the type false - does not include the generic_args of the type does not include the generic_args of the type does not include the generic_args of the instantiated type does not include the generic_args of the instantiated type - generic type - includes the generic_args of the instantiated type by default includes the generic_args of the instantiated type by default - includes the generic_args of the type by default includes the generic_args of the type by default - generic instance - prints empty splat type var prints empty splat type var - does not print extra commas for empty splat type var (2) does not print extra commas for empty splat type var (2) - does not print extra commas for empty splat type var (3) does not print extra commas for empty splat type var (3) - does not print extra commas for empty splat type var (1) does not print extra commas for empty splat type var (1) - prints multiple arguments for splat type var prints multiple arguments for splat type var - prints generic type arguments prints generic type arguments - namespaced type - should return the FQN of the type should return the FQN of the type + does not include the generic_args of the type does not include the generic_args of the type + with an invalid type argument + should raise the proper exception should raise the proper exception simple type returns the name of the type returns the name of the type + namespaced type + should return the FQN of the type should return the FQN of the type + generic type + includes the generic_args of the type by default includes the generic_args of the type by default + includes the generic_args of the instantiated type by default includes the generic_args of the instantiated type by default + executes != executes != + executes class vars (with inheritance) executes class vars (with inheritance) executes size of tuple executes size of tuple - executes methods executes methods + executes instance executes instance + #warning + emits a warning at a specific node emits a warning at a specific node + executes class executes class + == and != devirtualize generic type arguments (#10730) == and != devirtualize generic type arguments (#10730) public? + false false + true true + #union? + false false + true true + executes union_types (union) executes union_types (union) + executes > executes > + #abstract? + Crystal::NonGenericModuleType Crystal::NonGenericModuleType + Crystal::GenericClassType + struct + non-abstract non-abstract + abstract abstract + class + abstract abstract + non-abstract non-abstract + Crystal::NonGenericClassType + class + abstract abstract + non-abstract non-abstract + struct + non-abstract non-abstract + abstract abstract + Crystal::GenericModuleType Crystal::GenericModuleType + #nilable? true true false false + executes size of tuple metaclass executes size of tuple metaclass + executes instance_vars executes instance_vars + executes ancestors (with generic) executes ancestors (with generic) + executes == executes == + executes resolve? executes resolve? executes class_vars on metaclass executes class_vars on metaclass - #class? + executes >= executes >= + executes private? + true true + false false + executes type_vars executes type_vars + executes instance_vars on metaclass executes instance_vars on metaclass + #includers + returns an array of types `self` is directly included in returns an array of types `self` is directly included in + executes class methods executes class methods + #has_inner_pointers? + works on structs works on structs + works on references works on references + works on ReferenceStorage works on ReferenceStorage + works on primitive values works on primitive values + #module? + Crystal::NonGenericModuleType Crystal::NonGenericModuleType Crystal::GenericClassType - class class struct struct + class class Crystal::NonGenericClassType struct struct class class - Crystal::NonGenericModuleType Crystal::NonGenericModuleType Crystal::GenericModuleType Crystal::GenericModuleType - executes != executes != - exception handler methods - executes body executes body - executes rescue types executes rescue types - executes else (nop) executes else (nop) - executes ensure executes ensure - executes ensure (nop) executes ensure (nop) - executes rescue name executes rescue name - executes else executes else - executes rescue body executes rescue body - executes rescues executes rescues + executes instance_vars on symbol type executes instance_vars on symbol type + #id + does not include trailing + for virtual type does not include trailing + for virtual type + executes methods executes methods + executes ancestors executes ancestors + executes < executes < + macro id methods + forwards methods to string forwards methods to string + compares with string compares with string + compares with symbol compares with symbol + case methods + when + executes exhaustive? executes exhaustive? + executes when exhaustive? executes when exhaustive? + executes whens executes whens + executes cond executes cond + executes when conds executes when conds + executes when body executes when body + executes else executes else + in + executes exhaustive? executes exhaustive? + executes when exhaustive? executes when exhaustive? + executes whens executes whens + Crystal::Asm + executes volatile? executes volatile? + executes inputs executes inputs + executes can_throw? executes can_throw? + executes alignstack? executes alignstack? + executes outputs executes outputs + executes intel? executes intel? + executes clobbers executes clobbers + executes text executes text + string methods + executes string includes? string (false) executes string includes? string (false) + executes count executes count + executes camelcase executes camelcase + executes string =~ (false) executes string =~ (false) + executes [] with inclusive range executes [] with inclusive range + executes string includes? string (true) executes string includes? string (true) + executes string =~ (true) executes string =~ (true) + executes string + char executes string + char + executes downcase executes downcase + executes split with argument executes split with argument + executes gsub executes gsub + executes to_i executes to_i + executes [] with exclusive range executes [] with exclusive range + executes string == string executes string == string + executes string + string executes string + string + executes size executes size + executes tr executes tr + executes camelcase with lower executes camelcase with lower + executes string includes? char (true) executes string includes? char (true) + executes empty executes empty + executes string > string executes string > string + executes upcase executes upcase + executes strip executes strip + executes underscore executes underscore + executes to_i(base) executes to_i(base) + executes string starts_with? string (false) executes string starts_with? string (false) + executes string chomp executes string chomp + executes string ends_with? string (true) executes string ends_with? string (true) + executes string < string executes string < string + executes string > macroid executes string > macroid + executes string ends_with? char (false) executes string ends_with? char (false) + executes lines executes lines + executes chars executes chars + executes string starts_with? string (true) executes string starts_with? string (true) + executes string ends_with? char (true) executes string ends_with? char (true) + executes split without arguments executes split without arguments + executes to_utf16 executes to_utf16 + executes string starts_with? char (false) executes string starts_with? char (false) + executes [] with incomplete range executes [] with incomplete range + executes string ends_with? string (false) executes string ends_with? string (false) + executes capitalize executes capitalize + executes string starts_with? char (true) executes string starts_with? char (true) + executes string != string executes string != string + executes string includes? char (false) executes string includes? char (false) + executes string < macroid executes string < macroid + executes titleize executes titleize + executes camelcase with invalid lower arg type executes camelcase with invalid lower arg type + executes split with char argument executes split with char argument + executes [] with computed range executes [] with computed range + control expression methods + executes exp executes exp + executes exp (nop) executes exp (nop) if methods executes else (nop) executes else (nop) - executes then executes then executes else executes else executes cond executes cond - yield methods - executes expressions executes expressions - executes scope executes scope - executes scope (nop) executes scope (nop) - Crystal::MacroVar + executes then executes then + instancevar methods executes name executes name - executes expressions executes expressions - env - has key has key - doesn't have key doesn't have key - require methods - executes path executes path - path methods - executes names executes names - executes resolve? executes resolve? - executes resolve executes resolve - executes global? executes global? - executes global executes global - executes types executes types - Crystal::TypeDef + assign methods + executes target executes target + executes value executes value + instancevar methods executes name executes name - executes type executes type - global methods + Crystal::AsmOperand + executes exp executes exp + executes constraint executes constraint + proc literal methods + executes args executes args + executes return_type executes return_type + executes body executes body + Crystal::Primitive executes name executes name - or methods - executes left executes left - executes right executes right - Crystal::External - executes is_a? executes is_a? - number methods - executes & executes & - executes math operations using U/Int128 executes math operations using U/Int128 - executes ^ executes ^ - executes <=> executes <=> - executes > (true) executes > (true) - executes < (true) executes < (true) - executes + with float executes + with float - executes unary - executes unary - - executes ** executes ** - executes unary ~ executes unary ~ - executes - executes - - executes < (false) executes < (false) - executes >= (false) executes >= (false) - preserves integer size (#10713) preserves integer size (#10713) - executes <= (true) executes <= (true) - executes >> executes >> - executes <= (false) executes <= (false) - executes % executes % - executes unary + executes unary + - executes // executes // - executes <=> (returns nil) executes <=> (returns nil) - executes > (false) executes > (false) - executes >= (true) executes >= (true) - executes * executes * - executes + executes + - executes + and preserves type executes + and preserves type - executes | executes | - executes << executes << - #to_number #to_number - executes kind executes kind Crystal::FunDef - executes name executes name - executes variadic? executes variadic? - executes args executes args executes body executes body + executes real_name executes real_name executes has_body? executes has_body? + executes name executes name executes return_type executes return_type - executes real_name executes real_name - metavar methods - executes nothing executes nothing - executes is_a? executes is_a? - executes id executes id + executes args executes args + executes variadic? executes variadic? + yield methods + executes scope (nop) executes scope (nop) + executes scope executes scope + executes expressions executes expressions + Crystal::Extend executes name executes name - instancevar methods + Crystal::EnumDef + executes base_type executes base_type + executes kind executes kind + executes body executes body executes name executes name + exception handler methods + executes ensure (nop) executes ensure (nop) + executes body executes body + executes else (nop) executes else (nop) + executes else executes else + executes rescue types executes rescue types + executes rescue name executes rescue name + executes rescues executes rescues + executes rescue body executes rescue body + executes ensure executes ensure + executes assign without output executes assign without output and methods executes left executes left executes right executes right - arg methods - executes internal_name executes internal_name - executes restriction executes restriction - executes default_value executes default_value + proc notation methods + gets single output gets single output + executes resolve executes resolve + gets single input gets single input + gets multiple inputs gets multiple inputs + gets empty output gets empty output + executes resolve? executes resolve? + Crystal::ClassDef + executes abstract? executes abstract? + executes body executes body + executes struct? executes struct? executes name executes name - Crystal::Alias + executes kind executes kind + executes type_vars executes type_vars + executes superclass executes superclass + executes splat_index executes splat_index + nilable cast methods + executes to executes to + executes obj executes obj + readinstancevar methods + executes obj executes obj executes name executes name - executes type executes type - proc literal methods - executes return_type executes return_type + printing + puts puts + print print + pp! pp! + p! p! + p p + pp pp + while methods + executes cond executes cond executes body executes body + block methods executes args executes args - Crystal::ExternalVar - executes type executes type - executes name executes name - executes real_name executes real_name - executes assign executes assign - responds_to methods - executes receiver executes receiver - executes name executes name - instancevar methods + executes body executes body + executes splat_index executes splat_index + splat methods + executes exp executes exp + Crystal::CStructOrUnionDef + executes body executes body + executes union? executes union? + executes kind executes kind executes name executes name + union methods + executes types executes types + executes resolve executes resolve + executes resolve? executes resolve? symbol methods executes symbol != symbol executes symbol != symbol - executes symbol == symbol executes symbol == symbol forwards methods to string forwards methods to string - Crystal::MacroLiteral - executes value executes value + executes symbol == symbol executes symbol == symbol + arg methods + executes name executes name + executes restriction executes restriction + executes default_value executes default_value + executes internal_name executes internal_name + or methods + executes right executes right + executes left executes left Crystal::MacroExpression executes exp executes exp executes output? executes output? - string methods - executes string ends_with? char (true) executes string ends_with? char (true) - executes string starts_with? char (true) executes string starts_with? char (true) - executes downcase executes downcase - executes string > string executes string > string - executes string =~ (true) executes string =~ (true) - executes camelcase executes camelcase - executes string + string executes string + string - executes string starts_with? char (false) executes string starts_with? char (false) - executes string != string executes string != string - executes string < macroid executes string < macroid - executes to_utf16 executes to_utf16 - executes string == string executes string == string - executes gsub executes gsub - executes to_i(base) executes to_i(base) - executes string includes? char (true) executes string includes? char (true) - executes [] with incomplete range executes [] with incomplete range - executes empty executes empty - executes lines executes lines - executes chars executes chars - executes string starts_with? string (true) executes string starts_with? string (true) - executes string ends_with? string (false) executes string ends_with? string (false) - executes string =~ (false) executes string =~ (false) - executes string includes? string (false) executes string includes? string (false) - executes titleize executes titleize - executes string ends_with? string (true) executes string ends_with? string (true) - executes split with argument executes split with argument - executes [] with inclusive range executes [] with inclusive range - executes underscore executes underscore - executes camelcase with lower executes camelcase with lower - executes string < string executes string < string - executes [] with exclusive range executes [] with exclusive range - executes string + char executes string + char - executes [] with computed range executes [] with computed range - executes tr executes tr - executes string ends_with? char (false) executes string ends_with? char (false) - executes camelcase with invalid lower arg type executes camelcase with invalid lower arg type - executes string starts_with? string (false) executes string starts_with? string (false) - executes capitalize executes capitalize - executes string > macroid executes string > macroid - executes to_i executes to_i - executes string includes? string (true) executes string includes? string (true) - executes split with char argument executes split with char argument - executes count executes count - executes split without arguments executes split without arguments - executes string includes? char (false) executes string includes? char (false) - executes string chomp executes string chomp - executes strip executes strip - executes upcase executes upcase - executes size executes size - Crystal::AnnotationDef - executes kind executes kind - executes body executes body - executes name executes name - macro id methods - compares with symbol compares with symbol - compares with string compares with string - forwards methods to string forwards methods to string - generic methods - executes resolve executes resolve - executes type_vars executes type_vars - executes types executes types - executes resolve? executes resolve? + annotation methods + executes [] with StringLiteral executes [] with StringLiteral + executes [] with MacroId executes [] with MacroId + executes [] with SymbolLiteral executes [] with SymbolLiteral + executes [] with other ASTNode, but raises an error executes [] with other ASTNode, but raises an error + executes [] with NumberLiteral executes [] with NumberLiteral executes name executes name - executes named_args executes named_args - Crystal::ArrayLiteral - executes splat with splat executes splat with splat - executes any? (true) executes any? (true) - executes all? (false) executes all? (false) - executes size executes size - executes [] with range executes [] with range - executes any? (false) executes any? (false) - executes splat executes splat - executes of (nop) executes of (nop) - executes [] with computed range executes [] with computed range - executes type (nop) executes type (nop) - executes sort with ids and strings executes sort with ids and strings - executes type executes type - creates an array literal with a var creates an array literal with a var - executes sort with ids executes sort with ids - executes splat with symbols and strings executes splat with symbols and strings - executes reject executes reject - #map_with_index - with both arguments - returns the resulting array returns the resulting array - without the element argument - returns the resulting array returns the resulting array - without the index argument - returns the resulting array returns the resulting array - without either argument - returns the resulting array returns the resulting array - executes []= executes []= - executes push executes push - executes find (finds) executes find (finds) - executes map executes map - executes sort_by executes sort_by - executes includes? executes includes? - executes find (doesn't find) executes find (doesn't find) - #- - with ArrayLiteral argument - removes the elements in RHS from LHS into an ArrayLiteral removes the elements in RHS from LHS into an ArrayLiteral - with TupleLiteral argument - removes the elements in RHS from LHS into an ArrayLiteral removes the elements in RHS from LHS into an ArrayLiteral - executes map with constants executes map with constants - executes all? (true) executes all? (true) - #each #each - executes index 1 executes index 1 - executes [] with incomplete range executes [] with incomplete range - executes uniq executes uniq - executes map with arg executes map with arg - executes sort with numbers executes sort with numbers - executes last executes last - executes index 0 executes index 0 - executes join executes join - executes unshift executes unshift - executes select executes select - executes first executes first - executes is_a? executes is_a? - calls block exactly once for each element in #sort_by calls block exactly once for each element in #sort_by - executes empty? executes empty? - executes [] with two numbers executes [] with two numbers - #each_with_index - with both arguments - builds the correct array builds the correct array - without the index argument - builds the correct array builds the correct array - without the element argument - builds the correct array builds the correct array - without either argument - builds the correct array builds the correct array - #+ - with ArrayLiteral argument - concatenates the literals into an ArrayLiteral concatenates the literals into an ArrayLiteral - with TupleLiteral argument - concatenates the literals into an ArrayLiteral concatenates the literals into an ArrayLiteral - executes reduce with initial value executes reduce with initial value - executes index out of bounds executes index out of bounds - executes sort with strings executes sort with strings - executes join with strings executes join with strings - executes reduce with no initial value executes reduce with no initial value - executes of executes of - executes identify executes identify - splat methods - executes exp executes exp - char methods - executes ord executes ord - control expression methods - executes exp (nop) executes exp (nop) - executes exp executes exp - offsetof methods + uninitialized var methods + executes var executes var executes type executes type - executes offset executes offset - assign methods - executes value executes value - executes target executes target - unary expression methods - executes exp executes exp - executes is_a? executes is_a? - def methods - executes free_vars executes free_vars - executes visibility executes visibility - executes abstract? executes abstract? - executes block_arg executes block_arg + Crystal::ModuleDef + executes kind executes kind + executes type_vars executes type_vars + executes body executes body executes splat_index executes splat_index - executes return_type executes return_type - executes accepts_block? executes accepts_block? - executes receiver executes receiver - executes double_splat executes double_splat - executes args executes args executes name executes name - executes body executes body - proc notation methods - executes resolve executes resolve - gets multiple inputs gets multiple inputs - executes resolve? executes resolve? - gets single input gets single input - gets single output gets single output - gets empty output gets empty output - is_a methods - executes arg executes arg - executes receiver executes receiver - annotation methods - executes [] with MacroId executes [] with MacroId + Crystal::AnnotationDef + executes kind executes kind executes name executes name - executes [] with NumberLiteral executes [] with NumberLiteral - executes [] with StringLiteral executes [] with StringLiteral - executes [] with other ASTNode, but raises an error executes [] with other ASTNode, but raises an error - executes [] with SymbolLiteral executes [] with SymbolLiteral - Crystal::HashLiteral - executes map executes map - executes type (nop) executes type (nop) - executes to_a executes to_a - executes [] not found executes [] not found - executes type executes type - executes size executes size - executes [] executes [] - executes has_key? executes has_key? - executes []= executes []= - executes keys executes keys - executes of_key executes of_key - executes values executes values - executes of_value (nop) executes of_value (nop) - executes double splat executes double splat - executes double splat with arg executes double splat with arg - executes of_value executes of_value - executes empty? executes empty? - executes of_key (nop) executes of_key (nop) - executes double splat executes double splat - #each - without the value argument - builds the correct array builds the correct array - with both arguments - builds the correct array builds the correct array - without the key argument - builds the correct array builds the correct array - without either argument - builds the correct array builds the correct array - creates a hash literal with a var creates a hash literal with a var - executes is_a? executes is_a? - Crystal::TypeOf - executes args executes args + executes body executes body +Crystal::Doc::Type + #macros + sorts operators first sorts operators first + doesn't show types for alias type doesn't show types for alias type + finds construct when searching class method (#8095) finds construct when searching class method (#8095) + ASTNode has no superclass ASTNode has no superclass + #class_methods + 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 relative generic shows relative generic + shows relative path shows relative path + shows generic path with necessary colons shows generic path with necessary colons + #instance_methods + sorts operators first sorts operators first + ASTNode has no ancestors ASTNode has no ancestors +Crystal::CrystalPath + finds "other_test_files" finds "other_test_files" + finds "test_files/another" finds "test_files/another" + finds "test_files/file_one.cr" finds "test_files/file_one.cr" + doesn't finds "./crystal_path_spec.cr" doesn't finds "./crystal_path_spec.cr" + doesn't finds "../../src/file_three" doesn't finds "../../src/file_three" + finds "../test_folder" finds "../test_folder" + doesn't finds "file_two.cr" doesn't finds "file_two.cr" + finds "./test_folder/*" finds "./test_folder/*" + doesn't finds "test_folder/*" doesn't finds "test_folder/*" + doesn't finds "build/reproducible-path/crystal-1.14.0+dfsg/spec/compiler/crystal_path/crystal_path_spec.cr" doesn't finds "build/reproducible-path/crystal-1.14.0+dfsg/spec/compiler/crystal_path/crystal_path_spec.cr" + finds "test_files/yet_another" finds "test_files/yet_another" + finds "test_files/**" finds "test_files/**" + finds "test_files/file_one" finds "test_files/file_one" + finds "test_files/file_three" finds "test_files/file_three" + finds "test_files/*" finds "test_files/*" + doesn't finds "../crystal_path/test_files/file_one" doesn't finds "../crystal_path/test_files/file_one" + .expand_paths .expand_paths + finds "./file_two.cr" finds "./file_two.cr" + doesn't finds "test_files/missing_file.cr" doesn't finds "test_files/missing_file.cr" + doesn't finds "./crystal_path_spec" doesn't finds "./crystal_path_spec" + finds "test_files" finds "test_files" + finds "foo.cr" finds "foo.cr" + includes 'lib' by default includes 'lib' by default + finds "crystal_path_spec" finds "crystal_path_spec" + overrides path with environment variable overrides path with environment variable + finds "./test_folder/file_three.cr" finds "./test_folder/file_three.cr" + doesn't finds "test_folder/file_three.cr" doesn't finds "test_folder/file_three.cr" + finds "../**" finds "../**" + finds "test_files/file_four" finds "test_files/file_four" + #each_file_expansion + foo foo + ./foo.cr ./foo.cr + foo/bar foo/bar + foo.cr/bar foo.cr/bar + foo/bar/baz foo/bar/baz + foo.cr foo.cr + ./foo/bar/baz ./foo/bar/baz + ./foo/bar ./foo/bar + ./foo ./foo + foo.cr/bar.cr foo.cr/bar.cr + finds "test_files/file_one" finds "test_files/file_one" +Semantic: def overload + matches a union argument with free var matches a union argument with free var + types a call with overload self types a call with overload self + accepts overload with nilable type restriction accepts overload with nilable type restriction + doesn't match tuples of different sizes doesn't match tuples of different sizes + restrict matches to minimum necessary 1 restrict matches to minimum necessary 1 + reports no overload matches with correct method owner (#2083) reports no overload matches with correct method owner (#2083) + types a call with overload self with inherited type types a call with overload self with inherited type + gets free variable from union restriction gets free variable from union restriction + gives better error message with consecutive arguments sizes gives better error message with consecutive arguments sizes + uses method defined in base class if the restriction doesn't match uses method defined in base class if the restriction doesn't match + uses long name when no overload matches and name is the same (#1030) uses long name when no overload matches and name is the same (#1030) + matches tuples of different sizes matches tuples of different sizes + restricts on generic type without type arg restricts on generic type without type arg + errors if union restriction has multiple free vars (2) errors if union restriction has multiple free vars (2) + matches virtual type to union matches virtual type to union + restricts on generic type with free type arg restricts on generic type with free type arg + treats single splats with same restriction as equivalent (2) (#12579) treats single splats with same restriction as equivalent (2) (#12579) + filter union type with virtual filter union type with virtual + errors if no overload matches on union against named arg (#2640) errors if no overload matches on union against named arg (#2640) + types a call with overload selecting the most restrictive types a call with overload selecting the most restrictive + types a call with overload self in included module types a call with overload self in included module + compare self type with others compare self type with others + errors if union restriction has multiple free vars errors if union restriction has multiple free vars + lookup matches in virtual type inside union lookup matches in virtual type inside union + types a call with overload with yield types a call with overload with yield + matches a union argument with free var, more types (1) matches a union argument with free var, more types (1) + can call overload with aliased generic restriction can call overload with aliased generic restriction + matches on partial union matches on partial union + overloads with named argument (#4465) overloads with named argument (#4465) + includes splat symbol in error message includes splat symbol in error message + finds method after including module in generic module (#1201) finds method after including module in generic module (#1201) + matches a generic module argument matches a generic module argument + types a call with overload with yield after typing another call without yield types a call with overload with yield after typing another call without yield + prefers more specific overload than one with free variables prefers more specific overload than one with free variables + types a call with overload Object type first overload types a call with overload Object type first overload + types a call with overload selecting the most restrictive 2 types a call with overload selecting the most restrictive 2 + errors when binding free variable to different types errors when binding free variable to different types + doesn't match with wrong number of type arguments (#313) doesn't match with wrong number of type arguments (#313) + gives correct error message, looking up parent defs, when no overload matches gives correct error message, looking up parent defs, when no overload matches + types a call with overload types a call with overload + restricts union to generic class restricts union to generic class + overloads union against non-union (#2904) overloads union against non-union (#2904) + matches generic class instance type with another one matches generic class instance type with another one + matches types with free variables matches types with free variables + says `no overload matches` instead of `can't instantiate abstract class` on wrong argument in new method says `no overload matches` instead of `can't instantiate abstract class` on wrong argument in new method + gets free variable from union restriction without a union gets free variable from union restriction without a union + does not consider global paths as free variables (2) does not consider global paths as free variables (2) + types a call with overload with yield the other way types a call with overload with yield the other way + errors if generic type doesn't match errors if generic type doesn't match + overloads on metaclass (2) (#2916) overloads on metaclass (2) (#2916) + does not consider global paths as free variables (1) does not consider global paths as free variables (1) + matches a generic module argument with free var matches a generic module argument with free var + types a call with overload self other match types a call with overload self other match + matches a union metaclass argument with free var (#8071) matches a union metaclass argument with free var (#8071) + types a call with overload matches virtual 3 types a call with overload matches virtual 3 + types a call with overload matches virtual 2 types a call with overload matches virtual 2 + single type restriction wins over union single type restriction wins over union + compare_strictness + subsumption conflicts + positional vs named positional vs named + single splat vs named single splat vs named + named vs named named vs named + named vs double splat named vs double splat + positional vs single splat positional vs single splat + single splat vs double splat single splat vs double splat + positional vs positional positional vs positional + positional vs double splat positional vs double splat + specificity conflicts, named vs named + (required > splat) vs (optional > splat) (required > splat) vs (optional > splat) + (required > optional) vs (optional > splat) (required > optional) vs (optional > splat) + (required > splat) vs (required > splat) (required > splat) vs (required > splat) + (optional > splat) vs (optional > splat) (optional > splat) vs (optional > splat) + (required > optional) vs (required > splat) (required > optional) vs (required > splat) + (required > optional) vs (required > optional) (required > optional) vs (required > optional) + specificity conflicts, positional vs named + (required > optional) vs (required > splat) (required > optional) vs (required > splat) + (required > splat) vs (optional > splat) (required > splat) vs (optional > splat) + (required > splat) vs (required > splat) (required > splat) vs (required > splat) + (required > splat) vs (required > optional) (required > splat) vs (required > optional) + (required > optional) vs (optional > splat) (required > optional) vs (optional > splat) + (optional > splat) vs (required > optional) (optional > splat) vs (required > optional) + (optional > splat) vs (optional > splat) (optional > splat) vs (optional > splat) + (optional > splat) vs (required > splat) (optional > splat) vs (required > splat) + (required > optional) vs (required > optional) (required > optional) vs (required > optional) + subsumption has higher precedence over specificity + same named parameter, required > optional same named parameter, required > optional + named vs (optional named > double splat) named vs (optional named > double splat) + positional vs (required named > double splat) positional vs (required named > double splat) + named vs (optional positional > single splat) named vs (optional positional > single splat) + named vs (required positional > optional positional) named vs (required positional > optional positional) + single splat vs (optional named > double splat) single splat vs (optional named > double splat) + single splat vs (required named > double splat) single splat vs (required named > double splat) + same positional parameter, optional > single splat same positional parameter, optional > single splat + double splat vs (required positional > optional positional) double splat vs (required positional > optional positional) + named vs (required named > optional named) named vs (required named > optional named) + double splat vs (required positional > single splat) double splat vs (required positional > single splat) + positional vs (optional named > double splat) positional vs (optional named > double splat) + named vs (required named > double splat) named vs (required named > double splat) + same named parameter, optional > double splat same named parameter, optional > double splat + same positional parameter, required > single splat same positional parameter, required > single splat + positional vs (required positional > single splat) positional vs (required positional > single splat) + double splat vs (optional positional > single splat) double splat vs (optional positional > single splat) + positional vs (required named > optional named) positional vs (required named > optional named) + positional vs (optional positional > single splat) positional vs (optional positional > single splat) + same positional parameter, required > optional same positional parameter, required > optional + same named parameter, required > double splat same named parameter, required > double splat + positional vs (required positional > optional positional) positional vs (required positional > optional positional) + named vs (required positional > single splat) named vs (required positional > single splat) + single splat vs (required named > optional named) single splat vs (required named > optional named) + positional parameters + single splat vs single splat with restriction (#3134) single splat vs single splat with restriction (#3134) + positional parameter with restriction vs single splat positional parameter with restriction vs single splat + single splat restriction vs single splat with stricter restriction single splat restriction vs single splat with stricter restriction + positional parameter vs single splat with restriction positional parameter vs single splat with restriction + positional parameter with stricter restriction vs single splat with restriction positional parameter with stricter restriction vs single splat with restriction + specificity specificity + positional parameter with restriction vs single splat with stricter restriction positional parameter with restriction vs single splat with stricter restriction + named parameters + double splat vs double splat with restriction double splat vs double splat with restriction + named parameter with restriction vs double splat (#5328) named parameter with restriction vs double splat (#5328) + named parameter with restriction vs double splat with stricter restriction named parameter with restriction vs double splat with stricter restriction + specificity specificity + named parameter vs double splat with restriction named parameter vs double splat with restriction + double splat restriction vs double splat with stricter restriction double splat restriction vs double splat with stricter restriction + named parameter with stricter restriction vs double splat with restriction named parameter with stricter restriction vs double splat with restriction + matches a union argument with free var, more types (2) matches a union argument with free var, more types (2) + restrict virtual type with virtual type restrict virtual type with virtual type + types a call with overload type second overload types a call with overload type second overload + gets free variable from union restriction (2) gets free variable from union restriction (2) + overloads on metaclass (3) (#2916) overloads on metaclass (3) (#2916) + resets free vars after a partial match is rejected (2) (#10185) resets free vars after a partial match is rejected (2) (#10185) + overloads on metaclass (#2916) overloads on metaclass (#2916) + types a call with overload self in included module other type types a call with overload self in included module other type + considers NamedTuple in a module's including types (#10380) considers NamedTuple in a module's including types (#10380) + dispatches with named arg dispatches with named arg + doesn't crash on unknown metaclass doesn't crash on unknown metaclass + matches a generic module argument with free var (2) matches a generic module argument with free var (2) + can call overload with generic restriction can call overload with generic restriction + dispatch call to def with restrictions dispatch call to def with restrictions + treats single splats with same restriction as equivalent (#12579) treats single splats with same restriction as equivalent (#12579) + dispatch call to def with restrictions dispatch call to def with restrictions + matches tuples and uses free var matches tuples and uses free var + types a call with overload type first overload types a call with overload type first overload + errors if no overload matches on union against named arg with external param name (#10516) errors if no overload matches on union against named arg with external param name (#10516) + errors when binding free variable to different types (2) errors when binding free variable to different types (2) + resets free vars after a partial match is rejected (#10270) resets free vars after a partial match is rejected (#10270) + matches tuple with underscore matches tuple with underscore + types a call with overload matches virtual types a call with overload matches virtual +Crystal::Init::InitProject + correctly uses git config correctly uses git config + has proper contents has proper contents +semantic: case + checks exhaustiveness for tuple literal with bool and underscore at first position checks exhaustiveness for tuple literal with bool and underscore at first position + checks exhaustiveness for tuple literal with bool and underscore at second position, with partial match checks exhaustiveness for tuple literal with bool and underscore at second position, with partial match + checks exhaustiveness for tuple literal with bool and underscore at second position, partial match checks exhaustiveness for tuple literal with bool and underscore at second position, partial match + can prove case is exhaustive for @[Flags] enum when matching type can prove case is exhaustive for @[Flags] enum when matching type + checks exhaustiveness for tuple literal, with call checks exhaustiveness for tuple literal, with call + checks exhaustiveness of nilable type with nil literal checks exhaustiveness of nilable type with nil literal + checks exhaustiveness of single type (generic) checks exhaustiveness of single type (generic) + errors if casing against a constant errors if casing against a constant + checks exhaustiveness of enum (all cases covered) checks exhaustiveness of enum (all cases covered) + checks exhaustiveness for tuple literal with bool and underscore at second position checks exhaustiveness for tuple literal with bool and underscore at second position + checks exhaustiveness of enum via const checks exhaustiveness of enum via const + checks exhaustiveness for tuple literal with types and underscore at second position checks exhaustiveness for tuple literal with types and underscore at second position + checks exhaustiveness, covers in base type covers (generic type) checks exhaustiveness, covers in base type covers (generic type) + checks exhaustiveness for tuple literal with types and underscore at first position checks exhaustiveness for tuple literal with types and underscore at first position + checks exhaustiveness of single type checks exhaustiveness of single type + checks exhaustiveness for tuple literal of 2 elements, and warns checks exhaustiveness for tuple literal of 2 elements, and warns + checks exhaustiveness for tuple literal with bool and underscore at second position checks exhaustiveness for tuple literal with bool and underscore at second position + covers all types covers all types + checks exhaustiveness of nil type with nil literal checks exhaustiveness of nil type with nil literal + checks exhaustiveness of union type with virtual type checks exhaustiveness of union type with virtual type + can't prove case is exhaustive for @[Flags] enum can't prove case is exhaustive for @[Flags] enum + checks exhaustiveness for tuple literal of 2 elements, first is bool checks exhaustiveness for tuple literal of 2 elements, first is bool + checks exhaustiveness, covers in base type covers checks exhaustiveness, covers in base type covers + can't prove case is exhaustive for @[Flags] enum, tuple case can't prove case is exhaustive for @[Flags] enum, tuple case + checks exhaustiveness of single type (T.class) checks exhaustiveness of single type (T.class) + checks exhaustiveness of bool type (missing true) checks exhaustiveness of bool type (missing true) + checks exhaustiveness for tuple literal of 3 elements, and warns checks exhaustiveness for tuple literal of 3 elements, and warns + checks exhaustiveness of single type (Foo(T).class) checks exhaustiveness of single type (Foo(T).class) + checks exhaustiveness for tuple literal, and passes checks exhaustiveness for tuple literal, and passes + checks exhaustiveness for tuple literal with bool and underscore at first position, partial match checks exhaustiveness for tuple literal with bool and underscore at first position, partial match + checks exhaustiveness for tuple literal of 2 elements, first is enum checks exhaustiveness for tuple literal of 2 elements, first is enum + checks exhaustiveness for tuple literal of 3 elements, all bool checks exhaustiveness for tuple literal of 3 elements, all bool + checks exhaustiveness for tuple literal of 3 elements, all enums checks exhaustiveness for tuple literal of 3 elements, all enums + checks exhaustiveness for tuple literal with bool and underscore at first position, with partial match checks exhaustiveness for tuple literal with bool and underscore at first position, with partial match + checks exhaustiveness of bool type (missing false) checks exhaustiveness of bool type (missing false) + checks exhaustiveness of union with bool checks exhaustiveness of union with bool + checks exhaustiveness of enum through method (all cases covered) checks exhaustiveness of enum through method (all cases covered) + checks exhaustiveness for tuple literal with bool and underscore at first position checks exhaustiveness for tuple literal with bool and underscore at first position + checks exhaustiveness of enum via question method checks exhaustiveness of enum via question method + checks exhaustiveness of enum combined with another type checks exhaustiveness of enum combined with another type + doesn't check exhaustiveness when using 'when' doesn't check exhaustiveness when using 'when' + checks exhaustiveness of bool type with other types checks exhaustiveness of bool type with other types +Crystal::Playground::Agent + should send json messages and return inspected value should send json messages and return inspected value +ASTNode#to_s + does to_s of "\"\#{(1 + 2)}\"" does to_s of "\"\#{(1 + 2)}\"" + 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 "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" does to_s of "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" + does to_s of "foo(x : (T -> U) -> V, W)" does to_s of "foo(x : (T -> U) -> V, W)" + does to_s of "/hello world/" does to_s of "/hello world/" + 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 "offsetof(Foo, @bar)" does to_s of "offsetof(Foo, @bar)" + does to_s of "%r(/)" does to_s of "%r(/)" + does to_s of "`\\n\\0`" does to_s of "`\\n\\0`" + does to_s of "/\\//" does to_s of "/\\//" + does to_s of "def foo(x, **args, &block : _ -> _)\nend" does to_s of "def foo(x, **args, &block : _ -> _)\nend" + does to_s of "return true ? 1 : 2" does to_s of "return true ? 1 : 2" + does to_s of "def foo(**options, &block)\nend" does to_s of "def foo(**options, &block)\nend" + does to_s of "/ /" does to_s of "/ /" + 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.bar" does to_s of "@foo.bar" + does to_s of "{ {foo: 2} }" does to_s of "{ {foo: 2} }" + 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 "foo(x : Foo((T -> U)))" does to_s of "foo(x : Foo((T -> U)))" + does to_s of "1[&.foo]?" does to_s of "1[&.foo]?" + does to_s of x = (1 +2 +) does to_s of x = (1 +2 +) + does to_s of "foo(a.as(Int32))" does to_s of "foo(a.as(Int32))" + does to_s of "[(1 + 2)] of Int32" does to_s of "[(1 + 2)] of Int32" + 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 "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 "macro foo(*, __var var)\nend" does to_s of "macro foo(*, __var var)\nend" + does to_s of "foo._bar(1)" does to_s of "foo._bar(1)" + does to_s of "macro foo(@[Foo] **args)\nend" does to_s of "macro foo(@[Foo] **args)\nend" + does to_s of "%r()" does to_s of "%r()" + does to_s of "foo(3, &.*(2))" does to_s of "foo(3, &.*(2))" + does to_s of "(1..)" does to_s of "(1..)" + does to_s of "1.[](2) do\nend" does to_s of "1.[](2) do\nend" + does to_s of "/a/x" does to_s of "/a/x" + 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 "(1 + 2).as(Int32)" does to_s of "(1 + 2).as(Int32)" + does to_s of "begin\n (1)\nrescue\nend" does to_s of "begin\n (1)\nrescue\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 "def foo(x, **args)\nend" does to_s of "def foo(x, **args)\nend" + does to_s of "macro foo(*var)\nend" does to_s of "macro foo(*var)\nend" + does to_s of "macro foo(**args)\nend" does to_s of "macro foo(**args)\nend" + does to_s of "1.+(&block)" does to_s of "1.+(&block)" + does to_s of "foo()" does to_s of "foo()" + does to_s of "%r{\#{1}\\/\\0}" does to_s of "%r{\#{1}\\/\\0}" + does to_s of "1_f32" does to_s of "1_f32" + does to_s of "..3" does to_s of "..3" + does to_s of "/\\s/" does to_s of "/\\s/" + does to_s of "def foo(**args : T)\nend" does to_s of "def foo(**args : T)\nend" + does to_s of "%x(whoami)" does to_s of "%x(whoami)" + 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 "def foo(& : ->)\nend" does to_s of "def foo(& : ->)\nend" + 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 "1.&**" does to_s of "1.&**" + does to_s of "foo &.bar(1, 2, 3)" does to_s of "foo &.bar(1, 2, 3)" + does to_s of "%(\"\#{foo}\")" does to_s of "%(\"\#{foo}\")" + does to_s of "/\\(group\\)/" does to_s of "/\\(group\\)/" + does to_s of "def foo(x, @[Foo] **args)\nend" does to_s of "def foo(x, @[Foo] **args)\nend" + does to_s of "1.//(2, a: 3)" does to_s of "1.//(2, a: 3)" + 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 "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(@[Foo] &)\nend" does to_s of "macro foo(@[Foo] &)\nend" + does to_s of "a.as?(Int32)" does to_s of "a.as?(Int32)" + does to_s of "macro foo(@[Foo] &block)\nend" does to_s of "macro foo(@[Foo] &block)\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[2, x: 3, &.foo]" does to_s of "1[2, x: 3, &.foo]" + 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 "%r{\\/\\0}" does to_s of "%r{\\/\\0}" + does to_s of "alias Foo::Bar = Void" does to_s of "alias Foo::Bar = Void" + 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 "case 1; in .foo?; 2; end" does to_s of "case 1; in .foo?; 2; end" + 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 + 4)}" does to_s of "{(1 + 2) => (3 + 4)}" + does to_s of "def foo(@[Foo] **args)\nend" does to_s of "def foo(@[Foo] **args)\nend" + does to_s of "_foo.bar" does to_s of "_foo.bar" + does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" + does to_s of "{\"foo bar\": 1}" does to_s of "{\"foo bar\": 1}" + does to_s of "\"\\e\\0\\\"\"" does to_s of "\"\\e\\0\\\"\"" + 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 "foo x: 1, y: 2, &.bar" does to_s of "foo x: 1, y: 2, &.bar" + does to_s of "1.~(2)" does to_s of "1.~(2)" + does to_s of "1.&*" does to_s of "1.&*" + 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: (1 + 2)}" does to_s of "{foo: (1 + 2)}" + does to_s of "&+1" does to_s of "&+1" + does to_s of "(1 + 2).as?(Int32)" does to_s of "(1 + 2).as?(Int32)" + 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 "enum A : B\nend" does to_s of "enum A : B\nend" + does to_s of "1.[]=" does to_s of "1.[]=" + does to_s of "{ {1, 2, 3} }" does to_s of "{ {1, 2, 3} }" + does to_s of "macro foo\n %bar = 1\nend" does to_s of "macro foo\n %bar = 1\nend" + does to_s of "1.responds_to?(:to_s)" does to_s of "1.responds_to?(:to_s)" + does to_s of "1.as(Int32)" does to_s of "1.as(Int32)" + does to_s of "def foo(*args)\nend" does to_s of "def foo(*args)\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 "foo(\"bar baz\": 2)" does to_s of "foo(\"bar baz\": 2)" + does to_s of "(1 <= 2) <= 3" does to_s of "(1 <= 2) <= 3" + 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 "{ {1, 2, 3} => 4 }" does to_s of "{ {1, 2, 3} => 4 }" + 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 "1[2, x: 3, &.foo] = 4" does to_s of "1[2, x: 3, &.foo] = 4" + does to_s of "-> : Int32 do\nend" does to_s of "-> : Int32 do\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 "/\#{1 / 2}/" does to_s of "/\#{1 / 2}/" + 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 "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 "macro foo(&block)\nend" does to_s of "macro foo(&block)\nend" + does to_s of "Foo(\"bar baz\": Int32)" does to_s of "Foo(\"bar baz\": Int32)" + 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 "1 <= 2 <= 3" does to_s of "1 <= 2 <= 3" + 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 "macro foo\n{{ @type }}\nend" does to_s of "macro foo\n{{ @type }}\nend" + does to_s of "({} of K => V).foo" does to_s of "({} of K => V).foo" + does to_s of "1 <= (2 <= 3)" does to_s of "1 <= (2 <= 3)" + does to_s of "asm(\"nop\" :::: \"volatile\")" does to_s of "asm(\"nop\" :::: \"volatile\")" + does to_s of "fun foo\nend" does to_s of "fun foo\nend" + does to_s of "foo(bar)" does to_s of "foo(bar)" + does to_s of "macro foo(*, var)\nend" does to_s of "macro foo(*, var)\nend" + 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; when .foo?; 2; end" does to_s of "case 1; when .foo?; 2; end" + 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 "def foo(& : (->))\nend" does to_s of "def foo(& : (->))\nend" + 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 "(1 + 2)..3" does to_s of "(1 + 2)..3" + does to_s of "foo.*" does to_s of "foo.*" + does to_s of "asm(\"bl trap\" :::: \"unwind\")" does to_s of "asm(\"bl trap\" :::: \"unwind\")" + does to_s of "1.+ do\nend" does to_s of "1.+ do\nend" + does to_s of "begin\n ()\nend" does to_s of "begin\n ()\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, &block)" does to_s of "1.//(2, &block)" + does to_s of "def foo(x y)\nend" does to_s of "def foo(x y)\nend" + does to_s of "他.说(\"你好\")" does to_s of "他.说(\"你好\")" + does to_s of "->::foo(Int32, String)" does to_s of "->::foo(Int32, String)" + does to_s of "def foo(x)\n yield\nend" does to_s of "def foo(x)\n yield\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 "1 && (a = 2)" does to_s of "1 && (a = 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 "begin\n (1)\n 2\nend" does to_s of "begin\n (1)\n 2\nend" + does to_s of `#{::String.interpolation(x)}` does to_s of `#{::String.interpolation(x)}` + does to_s of "1 & 2 & (3 | 4)" does to_s of "1 & 2 & (3 | 4)" + does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" + does to_s of "def foo(\"bar baz\" qux)\nend" does to_s of "def foo(\"bar baz\" qux)\nend" + 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 "1.+(a: 2)" does to_s of "1.+(a: 2)" + 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 "foo(x : (T -> U).class)" does to_s of "foo(x : (T -> U).class)" + 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 "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 "macro foo\n 123\nend" does to_s of "macro foo\n 123\nend" + does to_s of "foo(&.==(2))" does to_s of "foo(&.==(2))" + does to_s of "foo[x : (T -> U) -> V, W]" does to_s of "foo[x : (T -> U) -> V, W]" + does to_s of "lib Foo\nend" does to_s of "lib Foo\nend" + does to_s of "def foo(*args : _)\nend" does to_s of "def foo(*args : _)\nend" + does to_s of "macro foo\n\\{%@type %}\nend" does to_s of "macro foo\n\\{%@type %}\nend" + does to_s of "foo : (A | B).class" does to_s of "foo : (A | B).class" + 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 "def foo(**args)\nend" does to_s of "def foo(**args)\nend" + does to_s of "あ.い, う.え.お = 1, 2" does to_s of "あ.い, う.え.お = 1, 2" + does to_s of "foo { |(x, (y, z))| x }" does to_s of "foo { |(x, (y, z))| x }" + does to_s of "1[2, x: 3, &.foo]?" does to_s of "1[2, x: 3, &.foo]?" + does to_s of "alias Foo = Void" does to_s of "alias Foo = Void" + does to_s of "def foo\n yield\nend" does to_s of "def foo\n yield\nend" + does to_s of "foo(x : (T -> U) | V)" does to_s of "foo(x : (T -> U) | V)" + does to_s of "foo.nil?" does to_s of "foo.nil?" + does to_s of "def foo(x, **args, &block : (_ -> _))\nend" does to_s of "def foo(x, **args, &block : (_ -> _))\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 "begin\n (1)\nend" does to_s of "begin\n (1)\nend" + does to_s of "->::Foo::Bar.foo" does to_s of "->::Foo::Bar.foo" + does to_s of "([] of T).foo" does to_s of "([] of T).foo" + does to_s of "1[&.foo]" does to_s of "1[&.foo]" + does to_s of "foo._bar" does to_s of "foo._bar" + does to_s of "asm(\"nop\" ::::)" does to_s of "asm(\"nop\" ::::)" + does to_s of "(a = 2) && 1" does to_s of "(a = 2) && 1" + does to_s of "if true\n (1)\nend" does to_s of "if true\n (1)\nend" + does to_s of "1.~(2) do\nend" does to_s of "1.~(2) do\nend" + does to_s of "(1 & 2) & (3 | 4)" does to_s of "(1 & 2) & (3 | 4)" + 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 }}" does to_s of "{{ foo }}" + does to_s of "lib Foo::Bar\nend" does to_s of "lib Foo::Bar\nend" + does to_s of "foo &.bar" does to_s of "foo &.bar" + 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.0" does to_s of "1.0" + does to_s of "!(1 < 2)" does to_s of "!(1 < 2)" + 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 "enum Foo\n A = 0\n B\nend" does to_s of "enum Foo\n A = 0\n B\nend" + does to_s of "他.说 = \"你好\"" does to_s of "他.说 = \"你好\"" + does to_s of "1_f64" does to_s of "1_f64" + does to_s of "yield(1)" does to_s of "yield(1)" + 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 "{% foo %}" does to_s of "{% foo %}" + does to_s of ":\"{\"" does to_s of ":\"{\"" + does to_s of "def foo(x : T = 1)\nend" does to_s of "def foo(x : T = 1)\nend" + 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 "%r()imx" does to_s of "%r()imx" + does to_s of "def foo(x, **args, &block)\nend" does to_s of "def foo(x, **args, &block)\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 "/\\?/" does to_s of "/\\?/" + does to_s of ":foo" does to_s of ":foo" + does to_s of "foo.%" does to_s of "foo.%" + does to_s of "&-1" does to_s of "&-1" + 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 "macro foo(x)\n yield\nend" does to_s of "macro foo(x)\n yield\nend" + does to_s of "`\#{1}\\n\\0`" does to_s of "`\#{1}\\n\\0`" + does to_s of "lib Foo\n FOO = 0\nend" does to_s of "lib Foo\n FOO = 0\nend" + does to_s of "/hello world/imx" does to_s of "/hello world/imx" + 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 "lib LibC\n fun getchar(Int, Float)\nend" does to_s of "lib LibC\n fun getchar(Int, Float)\nend" + does to_s of "type(Foo = Void)" does to_s of "type(Foo = Void)" + does to_s of "macro foo(x, **args)\nend" does to_s of "macro foo(x, **args)\nend" + does to_s of "\"\#{1}\\0\"" does to_s of "\"\#{1}\\0\"" + does to_s of "macro foo(x, @[Foo] *y)\nend" does to_s of "macro foo(x, @[Foo] *y)\nend" + does to_s of "macro foo\n{% @type %}\nend" does to_s of "macro foo\n{% @type %}\nend" + does to_s of "!a" does to_s of "!a" + does to_s of "macro foo(&)\nend" does to_s of "macro foo(&)\nend" + does to_s of "(1 || 1.1).as(Int32)" does to_s of "(1 || 1.1).as(Int32)" + does to_s of "(~1).foo" does to_s of "(~1).foo" + does to_s of "def foo(@[Foo] *args)\nend" does to_s of "def foo(@[Foo] *args)\nend" + does to_s of "%r( )" does to_s of "%r( )" + does to_s of "foo { |(x, y)| x }" does to_s of "foo { |(x, y)| x }" + does to_s of "{ {1 => 2} }" does to_s of "{ {1 => 2} }" + 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(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 : A | (B -> C)" does to_s of "foo : A | (B -> C)" + does to_s of "def foo(**x)\n yield\nend" does to_s of "def foo(**x)\n yield\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(1, 2, a: 1, b: 2)]" does to_s of "@[Foo(1, 2, a: 1, b: 2)]" + 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 "1.responds_to?(:\"&&\")" does to_s of "1.responds_to?(:\"&&\")" + does to_s of "1e10_f64" does to_s of "1e10_f64" + 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" +Crystal::Repl::Interpreter + does call without receiver inside closure does call without receiver inside closure + casts proc call arguments to proc arg types (#12350) casts proc call arguments to proc arg types (#12350) + procs + interprets proc literal with args interprets proc literal with args + interprets no args proc literal interprets no args proc literal + discards proc call discards proc call + interprets call inside Proc type interprets call inside Proc type + can downcast Proc(T) to Proc(Nil) can downcast Proc(T) to Proc(Nil) + casts from nilable proc type to proc type casts from nilable proc type to proc type + calls proc primitive on union of module that has no subtypes (#12954) calls proc primitive on union of module that has no subtypes (#12954) +Semantic: splat + splats splats + errors if splatting non-tuple type in call arguments errors if splatting non-tuple type in call arguments + says missing argument because positional args don't match past splat says missing argument because positional args don't match past splat + doesn't match splat in generic type with unsplatted tuple (#10164) doesn't match splat in generic type with unsplatted tuple (#10164) + errors if using two splat indices on restriction errors if using two splat indices on restriction + errors on zero args with named arg and splat errors on zero args with named arg and splat + matches with splat matches with splat + matches with type var splat inside explicit Union, when one splat fails entirely matches with type var splat inside explicit Union, when one splat fails entirely + gives correct error when forwarding splat gives correct error when forwarding splat + works if matches splat with type restriction works if matches splat with type restriction + matches instantiated generic with splat in generic type matches instantiated generic with splat in generic type + gives correct error when forwarding splat (2) gives correct error when forwarding splat (2) + doesn't match free var type splats inside explicit Union doesn't match free var type splats inside explicit Union + matches with tuple splat inside explicit Union matches with tuple splat inside explicit Union + splats arg and splat against splat (2) (#1042) splats arg and splat against splat (2) (#1042) + method with splat and optional named argument matches zero args call (#2746) method with splat and optional named argument matches zero args call (#2746) + matches with type var and splat of itself inside explicit Union matches with type var and splat of itself inside explicit Union + overloads with splat against method with two arguments (#986) (1) overloads with splat against method with two arguments (#986) (1) + calls super with implicit splat arg (#1001) calls super with implicit splat arg (#1001) + matches with type var splat inside explicit Union matches with type var splat inside explicit Union + can splat after type filter left it as a tuple (#442) can splat after type filter left it as a tuple (#442) + overloads with type restriction and splat (2) overloads with type restriction and splat (2) + forwards tuple in return statement forwards tuple in return statement + splats arg and splat against splat (1) (#1042) splats arg and splat against splat (1) (#1042) + Crystal::Splat + with splat with splat + without splat without splat + overloads with type restriction and splat (3) overloads with type restriction and splat (3) + errors if doesn't match splat with type restriction because of zero arguments errors if doesn't match splat with type restriction because of zero arguments + forwards tuple with an extra argument forwards tuple with an extra argument + overloads with type restriction and splat (5) overloads with type restriction and splat (5) + errors if splatting non-tuple type in return values errors if splatting non-tuple type in return values + uses splat restriction, matches empty uses splat restriction, matches empty + uses bare *, doesn't let more args uses bare *, doesn't let more args + matches with type var splat inside explicit Union, when non-splat vars fail matches with type var splat inside explicit Union, when non-splat vars fail + errors if doesn't match splat with type restriction errors if doesn't match splat with type restriction + says no overload matches on type restrictions past the splat arg says no overload matches on type restrictions past the splat arg + matches type splat with splat in generic type (2) matches type splat with splat in generic type (2) + overloads with type restriction and splat (6) overloads with type restriction and splat (6) + overloads with type restriction and splat (1) overloads with type restriction and splat (1) + overloads with splat against method with two arguments (#986) (2) overloads with splat against method with two arguments (#986) (2) + doesn't shift a call's location doesn't shift a call's location + uses splat restriction with concrete type uses splat restriction with concrete type + redefines method with splat (bug #248) redefines method with splat (bug #248) + method with default arguments and splat matches call with one arg (#2766) method with default arguments and splat matches call with one arg (#2766) + errors with too few non-splat type arguments (2) errors with too few non-splat type arguments (2) + doesn't crash on non-match (#2521) doesn't crash on non-match (#2521) + overloads with type restriction and splat (7) overloads with type restriction and splat (7) + matches partially instantiated generic with splat in generic type matches partially instantiated generic with splat in generic type + allows default value after splat index allows default value after splat index + matches with type var and splat of itself inside explicit Union (3) matches with type var and splat of itself inside explicit Union (3) + errors if splatting union errors if splatting union + matches with type var and splat of itself inside explicit Union (2) matches with type var and splat of itself inside explicit Union (2) + errors with too many non-splat type arguments errors with too many non-splat type arguments + matches with type var splat inside explicit Union, when all splat elements match matches with type var splat inside explicit Union, when all splat elements match + uses splat restriction after non-splat arguments (#5037) uses splat restriction after non-splat arguments (#5037) + matches type splat with splat in generic type (1) matches type splat with splat in generic type (1) + overloads with type restriction and splat (4) overloads with type restriction and splat (4) + uses splat restriction uses splat restriction + errors with too few non-splat type arguments (1) errors with too few non-splat type arguments (1) + uses bare * uses bare * + accesses T when empty, via module accesses T when empty, via module + matches with type var splat inside explicit Union (2) matches with type var splat inside explicit Union (2) +Semantic: c enum + types enum value with base type types enum value with base type + errors if enum base type is not an integer errors if enum base type is not an integer + 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 + allows using an enum as a type in a struct allows using an enum as a type in a struct + errors if enum value is different from default (Int32) (#194) errors if enum value is different from default (Int32) (#194) +Visibility modifiers + allows invoking protected from instance to class allows invoking protected from instance to class + allows invoking protected method from the same class allows invoking protected method from the same class + allows invoking protected method from virtual type allows invoking protected method from virtual type + disallows invoking private method disallows invoking private method + allows invoking protected method from namespaced type to namespace allows invoking protected method from namespaced type to namespace + allows invoking protected method from subclass (2) allows invoking protected method from subclass (2) + errors if invoking protected method from top-level errors if invoking protected method from top-level + allows setting visibility modifier to macro allows setting visibility modifier to macro + allows invoking protected method between types in the same namespace allows invoking protected method between types in the same namespace + allows invoking private method from the same class allows invoking private method from the same class + allows setting visibility modifier to macro that generates many methods (1) allows setting visibility modifier to macro that generates many methods (1) + allows invoking protected method from namespace to namespaced type allows invoking protected method from namespace to namespaced type + automatically makes initialize be protected automatically makes initialize be protected + errors if invoking protected method from non-subclass errors if invoking protected method from non-subclass + handles virtual types (#8561) handles virtual types (#8561) + allows calling protected method from nested generic class (2) allows calling protected method from nested generic class (2) + errors if invoking protected method from non-subclass, generated with macro that generates a macro errors if invoking protected method from non-subclass, generated with macro that generates a macro + allows calling protected method from nested generic class (1) allows calling protected method from nested generic class (1) + allows invoking protected method from subclass allows invoking protected method from subclass + allows invoking private setter with self allows invoking private setter with self + allows invoking protected method between types in the same namespace when inheriting allows invoking protected method between types in the same namespace when inheriting + errors if applying visibility modifier to non-def or non-call errors if applying visibility modifier to non-def or non-call + allows setting visibility modifier to macro that generates many methods (2) allows setting visibility modifier to macro that generates many methods (2) + gives correct error on unknown call (#2838) gives correct error on unknown call (#2838) + defines protected initialize (#7501) defines protected initialize (#7501) +Crystal::JSONHierarchyPrinter + works works +Semantic: virtual metaclass + merges metaclass types with 3 types merges metaclass types with 3 types + allows passing metaclass to virtual metaclass restriction allows passing metaclass to virtual metaclass restriction + merges metaclass types merges metaclass types + restricts virtual metaclass to Class (#11376) restricts virtual metaclass to Class (#11376) + allows allocating virtual type when base class is abstract allows allocating virtual type when base class is abstract + types virtual metaclass method types virtual metaclass method + yields virtual type in block arg if class is abstract yields virtual type in block arg if class is abstract + types virtual metaclass types virtual metaclass + types metaclass node types metaclass node + allows passing metaclass to virtual metaclass restriction allows passing metaclass to virtual metaclass restriction +Normalize: regex literal + options + x x + imx imx + i i + empty empty + im im + StringInterpolation + simple simple + StringLiteral + simple simple + expands to const expands to const +Code gen: def + codegens call with args codegens call with args + uses dispatch call type for phi (#3529) uses dispatch call type for phi (#3529) + allows to change argument values allows to change argument values + dispatches on virtual type implementing generic module (related to bug #165) dispatches on virtual type implementing generic module (related to bug #165) + codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 + runs empty def runs empty def + call external function 'putchar' call external function 'putchar' + codegens dispatch with single def when discarding unallocated ones (2) codegens dispatch with single def when discarding unallocated ones (2) + codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation + codegens call without args codegens call without args + codegens def which changes type of arg codegens def which changes type of arg + builds infinite recursive function builds infinite recursive function + codegens with interesting default argument codegens with interesting default argument + uses self uses self + uses previous argument in default value (#1062) uses previous argument in default value (#1062) + doesn't crash on private def as last expression doesn't crash on private def as last expression + codegens union to union assignment of mutable arg (#3691) codegens union to union assignment of mutable arg (#3691) + codegens yield with destructing tuple having unreachable element codegens yield with destructing tuple having unreachable element + codegens dispatch with nilable reference union type codegens dispatch with nilable reference union type + codegens return nil when nilable type (2) codegens return nil when nilable type (2) + codegens dispatch without obj, bug 1 codegens dispatch without obj, bug 1 + can match N type argument of static array (#1203) can match N type argument of static array (#1203) + use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type + unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def + puts union before single type in matches preferences puts union before single type in matches preferences + call functions defined in any order call functions defined in any order + codegens recursive nasty code codegens recursive nasty code + fixes #230: include original owner in mangled def fixes #230: include original owner in mangled def + codegens dispatch on static method codegens dispatch on static method + codegens with related types codegens with related types + codegens recursive type with union codegens recursive type with union + codegens empty def codegens empty def + codegens dispatch without obj, bug 1 codegens dispatch without obj, bug 1 + codegens dispatch with single def when discarding unallocated ones (1) codegens dispatch with single def when discarding unallocated ones (1) + codegens return nil when nilable type (1) codegens return nil when nilable type (1) + codegens with and without default arguments codegens with and without default arguments + looks up matches in super classes and merges them with subclasses looks up matches in super classes and merges them with subclasses + codegens with and without many default arguments codegens with and without many default arguments + uses var after external uses var after external +Crystal::Repl::Interpreter + types + interprets crystal_type_id for nil interprets crystal_type_id for nil + interprets class for module type (#12203) interprets class for module type (#12203) + interprets class for non-union type interprets class for non-union type + interprets class for virtual_type type (struct) interprets class for virtual_type type (struct) + discards typeof discards typeof + discards crystal_type_id discards crystal_type_id + interprets path to type interprets path to type + discards class for non-union type discards class for non-union type + does class method on virtual metaclass casted to generic metaclass (#12302) does class method on virtual metaclass casted to generic metaclass (#12302) + discards .class discards .class + discards class for virtual_type type discards class for virtual_type type + interprets class_crystal_instance_type_id interprets class_crystal_instance_type_id + interprets crystal_type_id for virtual metaclass type (#12228) interprets crystal_type_id for virtual metaclass type (#12228) + discards Path discards Path + interprets class for virtual_type type interprets class for virtual_type type + interprets crystal_type_id for non-nil interprets crystal_type_id for non-nil + discards generic discards generic Semantic: cast - casts from union to compatible union casts from union to compatible union - doesn't error if casting to a generic type doesn't error if casting to a generic type - doesn't crash with typeof no-type (#7441) doesn't crash with typeof no-type (#7441) + 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) should error if can't cast even if not instantiated should error if can't cast even if not instantiated - allows casting NoReturn to any type (#2132) allows casting NoReturn to any type (#2132) - casts to compatible type and use it casts to compatible type and use it - doesn't allow upcast of generic type var (#996) doesn't allow upcast of generic type var (#996) - disallows casting int to pointer disallows casting int to pointer - casts to base class making it virtual (2) casts to base class making it virtual (2) - doesn't cast to unbound generic type (as?) (#5927) doesn't cast to unbound generic type (as?) (#5927) - casts pointer of one type to another type casts pointer of one type to another type - can cast to metaclass (2) (#11121) can cast to metaclass (2) (#11121) - casts to base class making it virtual (1) casts to base class making it virtual (1) - casts from pointer to generic class gives error casts from pointer to generic class gives error - disallows casting pointer to fun disallows casting pointer to fun + disallows casting to Object (#815) disallows casting to Object (#815) doesn't cast to unbound generic type (as) (#5927) doesn't cast to unbound generic type (as) (#5927) - doesn't cast to virtual primitive (bug) doesn't cast to virtual primitive (bug) - casts pointer to another type casts pointer to another type - doesn't eagerly try to check cast type (#12268) doesn't eagerly try to check cast type (#12268) - can cast to metaclass (bug) can cast to metaclass (bug) - allows casting reference union to void pointer allows casting reference union to void pointer - 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) considers else to be unreachable (#9658) considers else to be unreachable (#9658) - casts to incompatible type gives error casts to incompatible type gives error - disallows casting to Class disallows casting to Class - casts to same type is ok casts to same type is ok - errors on cast inside a call that can't be instantiated errors on cast inside a call that can't be instantiated + casts from pointer to generic class gives error casts from pointer to generic class gives error allows casting object to void pointer allows casting object to void pointer + casts to base class making it virtual (2) casts to base class making it virtual (2) + casts to incompatible type gives error casts to incompatible type gives error + casts pointer to another type casts pointer to another type + disallows casting fun to pointer disallows casting fun to pointer + doesn't cast to unbound generic type (as?) (#5927) doesn't cast to unbound generic type (as?) (#5927) + doesn't crash with typeof no-type (#7441) doesn't crash with typeof no-type (#7441) disallows casting to Reference disallows casting to Reference - casts uninstantiated generic class to itself (#10882) casts uninstantiated generic class to itself (#10882) - casts to bigger union casts to bigger union + disallows casting int to pointer disallows casting int to pointer casts to generic virtual type casts to generic virtual type - disallows casting fun to pointer disallows casting fun to pointer - can cast from Void* to virtual type (#3014) can cast from Void* to virtual type (#3014) - casts from union to incompatible union gives error casts from union to incompatible union gives error - disallows casting to Object (#815) disallows casting to Object (#815) - errors if casting nil to Object inside typeof (#2403) errors if casting nil to Object inside typeof (#2403) + disallows casting to Class disallows casting to Class casts to module casts to module -Normalize: case - normalizes select with assign and question method normalizes select with assign and question method - normalizes select with assign normalizes select with assign - normalizes select with call normalizes select with call - normalizes select with else normalizes select with else - normalizes select with assign and bang method normalizes select with assign and bang method -Normalize: and - normalizes and with is_a? on exp normalizes and with is_a? on exp - normalizes and with assignment normalizes and with assignment - normalizes and with ! on var.is_a?(...) normalizes and with ! on var.is_a?(...) - 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 -Code gen: enum - can redefine Enum.new and use previous_def can redefine Enum.new and use previous_def - can define flags enum : UInt64 with more than 32 values (#7268) can define flags enum : UInt64 with more than 32 values (#7268) - codegens enum without explicit value codegens enum without explicit value - automatically defines question method for each enum member (flags, true case) automatically defines question method for each enum member (flags, true case) - allows class vars in enum allows class vars in enum - automatically defines question method for each enum member (false case) automatically defines question method for each enum member (false case) - codegens enum None redefined codegens enum None redefined - automatically defines question method for each enum member (flags, false case) automatically defines question method for each enum member (flags, false case) - codegens enum value codegens enum value - codegens enum bitflags (4) codegens enum bitflags (4) - can define flags enum : UInt128 with compile-time interpreted values can define flags enum : UInt128 with compile-time interpreted values - creates enum from value creates enum from value - casts All value to base type casts All value to base type - can use macro calls inside enum value (#424) can use macro calls inside enum value (#424) - codegens enum bitflags None codegens enum bitflags None - codegens enum bitflags (1) codegens enum bitflags (1) - automatically defines question method for each enum member (true case) automatically defines question method for each enum member (true case) - can use macro calls inside enum value, with receiver (#424) can use macro calls inside enum value, with receiver (#424) - codegens enum bitflags All codegens enum bitflags All - can define flags enum : UInt128 with 128 values can define flags enum : UInt128 with 128 values - uses enum value before declaration (hoisting) uses enum value before declaration (hoisting) - codegens enum All redefined codegens enum All redefined - codegens enum bitflags (2) codegens enum bitflags (2) - does ~ at compile time for enum member does ~ at compile time for enum member - can use macro calls inside enum value, macro defined outside enum (#424) can use macro calls inside enum value, macro defined outside enum (#424) - codegens enum codegens enum - adds a none? method to flags enum adds a none? method to flags enum -Code gen: debug - doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals - codegens correct debug info for untyped expression (#4007 and #4008) codegens correct debug info for untyped expression (#4007 and #4008) - codegens extern union (#7335) codegens extern union (#7335) - stores and restores debug location after jumping to main (2) stores and restores debug location after jumping to main (2) - codegens correct debug info for new with custom allocate (#3945) codegens correct debug info for new with custom allocate (#3945) - doesn't emit incorrect debug info for closured self doesn't emit incorrect debug info for closured self - doesn't fail on constant read calls (#11416) doesn't fail on constant read calls (#11416) - codegens lib union (#7335) codegens lib union (#7335) - has debug info in closure inside if (#5593) has debug info in closure inside if (#5593) - stores and restores debug location after jumping to main (#6920) stores and restores debug location after jumping to main (#6920) - codegens abstract struct (#3578) codegens abstract struct (#3578) - doesn't emit debug info for unused variable declarations (#9882) doesn't emit debug info for unused variable declarations (#9882) - has correct debug location after constant initialization in call with block (#4719) has correct debug location after constant initialization in call with block (#4719) - inlines instance var access through getter in debug mode inlines instance var access through getter in debug mode - correctly restores debug location after fun change (#4254) correctly restores debug location after fun change (#4254) - stores and restores debug location after jumping to main (3) stores and restores debug location after jumping to main (3) -Crystal::Repl::Interpreter - symbol - Symbol#to_i Symbol#to_i - Symbol#to_s Symbol#to_s - symbol equality symbol equality -Semantic: super - errors if calling super on module method and not found errors if calling super on module method and not found - types super with forwarded arguments, def has double splat parameter (#8895) types super with forwarded arguments, def has double splat parameter (#8895) - types super when inside fun and forwards args types super when inside fun and forwards args - types super with forwarded arguments, def has bare splat parameter (#8895) types super with forwarded arguments, def has bare splat parameter (#8895) - types super with named arguments, def has bare splat parameter (2) (#8895) types super with named arguments, def has bare splat parameter (2) (#8895) - finds super initialize if not explicitly defined in superclass, 2 (#273) finds super initialize if not explicitly defined in superclass, 2 (#273) - calls super in module method (1) (#556) calls super in module method (1) (#556) - types super when container method is defined in parent class types super when container method is defined in parent class - 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) - types super when inside fun types super when inside fun - errors no superclass method errors no superclass method - 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) - calls super in module method (2) (#556) calls super in module method (2) (#556) - 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 without arguments and instance variable types super without arguments and instance variable - errors no superclass method in top-level def errors no superclass method in top-level def - 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 when container method is defined in parent class two levels up types super when container method is defined in parent class two levels up - types super with forwarded arguments, parent has parameters types super with forwarded arguments, parent has parameters - calls super in generic module method calls super in generic module method - errors no superclass method in top-level errors no superclass method in top-level - 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 on super outside method (#4481) errors on super outside method (#4481) - invokes super inside macro (#6636) invokes super inside macro (#6636) - finds super initialize if not explicitly defined in superclass, 1 (#273) finds super initialize if not explicitly defined in superclass, 1 (#273) - 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) - types super without arguments types super without arguments -Code gen: cast - casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union casts from union to another union - casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int casts from int to int - upcasts from non-generic to generic upcasts from non-generic to generic + disallows casting pointer to fun disallows casting pointer to fun + can cast to metaclass (2) (#11121) can cast to metaclass (2) (#11121) + can cast to metaclass (bug) can cast to metaclass (bug) + casts to same type is ok casts to same type is ok + casts from union to compatible union casts from union to compatible union can cast from Void* to virtual type (#3014) can cast from Void* to virtual type (#3014) - casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil casts from nilable to nil - casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError casts from union to another union raises TypeCastError - allows casting object to pointer and back allows casting object to pointer and back - cast virtual metaclass type to nilable virtual instance type (#12628) cast virtual metaclass type to nilable virtual instance type (#12628) - casts to base class making it virtual casts to base class making it virtual - casts with block var that changes type (#3341) casts with block var that changes type (#3341) - downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment downcasts from union to union with different alignment - can cast to metaclass (#11121) can cast to metaclass (#11121) - casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError casts from virtual to single type raises TypeCastError - upcasts type to virtual (#3304) upcasts type to virtual (#3304) - sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment sidecasts from union to union with different alignment - allows casting nil to Void* allows casting nil to Void* - allows casting nilable type to Void* (1) allows casting nilable type to Void* (1) + doesn't cast to virtual primitive (bug) doesn't cast to virtual primitive (bug) + casts uninstantiated generic class to itself (#10882) casts uninstantiated generic class to itself (#10882) + allows casting NoReturn to any type (#2132) allows casting NoReturn to any type (#2132) + doesn't allow upcast of generic type var (#996) doesn't allow upcast of generic type var (#996) + casts pointer of one type to another type casts pointer of one type to another type + errors if casting nil to Object inside typeof (#2403) errors if casting nil to Object inside typeof (#2403) + casts from union to incompatible union gives error casts from union to incompatible union gives error + errors on cast inside a call that can't be instantiated errors on cast inside a call that can't be instantiated casts to bigger union casts to bigger union - allows casting nilable type to Void* (2) allows casting nilable type to Void* (2) - casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type casts from virtual to single type - casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer casts from pointer to pointer - casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) casts from nilable type to virtual type (#3512) - casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError casts from nilable to nil raises TypeCastError - codegens class method when type id is available but not a virtual type (#3490) codegens class method when type id is available but not a virtual type (#3490) - casts to module casts to module casts to module casts to module casts to module casts to module casts to module casts to module casts to module casts to module - casts between union types, where union has a tuple type (#3377) casts between union types, where union has a tuple type (#3377) - doesn't corrupt stack when downcasting union to union with different alignment (#14285) doesn't corrupt stack when downcasting union to union with different alignment (#14285) - casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError casts from union to single type raises TypeCastError - allows casting nilable type to Void* (3) allows casting nilable type to Void* (3) - casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type casts from union to single type - casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) casts (bug) - upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment upcasts from union to union with different alignment - upcasts type to virtual (2) (#3304) upcasts type to virtual (2) (#3304) -Normalize: unless - normalizes unless normalizes unless -Crystal::Formatter - formats "as? Foo" formats "as? Foo" - formats "yield *1 , *2" formats "yield *1 , *2" - formats "foo 1, # comment\n # bar\n do\n end" formats "foo 1, # comment\n # bar\n do\n end" - 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 "{} of A => B\n{} of Foo => Bar" formats "{} of A => B\n{} of Foo => Bar" - formats "foo( )" formats "foo( )" - formats "foo[x: 1, &.bar]?" formats "foo[x: 1, &.bar]?" - formats "foo 1 , 2" formats "foo 1 , 2" - formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" - formats "def foo ( bar @@select) \n end" formats "def foo ( bar @@select) \n end" - formats "#### ###" formats "#### ###" - formats "'a'" formats "'a'" - formats "{1 => foo <<-X\nbar\nX\n}" formats "{1 => foo <<-X\nbar\nX\n}" - formats "->@@foo.foo=" formats "->@@foo.foo=" - formats "module Foo\n1\n\n# foo\nend" formats "module Foo\n1\n\n# foo\nend" - formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" - formats "(1)" formats "(1)" - formats "::Tuple()" formats "::Tuple()" - formats " Array( {x: Int32, y: String } )" formats " Array( {x: Int32, y: String } )" - formats "1.== do\nend" formats "1.== do\nend" - 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 "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" - formats "%i{one( two( three)}" formats "%i{one( two( three)}" - formats "foo(&.bar)" formats "foo(&.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 "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 "String???" formats "String???" - formats "case 1 \n when 2 then \n 3 \n end" formats "case 1 \n when 2 then \n 3 \n end" - formats "macro foo # bar\n baz\nend" formats "macro foo # bar\n baz\nend" - formats "x = uninitialized Int32" formats "x = uninitialized Int32" - formats "lib Foo\n fun Foo = Bar\nend" formats "lib Foo\n fun Foo = Bar\nend" - formats "<<-HTML\n \#{1}x\n HTML" formats "<<-HTML\n \#{1}x\n HTML" - formats " {% begin %} 2 {% end %}" formats " {% begin %} 2 {% end %}" - formats "def foo # bar\n # baz\nend" formats "def foo # bar\n # baz\nend" - formats "foo(a: 1 // 2)" formats "foo(a: 1 // 2)" - formats "false" formats "false" - formats "\"foo \#{ 1 + 2 }\"" formats "\"foo \#{ 1 + 2 }\"" - formats "1\n# hello\n\n\n" formats "1\n# hello\n\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 "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 "foo.as Int32*" formats "foo.as Int32*" - formats "if 1 &&\n2 &&\n3\n4\nend" formats "if 1 &&\n2 &&\n3\n4\nend" - formats "case\n# hello\nwhen 1\n 2\nend" formats "case\n# hello\nwhen 1\n 2\nend" + 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) + allows casting reference union to void pointer allows casting reference union to void pointer + casts to base class making it virtual (1) casts to base class making it virtual (1) + doesn't error if casting to a generic type doesn't error if casting to a generic type +immutability of returned container literals (#10818) + Union#types Union#types + Annotation#args Annotation#args + StringInterpolation#expressions StringInterpolation#expressions + When#conds When#conds + MultiAssign#values MultiAssign#values + ProcPointer#args ProcPointer#args + ProcNotation#inputs ProcNotation#inputs + MultiAssign#targets MultiAssign#targets + Generic#type_vars Generic#type_vars +Normalize: array literal + normalizes non-empty without of, with splat only normalizes non-empty without of, with splat only + normalizes non-empty with of normalizes non-empty with of + normalizes empty with of normalizes empty with of + normalizes non-empty without of, with splat normalizes non-empty without of, with splat + hoists complex element expressions, array-like generic hoists complex element expressions, array-like generic + hoists complex element expressions, with splat hoists complex element expressions, with splat + normalizes non-empty without of normalizes non-empty without of + hoists complex element expressions, array-like hoists complex element expressions, array-like + normalizes non-empty with of, with splat normalizes non-empty with of, with splat + hoists complex element expressions hoists complex element expressions +Semantic: offsetof + types offsetof types offsetof + gives error if using offsetof on Tuples with instance variables gives error if using offsetof on Tuples with instance variables + can be used with classes can be used with classes + gives error if using offsetof on non-Tuples with an index gives error if using offsetof on non-Tuples with an index + errors on offsetof element of uninstantiated generic type errors on offsetof element of uninstantiated generic type + 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 + can be used with generic types can be used with generic types + errors on undefined instance variable errors on undefined instance variable + gives error if using offsetof on Tuples with negative indexes gives error if using offsetof on Tuples with negative indexes + errors on typeof inside offsetof expression errors on typeof inside offsetof expression + 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 + 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 +Crystal::Doc::Generator + generates sitemap generates sitemap + crystal repo + inserts pseudo methods inserts pseudo methods + #formatted_summary + should generate the first line should generate the first line + should generate the first sentence should generate the first sentence + with a Experimental annotation, and docs + should generate both the docs and Experimental tag should generate both the docs and Experimental tag + with a Deprecated annotation, and docs + should generate both the docs and Deprecated tag should generate both the docs and Deprecated tag + should exclude whitespace before the summary line should exclude whitespace before the summary line + with no annotation, and no docs + should generate nothing should generate nothing + with a Deprecated annotation, and no docs + should generate just the Deprecated tag should generate just the Deprecated tag + with a Experimental annotation, and no docs + should generate just the Experimental tag should generate just the Experimental tag + #formatted_doc + with a Deprecated annotation, and no docs + should generate just the Deprecated tag should generate just the Deprecated tag + with a Deprecated annotation, and docs + should generate both the docs and Deprecated tag should generate both the docs and Deprecated tag + with a Experimental annotation, and docs + should generate both the docs and Experimental tag should generate both the docs and Experimental tag + should generate the full document should generate the full document + with no annotation, and no docs + should generate nothing should generate nothing + should generate the full document should generate the full document + with a Experimental annotation, and no docs + should generate just the Experimental tag should generate just the Experimental tag + #must_include_toplevel? + returns false if program has constant which is defined in other place returns false if program has constant which is defined in other place + returns false if program has method which is defined in other place returns false if program has method which is defined in other place + returns true if program has macro returns true if program has macro + returns false if program has nothing returns false if program has nothing + returns true if program has constant returns true if program has constant + returns false if program has macro which is defined in other place returns false if program has macro which is defined in other place + returns true if program has method returns true if program has method + #collect_constants + returns empty array when constants are private returns empty array when constants are private +Code gen: tuple + codegens tuple class codegens tuple class + provides T as a tuple literal provides T as a tuple literal + codegens tuple [0]? codegens tuple [0]? + codegens tuple metaclass [2]? codegens tuple metaclass [2]? + allows tuple covariance allows tuple covariance + gets size at compile time gets size at compile time + merges two tuple types of same size (1) merges two tuple types of same size (1) + upcasts tuple inside compatible tuple upcasts tuple inside compatible tuple + codegens tuple [0..1] codegens tuple [0..1] + codegens tuple metaclass [1] codegens tuple metaclass [1] + codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) + codegens tuple [1..0] codegens tuple [1..0] + codegens tuple [2]? codegens tuple [2]? + downcasts union inside tuple to value (#3907) downcasts union inside tuple to value (#3907) + codegens tuple metaclass [0] codegens tuple metaclass [0] + downcasts union to mixed tuple type downcasts union to mixed tuple type + accesses T and creates instance from it accesses T and creates instance from it + allows malloc pointer of tuple allows malloc pointer of tuple + merges two tuple types of same size (2) merges two tuple types of same size (2) + codegens tuple metaclass [0..0] codegens tuple metaclass [0..0] + codegens tuple [2..2] codegens tuple [2..2] + codegens tuple [1] codegens tuple [1] + assigns two same-size tuple types to a same var (#3132) assigns two same-size tuple types to a same var (#3132) + codegens tuple [3..2]? codegens tuple [3..2]? + codegens tuple [-3..2]? codegens tuple [-3..2]? + codegens tuple [0..0] codegens tuple [0..0] + passed tuple to def passed tuple to def + codegens tuple [0..2]? codegens tuple [0..2]? + codegens tuple metaclass [1..0] codegens tuple metaclass [1..0] + codegens tuple [0..2] codegens tuple [0..2] + codegens tuple [0] codegens tuple [0] + downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types + assigns tuple union to compatible tuple assigns tuple union to compatible tuple + codegens tuple metaclass [0..1] codegens tuple metaclass [0..1] + codegens tuple metaclass [3..2]? codegens tuple metaclass [3..2]? + codegens tuple [1..0]? codegens tuple [1..0]? + assigns tuple inside union to union with compatible tuple assigns tuple inside union to union with compatible tuple + codegens union of tuple of float with tuple of tuple of float codegens union of tuple of float with tuple of tuple of float + passes empty tuple and empty named tuple to a method (#2852) passes empty tuple and empty named tuple to a method (#2852) + codegens tuple [2..2]? codegens tuple [2..2]? + codegens tuple [1]? codegens tuple [1]? + upcasts tuple inside union to union with compatible tuple upcasts tuple inside union to union with compatible tuple + codegens tuple [1] (2) codegens tuple [1] (2) + codegens splats inside tuples codegens splats inside tuples + codegens tuple [0..0]? codegens tuple [0..0]? + codegens tuple [0..1]? codegens tuple [0..1]? + upcasts tuple union to compatible tuple upcasts tuple union to compatible tuple + codegens tuple [1..1]? codegens tuple [1..1]? + assigns tuple to compatible tuple assigns tuple to compatible tuple + codegens tuple [1..1] codegens tuple [1..1] +Crystal::Repl::Interpreter + bugs + does leading zeros does leading zeros + doesn't override local variable value with block var with the same name doesn't override local variable value with block var with the same name + correctly puts virtual metaclass type in union correctly puts virtual metaclass type in union + doesn't incorrectly consider a non-closure as closure doesn't incorrectly consider a non-closure as closure + doesn't pass self to top-level method (FileNode) doesn't pass self to top-level method (FileNode) + doesn't pass self to top-level method doesn't pass self to top-level method + breaks from current block, not from outer block breaks from current block, not from outer block + does multidispatch on virtual struct union nil does multidispatch on virtual struct union nil + does multidispatch on virtual struct does multidispatch on virtual struct +Semantic: primitives + types a float64 types a float64 + errors if @[Primitive] has no args errors if @[Primitive] has no args + types a int64 types a int64 + Slice.literal + with element type + types primitive float literal types primitive float literal + 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 + can invoke cast on primitive typedef (#614) can invoke cast on primitive typedef (#614) + types a bool types a bool + looks up return type in correct scope (#13652) looks up return type in correct scope (#13652) + types a float32 types a float32 + errors when comparing void (#225) errors when comparing void (#225) + correctly types first hash from type vars (bug) correctly types first hash from type vars (bug) + types a char types a char + extends from Number and doesn't find to_i method extends from Number and doesn't find to_i method + can invoke binary on primitive typedef (2) (#614) can invoke binary on primitive typedef (2) (#614) + types @[Primitive] method types @[Primitive] method + types nop types nop + types an int32 types an int32 + types a string types a string + extends from Number and doesn't find >= method extends from Number and doesn't find >= method + types va_arg primitive types va_arg primitive + types a symbol types a symbol + Reference.pre_initialize + errors on abstract type errors on abstract type + types with reference type types with reference type + errors on uninstantiated generic type errors on uninstantiated generic type + types with virtual reference type types with virtual reference type + types 1 + 2 types 1 + 2 + computes correct hash value type if it's a function literal (#320) computes correct hash value type if it's a function literal (#320) + types a int128 types a int128 + types char ord types char ord + types an expression types an expression + types pointer of int types pointer of int + errors if @[Primitive] has non-symbol arg errors if @[Primitive] has non-symbol arg + errors if using instance variable inside primitive type errors if using instance variable inside primitive type + allows @[Primitive] on method that has body allows @[Primitive] on method that has body + can invoke binary on primitive typedef (#614) can invoke binary on primitive typedef (#614) + types a uint128 types a uint128 + types nil types nil + extends from Number and doesn't find + method extends from Number and doesn't find + method +Code gen: method_missing + does method_missing generating method does method_missing generating method + does method_missing macro with args (with call) does method_missing macro with args (with call) + finds method_missing with 'with ... yield' finds method_missing with 'with ... yield' + does method_missing macro with virtual type (1) does method_missing macro with virtual type (1) + does method_missing macro with virtual type (4) does method_missing macro with virtual type (4) + does method_missing macro without args does method_missing macro without args + does method_missing macro with virtual type (3) does method_missing macro with virtual type (3) + forwards forwards + does method_missing macro with args does method_missing macro with args + does method_missing with assignment (bug) does method_missing with assignment (bug) + does method_missing macro with virtual type (7) does method_missing macro with virtual type (7) + does method_missing macro with block but not using it does method_missing macro with block but not using it + works with named arguments (#3654) works with named arguments (#3654) + does method_missing macro with block does method_missing macro with block + does method_missing macro with virtual type (2) does method_missing macro with virtual type (2) + does method_missing macro with virtual type (8) does method_missing macro with virtual type (8) + does method_missing macro without args (with call) does method_missing macro without args (with call) + 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 module involved does method_missing macro with module involved + does method_missing macro with included module does method_missing macro with included module + does method_missing macro with top level method involved does method_missing macro with top level method involved + does method_missing macro with virtual type (5) does method_missing macro with virtual type (5) + does method_missing macro with virtual type (6) does method_missing macro with virtual type (6) + does method_missing with assignment (2) (bug) does method_missing with assignment (2) (bug) +Semantic: is_a? + restricts type inside if scope 2 restricts type inside if scope 2 + doesn't fail on untyped is_a (#10317) doesn't fail on untyped is_a (#10317) + applies filter inside block applies filter inside block + restricts type inside if else when used with module type restricts type inside if else when used with module type + restricts type inside if scope 1 restricts type inside if scope 1 + checks union with union checks union with union + restricts type in else but lazily restricts type in else but lazily + restricts other types inside if else restricts other types inside if else + types if is_a? preceded by return if (preserves nops) types if is_a? preceded by return if (preserves nops) + checks simple type with union checks simple type with union + applies negative condition filter if then is no return applies negative condition filter if then is no return + restricts type inside if scope 3 restricts type inside if scope 3 + restricts in assignment restricts in assignment + does is_a? from virtual metaclass to generic metaclass (#12302) does is_a? from virtual metaclass to generic metaclass (#12302) + is bool is bool +Restrictions + errors if using NamedTuple with positional args errors if using NamedTuple with positional args + errors if using Tuple with named args errors if using Tuple with named args + sets number as unbound generic type var (#13110) sets number as unbound generic type var (#13110) + errors if using typeof in block restriction errors if using typeof in block restriction + self always matches instance type in return type self always matches instance type in return type + errors if can't find type on lookup errors if can't find type on lookup + works with static array (#637) works with static array (#637) + errors if using typeof inside generic type errors if using typeof inside generic type + self always matches instance type in restriction self always matches instance type in restriction + should not let GenericChild(Base) pass as a GenericBase(Child) (#1294) should not let GenericChild(Base) pass as a GenericBase(Child) (#1294) + restrict + restricts virtual generic class against uninstantiated generic subclass (2) restricts virtual generic class against uninstantiated generic subclass (2) + restricts virtual generic class against uninstantiated generic subclass (1) restricts virtual generic class against uninstantiated generic subclass (1) + restricts type with another type restricts type with another type + restricts type with same type restricts type with same type + restricts class against uninstantiated generic base class through multiple inheritance (2) (#9660) restricts class against uninstantiated generic base class through multiple inheritance (2) (#9660) + restricts type with included module restricts type with included module + restricts generic module instance with class restricts generic module instance with class + restricts module through generic include (#4287) restricts module through generic include (#4287) + restricts generic module instance with another generic module instance restricts generic module instance with another generic module instance + restricts virtual type with included module 1 restricts virtual type with included module 1 + restricts type with superclass restricts type with superclass + restricts class against uninstantiated generic base class through multiple inheritance (1) (#9660) restricts class against uninstantiated generic base class through multiple inheritance (1) (#9660) + restricts module with another module restricts module with another module + restricts virtual type with included module 2 restricts virtual type with included module 2 + restricts generic module instance with another module restricts generic module instance with another module + makes metaclass subclass pass parent metaclass restriction (#2079) makes metaclass subclass pass parent metaclass restriction (#2079) + matches virtual type against alias matches virtual type against alias + restricts aliased typedef type (#9474) restricts aliased typedef type (#9474) + restricts virtual metaclass type against metaclass (#3438) restricts virtual metaclass type against metaclass (#3438) + restriction_of? + Path vs Path + inserts typed Path before untyped Path inserts typed Path before untyped Path + keeps typed Path before untyped Path keeps typed Path before untyped Path + Generic vs Generic + inserts typed Generic before untyped Generic inserts typed Generic before untyped Generic + keeps typed Generic before untyped Generic keeps typed Generic before untyped Generic + free variables + keeps constant before free variable with same name keeps constant before free variable with same name + inserts path before free variable with same name inserts path before free variable with same name + inserts path before free variable even if free var resolves to a more specialized type inserts path before free variable even if free var resolves to a more specialized type + keeps path before free variable even if free var resolves to a more specialized type keeps path before free variable even if free var resolves to a more specialized type + keeps path before free variable with same name keeps path before free variable with same name + inserts constant before free variable with same name inserts constant before free variable with same name + Metaclass vs Metaclass + keeps typed Metaclass before untyped Metaclass keeps typed Metaclass before untyped Metaclass + inserts typed Metaclass before untyped Metaclass inserts typed Metaclass before untyped Metaclass + Generic vs Path + inserts typed Generic before untyped Path inserts typed Generic before untyped Path + keeps typed Generic before untyped Path keeps typed Generic before untyped Path + keeps untyped Generic before untyped Path keeps untyped Generic before untyped Path + inserts untyped Generic before untyped Path (2) inserts untyped Generic before untyped Path (2) + inserts untyped Generic before untyped Path inserts untyped Generic before untyped Path + NamedTuple vs NamedTuple + inserts more specialized NamedTuple before less specialized one inserts more specialized NamedTuple before less specialized one + doesn't mix incompatible NamedTuples (#10238) doesn't mix incompatible NamedTuples (#10238) + keeps more specialized NamedTuple before less specialized one keeps more specialized NamedTuple before less specialized one + Union + handles redefinitions (2) (#12330) handles redefinitions (2) (#12330) + handles redefinitions (1) (#12330) handles redefinitions (1) (#12330) + orders union before generic (#12330) orders union before generic (#12330) + GenericClassType vs GenericClassInstanceType + keeps GenericClassInstanceType before GenericClassType keeps GenericClassInstanceType before GenericClassType + inserts GenericClassInstanceType before GenericClassType inserts GenericClassInstanceType before GenericClassType + works with classes in different namespaces works with classes in different namespaces + doesn't mix different generic classes doesn't mix different generic classes + Metaclass vs Path + inserts metaclass before Object inserts metaclass before Object + doesn't error if path is undefined and method is not called (1) (#12516) doesn't error if path is undefined and method is not called (1) (#12516) + inserts metaclass before Value inserts metaclass before Value + keeps metaclass before Class keeps metaclass before Class + doesn't error if path is undefined and method is not called (2) (#12516) doesn't error if path is undefined and method is not called (2) (#12516) + keeps metaclass before Value keeps metaclass before Value + inserts metaclass before Class inserts metaclass before Class + keeps metaclass before Object keeps metaclass before Object + Underscore vs Path + keeps underscore after Path (#12854) keeps underscore after Path (#12854) + works with splats and modules, under -Dpreview_overload_order (#12854) works with splats and modules, under -Dpreview_overload_order (#12854) + inserts Path before underscore (#12854) inserts Path before underscore (#12854) + Path vs NumberLiteral + inserts number literal before constant of same value with generic arguments inserts number literal before constant of same value with generic arguments + inserts constant before number literal of same value with generic arguments inserts constant before number literal of same value with generic arguments + errors if using typeof errors if using typeof + restricts class union type to overloads with classes restricts class union type to overloads with classes + restricts class union type to overloads with classes (2) restricts class union type to overloads with classes (2) + works with generic class metaclass vs. generic instance class metaclass works with generic class metaclass vs. generic instance class metaclass + errors on T::Type that's union when used from type restriction errors on T::Type that's union when used from type restriction + matches number in bound free variable (#13605) matches number in bound free variable (#13605) + works with union against unions of generics works with union against unions of generics + passes #278 passes #278 + errors on T::Type that's a union when used from block type restriction errors on T::Type that's a union when used from block type restriction + doesn't error if using NamedTuple with no args doesn't error if using NamedTuple with no args + works with generic compared to fixed (primitive) type works with generic compared to fixed (primitive) type + works with static array that uses underscore works with static array that uses underscore + does not treat single path as free variable when given number (1) (#11859) does not treat single path as free variable when given number (1) (#11859) + sets number as free variable (#2699) sets number as free variable (#2699) + matches alias against alias in block type matches alias against alias in block type + errors if using free var without forall errors if using free var without forall + doesn't error if using Tuple with no args doesn't error if using Tuple with no args + allows passing recursive type to free var (#1076) allows passing recursive type to free var (#1076) + errors if using typeof in block restriction errors if using typeof in block restriction + errors if can't find type on lookup with nested type errors if can't find type on lookup with nested type + matches free variable for type variable matches free variable for type variable + does not treat single path as free variable when given number (2) (#11859) does not treat single path as free variable when given number (2) (#11859) + works with generic class metaclass vs. generic class metaclass works with generic class metaclass vs. generic class metaclass +Semantic: struct + can't reopen as class can't reopen as class + doesn't make virtual for Float doesn't make virtual for Float + unifies type to virtual type unifies type to virtual type + can't be nilable can't be nilable + 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 + doesn't make virtual for Int doesn't make virtual for Int + doesn't make virtual for Value doesn't make virtual for Value + can't reopen as module can't reopen as module + passes subtype check with generic module type on virtual type (3) passes subtype check with generic module type on virtual type (3) + can't extend class from struct can't extend class from struct + passes subtype check with generic module type on virtual type (2) (#10302) passes subtype check with generic module type on virtual type (2) (#10302) + types generic struct declaration types generic struct declaration + doesn't make virtual for Struct doesn't make virtual for Struct + types struct declaration types struct declaration + doesn't error if method is not found in abstract type doesn't error if method is not found in abstract type + passes subtype check with generic module type on virtual type passes subtype check with generic module type on virtual type + allows struct to participate in virtual allows struct to participate in virtual + errors if defining finalize for struct (#3840) errors if defining finalize for struct (#3840) +Crystal::Repl::Interpreter + literals + interprets a String literal interprets a String literal + interprets a bool (true) interprets a bool (true) + precomputes string literal length precomputes string literal length + interprets a Float64 interprets a Float64 + interprets an Int64 interprets an Int64 + interprets an UInt64 interprets an UInt64 + interprets an UInt8 interprets an UInt8 + interprets an Int8 interprets an Int8 + interprets a char interprets a char + interprets an Int128 interprets an Int128 + interprets a Float32 interprets a Float32 + interprets an UInt32 interprets an UInt32 + uses a string pool uses a string pool + interprets an Int16 interprets an Int16 + interprets a bool (false) interprets a bool (false) + interprets an UInt128 interprets an UInt128 + interprets nil interprets nil + interprets an UInt16 interprets an UInt16 + interprets an Int32 interprets an Int32 + math + interprets Int64 + Int64 interprets Int64 + Int64 + interprets UInt32 - Int32 interprets UInt32 - Int32 + interprets Float64 - Float64 interprets Float64 - Float64 + interprets Int32 &- Int32 interprets Int32 &- Int32 + interprets Int32 + Float64 interprets Int32 + Float64 + interprets Int32 * Int32 interprets Int32 * Int32 + interprets Float64 * Float64 interprets Float64 * Float64 + interprets Int32.unsafe_shl(Int32) with self interprets Int32.unsafe_shl(Int32) with self + discards math discards math + interprets Float64 + Int32 interprets Float64 + Int32 + interprets UInt8 | Int32 interprets UInt8 | Int32 + interprets Int8 + Int8 interprets Int8 + Int8 + interprets Int32 &+ Int32 interprets Int32 &+ Int32 + interprets Float32 + Float64 interprets Float32 + Float64 + interprets Int128 + Int32 interprets Int128 + Int32 + interprets UInt64 & Int32 interprets UInt64 & Int32 + interprets Int32 - Int32 interprets Int32 - Int32 + interprets UInt64 * Int32 interprets UInt64 * Int32 + interprets Int32 + Int32 interprets Int32 + Int32 + interprets Int32 &* Int32 interprets Int32 &* Int32 + interprets UInt64 | UInt32 interprets UInt64 | UInt32 + interprets Float64 + Float64 interprets Float64 + Float64 + conversion + interprets Int8::MIN#to_f64! interprets Int8::MIN#to_f64! + interprets Int16::MIN#to_u32! interprets Int16::MIN#to_u32! + interprets Int64::MAX#to_f64! interprets Int64::MAX#to_f64! + interprets Int32::MIN#to_i! interprets Int32::MIN#to_i! + interprets UInt32::MAX#to_i! interprets UInt32::MAX#to_i! + interprets Int32::MIN#to_i16! interprets Int32::MIN#to_i16! + interprets UInt64::MAX#to_u8! interprets UInt64::MAX#to_u8! + interprets Float32#to_u! (positive) interprets Float32#to_u! (positive) + interprets UInt32::MAX#to_i64! interprets UInt32::MAX#to_i64! + interprets Int64::MAX#to_u64! interprets Int64::MAX#to_u64! + interprets UInt32::MAX#to_i8! interprets UInt32::MAX#to_i8! + interprets UInt64::MAX#to_u16! interprets UInt64::MAX#to_u16! + interprets Int16::MIN#to_i32! interprets Int16::MIN#to_i32! + interprets Int16::MIN#to_i64! interprets Int16::MIN#to_i64! + interprets Int16::MAX#to_f32! interprets Int16::MAX#to_f32! + interprets Float32#to_i64! (negative) interprets Float32#to_i64! (negative) + interprets Int64::MAX#to_i16! interprets Int64::MAX#to_i16! + interprets Float64#to_i16! (positive) interprets Float64#to_i16! (positive) + interprets Int32::MIN#to_i64! interprets Int32::MIN#to_i64! + interprets UInt64::MAX#to_u! interprets UInt64::MAX#to_u! + interprets Int16::MIN#to_i16! interprets Int16::MIN#to_i16! + interprets Int16::MAX#to_u64! interprets Int16::MAX#to_u64! + interprets Int8::MIN#to_i16! interprets Int8::MIN#to_i16! + interprets Float32#to_i32! (negative) interprets Float32#to_i32! (negative) + interprets Float64#to_i64! (positive) interprets Float64#to_i64! (positive) + interprets UInt8::MAX#to_u32! interprets UInt8::MAX#to_u32! + interprets UInt32::MAX#to_i16! interprets UInt32::MAX#to_i16! + interprets Float32#to_i64! (positive) interprets Float32#to_i64! (positive) + interprets Int16::MAX#to_i32! interprets Int16::MAX#to_i32! + interprets Int8::MIN#to_u! interprets Int8::MIN#to_u! + interprets UInt64::MAX#to_f32! interprets UInt64::MAX#to_f32! + interprets Float64#to_u16! (positive) interprets Float64#to_u16! (positive) + interprets UInt16::MAX#to_i64! interprets UInt16::MAX#to_i64! + interprets Float32#to_i32! (positive) interprets Float32#to_i32! (positive) + interprets UInt8::MAX#to_u! interprets UInt8::MAX#to_u! + interprets Int32::MAX#to_u! interprets Int32::MAX#to_u! + interprets UInt32::MAX#to_u8! interprets UInt32::MAX#to_u8! + interprets Int8::MIN#to_i64! interprets Int8::MIN#to_i64! + interprets UInt16::MAX#to_f64! interprets UInt16::MAX#to_f64! + interprets Int16::MAX#to_i16! interprets Int16::MAX#to_i16! + interprets UInt8::MAX#to_i32! interprets UInt8::MAX#to_i32! + interprets Int32::MIN#to_u16! interprets Int32::MIN#to_u16! + interprets Int8::MAX#to_i8! interprets Int8::MAX#to_i8! + interprets Int16::MIN#to_f32! interprets Int16::MIN#to_f32! + interprets Int16::MIN#to_u! interprets Int16::MIN#to_u! + interprets UInt32::MAX#to_u16! interprets UInt32::MAX#to_u16! + interprets Int32::MIN#to_i32! interprets Int32::MIN#to_i32! + interprets Float32#to_f64! (positive) interprets Float32#to_f64! (positive) + interprets Int16::MAX#to_u8! interprets Int16::MAX#to_u8! + interprets Int16::MIN#to_i! interprets Int16::MIN#to_i! + interprets Float64#to_f64! (negative) interprets Float64#to_f64! (negative) + interprets Int16::MAX#to_f64! interprets Int16::MAX#to_f64! + interprets Float32#to_i16! (negative) interprets Float32#to_i16! (negative) + interprets Int8::MIN#to_u64! interprets Int8::MIN#to_u64! + interprets Int8::MAX#to_i! interprets Int8::MAX#to_i! + interprets Int64::MIN#to_i! interprets Int64::MIN#to_i! + interprets UInt16::MAX#to_i! interprets UInt16::MAX#to_i! + interprets Float32#to_i8! (negative) interprets Float32#to_i8! (negative) + interprets UInt8::MAX#to_i! interprets UInt8::MAX#to_i! + interprets Int32::MIN#to_f32! interprets Int32::MIN#to_f32! + interprets Int16::MIN#to_f64! interprets Int16::MIN#to_f64! + interprets Int32::MAX#to_i32! interprets Int32::MAX#to_i32! + interprets UInt16::MAX#to_u! interprets UInt16::MAX#to_u! + interprets UInt64::MAX#to_u32! interprets UInt64::MAX#to_u32! + interprets Int32::MAX#to_f32! interprets Int32::MAX#to_f32! + interprets Float64#to_f32! (negative) interprets Float64#to_f32! (negative) + interprets Int64::MAX#to_u32! interprets Int64::MAX#to_u32! + interprets Int8::MAX#to_u32! interprets Int8::MAX#to_u32! + interprets Int32::MAX#to_i16! interprets Int32::MAX#to_i16! + interprets UInt16::MAX#to_u8! interprets UInt16::MAX#to_u8! + interprets Int64::MIN#to_u32! interprets Int64::MIN#to_u32! + interprets Int64::MIN#to_i64! interprets Int64::MIN#to_i64! + interprets Int16::MAX#to_i64! interprets Int16::MAX#to_i64! + interprets UInt8::MAX#to_i8! interprets UInt8::MAX#to_i8! + interprets UInt64::MAX#to_i32! interprets UInt64::MAX#to_i32! + interprets UInt64::MAX#to_i! interprets UInt64::MAX#to_i! + interprets UInt8::MAX#to_f64! interprets UInt8::MAX#to_f64! + interprets Int64::MAX#to_i64! interprets Int64::MAX#to_i64! + interprets Int64::MAX#to_f32! interprets Int64::MAX#to_f32! + interprets Int64::MAX#to_u8! interprets Int64::MAX#to_u8! + interprets Int8::MIN#to_i8! interprets Int8::MIN#to_i8! + interprets Int16::MAX#to_i! interprets Int16::MAX#to_i! + interprets Int64::MIN#to_i16! interprets Int64::MIN#to_i16! + interprets Int32::MIN#to_u8! interprets Int32::MIN#to_u8! + interprets Float32#to_i! (positive) interprets Float32#to_i! (positive) + interprets UInt16::MAX#to_i8! interprets UInt16::MAX#to_i8! + interprets Int16::MIN#to_u8! interprets Int16::MIN#to_u8! + interprets UInt64::MAX#to_i8! interprets UInt64::MAX#to_i8! + interprets UInt32::MAX#to_f32! interprets UInt32::MAX#to_f32! + interprets Int64::MIN#to_u8! interprets Int64::MIN#to_u8! + interprets Int32::MIN#to_u! interprets Int32::MIN#to_u! + interprets Int8::MAX#to_i32! interprets Int8::MAX#to_i32! + interprets Int16::MAX#to_u! interprets Int16::MAX#to_u! + interprets Int32::MAX#to_u16! interprets Int32::MAX#to_u16! + interprets UInt64::MAX#to_i16! interprets UInt64::MAX#to_i16! + interprets Float32#to_i16! (positive) interprets Float32#to_i16! (positive) + interprets Int8::MAX#to_u64! interprets Int8::MAX#to_u64! + interprets UInt32::MAX#to_u! interprets UInt32::MAX#to_u! + interprets Int64::MAX#to_i! interprets Int64::MAX#to_i! + interprets Int32::MIN#to_i8! interprets Int32::MIN#to_i8! + interprets Float32#to_f32! (positive) interprets Float32#to_f32! (positive) + interprets Int8::MAX#to_u16! interprets Int8::MAX#to_u16! + interprets Float64#to_i! (positive) interprets Float64#to_i! (positive) + interprets Float64#to_i8! (positive) interprets Float64#to_i8! (positive) + interprets Int8::MAX#to_i16! interprets Int8::MAX#to_i16! + interprets Float64#to_f32! (positive) interprets Float64#to_f32! (positive) + interprets UInt16::MAX#to_i16! interprets UInt16::MAX#to_i16! + interprets Int64::MAX#to_i32! interprets Int64::MAX#to_i32! + interprets Int16::MAX#to_i8! interprets Int16::MAX#to_i8! + interprets UInt8::MAX#to_u16! interprets UInt8::MAX#to_u16! + interprets Int32::MIN#to_u64! interprets Int32::MIN#to_u64! + interprets Int8::MAX#to_u! interprets Int8::MAX#to_u! + interprets Int8::MIN#to_u32! interprets Int8::MIN#to_u32! + interprets Int32::MIN#to_f64! interprets Int32::MIN#to_f64! + interprets Int64::MIN#to_u64! interprets Int64::MIN#to_u64! + interprets Int8::MIN#to_f32! interprets Int8::MIN#to_f32! + interprets Int32::MAX#to_f64! interprets Int32::MAX#to_f64! + interprets Float32#to_u64! (positive) interprets Float32#to_u64! (positive) + Int32#unsafe_chr Int32#unsafe_chr + interprets UInt8::MAX#to_u8! interprets UInt8::MAX#to_u8! + interprets UInt64::MAX#to_f64! interprets UInt64::MAX#to_f64! + interprets UInt64::MAX#to_u64! interprets UInt64::MAX#to_u64! + interprets Int8::MIN#to_u8! interprets Int8::MIN#to_u8! + interprets Char#ord interprets Char#ord + interprets UInt32::MAX#to_u32! interprets UInt32::MAX#to_u32! + interprets Int64::MAX#to_u16! interprets Int64::MAX#to_u16! + interprets Int8::MAX#to_f32! interprets Int8::MAX#to_f32! + interprets UInt16::MAX#to_u64! interprets UInt16::MAX#to_u64! + interprets Int64::MIN#to_i32! interprets Int64::MIN#to_i32! + interprets Int64::MIN#to_i8! interprets Int64::MIN#to_i8! + interprets Float64#to_i16! (negative) interprets Float64#to_i16! (negative) + interprets Float32#to_u8! (positive) interprets Float32#to_u8! (positive) + interprets UInt32::MAX#to_i32! interprets UInt32::MAX#to_i32! + interprets Int32::MIN#to_u32! interprets Int32::MIN#to_u32! + interprets UInt16::MAX#to_i32! interprets UInt16::MAX#to_i32! + interprets UInt8::MAX#to_i64! interprets UInt8::MAX#to_i64! + interprets UInt16::MAX#to_f32! interprets UInt16::MAX#to_f32! + interprets Float32#to_u32! (positive) interprets Float32#to_u32! (positive) + interprets Int64::MIN#to_f64! interprets Int64::MIN#to_f64! + interprets Int32::MAX#to_i8! interprets Int32::MAX#to_i8! + interprets Int64::MAX#to_i8! interprets Int64::MAX#to_i8! + interprets Int8::MAX#to_u8! interprets Int8::MAX#to_u8! + interprets Float32#to_f64! (negative) interprets Float32#to_f64! (negative) + interprets Int16::MIN#to_i8! interprets Int16::MIN#to_i8! + interprets Float64#to_u64! (positive) interprets Float64#to_u64! (positive) + interprets Int32::MAX#to_i64! interprets Int32::MAX#to_i64! + interprets Float32#to_f32! (negative) interprets Float32#to_f32! (negative) + interprets Float64#to_u8! (positive) interprets Float64#to_u8! (positive) + interprets Int32::MAX#to_i! interprets Int32::MAX#to_i! + interprets Float32#to_i! (negative) interprets Float32#to_i! (negative) + interprets Int8::MIN#to_i! interprets Int8::MIN#to_i! + interprets UInt8::MAX#to_i16! interprets UInt8::MAX#to_i16! + interprets Float64#to_i32! (negative) interprets Float64#to_i32! (negative) + interprets UInt8::MAX#to_u64! interprets UInt8::MAX#to_u64! + interprets UInt16::MAX#to_u16! interprets UInt16::MAX#to_u16! + interprets UInt64::MAX#to_i64! interprets UInt64::MAX#to_i64! + discards conversion with local var discards conversion with local var + interprets Float64#to_i64! (negative) interprets Float64#to_i64! (negative) + interprets Float32#to_i8! (positive) interprets Float32#to_i8! (positive) + interprets Float64#to_f64! (positive) interprets Float64#to_f64! (positive) + interprets Float64#to_i8! (negative) interprets Float64#to_i8! (negative) + interprets Int64::MAX#to_u! interprets Int64::MAX#to_u! + interprets Int16::MIN#to_u64! interprets Int16::MIN#to_u64! + interprets Int8::MIN#to_i32! interprets Int8::MIN#to_i32! + interprets Int32::MAX#to_u64! interprets Int32::MAX#to_u64! + interprets Int16::MAX#to_u32! interprets Int16::MAX#to_u32! + interprets UInt32::MAX#to_u64! interprets UInt32::MAX#to_u64! + UInt8#unsafe_chr UInt8#unsafe_chr + interprets Float32#to_u16! (positive) interprets Float32#to_u16! (positive) + interprets Int64::MIN#to_u! interprets Int64::MIN#to_u! + interprets Int16::MIN#to_u16! interprets Int16::MIN#to_u16! + interprets Float64#to_i32! (positive) interprets Float64#to_i32! (positive) + interprets Float64#to_i! (negative) interprets Float64#to_i! (negative) + interprets Int16::MAX#to_u16! interprets Int16::MAX#to_u16! + interprets UInt8::MAX#to_f32! interprets UInt8::MAX#to_f32! + interprets Int64::MIN#to_u16! interprets Int64::MIN#to_u16! + interprets Float64#to_u32! (positive) interprets Float64#to_u32! (positive) + interprets Int64::MIN#to_f32! interprets Int64::MIN#to_f32! + interprets UInt16::MAX#to_u32! interprets UInt16::MAX#to_u32! + interprets Float64#to_u! (positive) interprets Float64#to_u! (positive) + interprets UInt32::MAX#to_f64! interprets UInt32::MAX#to_f64! + interprets Int8::MIN#to_u16! interprets Int8::MIN#to_u16! + interprets Int8::MAX#to_i64! interprets Int8::MAX#to_i64! + interprets Int8::MAX#to_f64! interprets Int8::MAX#to_f64! + interprets Int32::MAX#to_u8! interprets Int32::MAX#to_u8! + interprets Int32::MAX#to_u32! interprets Int32::MAX#to_u32! + discards conversion discards conversion + overflow + + + overlows on 1_i8 + 128 overlows on 1_i8 + 128 + overlows on 1_u16 + 65535 overlows on 1_u16 + 65535 + overlows on 1 + 2147483647 overlows on 1 + 2147483647 + overlows on 1_u8 + 255 overlows on 1_u8 + 255 + overlows on 1_i64 + 9223372036854775807_i64 overlows on 1_i64 + 9223372036854775807_i64 + overlows on 1_u64 + 18446744073709551615_u64 overlows on 1_u64 + 18446744073709551615_u64 + overlows on 1_i16 + 32767 overlows on 1_i16 + 32767 + overlows on 1_u32 + 4294967295_i64 overlows on 1_u32 + 4294967295_i64 + - + overlows on 1 - 2147483650_i64 overlows on 1 - 2147483650_i64 + overlows on 1_i8 - 256 overlows on 1_i8 - 256 + overlows on 1_u16 - 2 overlows on 1_u16 - 2 + overlows on 1_u8 - 2 overlows on 1_u8 - 2 + overlows on 1_u32 - 2 overlows on 1_u32 - 2 + overlows on 1_i16 - 32770 overlows on 1_i16 - 32770 + overlows on 1_i64 - 9223372036854775810_u64 overlows on 1_i64 - 9223372036854775810_u64 + overlows on 1_u64 - 2 overlows on 1_u64 - 2 + * + overlows on 10_i8 * 14 overlows on 10_i8 * 14 + overlows on 10_u16 * 6600 overlows on 10_u16 * 6600 + overlows on 20_u32 * 429496729 overlows on 20_u32 * 429496729 + overlows on 20 * 214748364 overlows on 20 * 214748364 + overlows on 10_u8 * 26 overlows on 10_u8 * 26 + overlows on 10_i16 * 3300 overlows on 10_i16 * 3300 + overlows on 20_i64 * 922337203685477580_i64 overlows on 20_i64 * 922337203685477580_i64 + overlows on 20_u64 * 1844674407370955161_i64 overlows on 20_u64 * 1844674407370955161_i64 + conversion + overlows on -1_i16.to_u8 overlows on -1_i16.to_u8 + overlows on 32768_u32.to_i16 overlows on 32768_u32.to_i16 + overlows on 1.7976931348623157e+308.to_f32 overlows on 1.7976931348623157e+308.to_f32 + overlows on -1.to_u8 overlows on -1.to_u8 + overlows on 256_f64.to_u8 overlows on 256_f64.to_u8 + overlows on 128_u16.to_i8 overlows on 128_u16.to_i8 + overlows on 2147483648_f64.to_i32 overlows on 2147483648_f64.to_i32 + overlows on -1.to_u16 overlows on -1.to_u16 + overlows on 128_f32.to_i8 overlows on 128_f32.to_i8 + overlows on -1_i16.to_u64 overlows on -1_i16.to_u64 + overlows on -1_i64.to_u16 overlows on -1_i64.to_u16 + overlows on -1_i16.to_u16 overlows on -1_i16.to_u16 + overlows on 32768_f32.to_i16 overlows on 32768_f32.to_i16 + overlows on -1_i8.to_u16 overlows on -1_i8.to_u16 + overlows on 128_u8.to_i8 overlows on 128_u8.to_i8 + overlows on -1_i64.to_u8 overlows on -1_i64.to_u8 + overlows on 256_f32.to_u8 overlows on 256_f32.to_u8 + overlows on 2147483648_u32.to_i32 overlows on 2147483648_u32.to_i32 + overlows on -1_i8.to_u64 overlows on -1_i8.to_u64 + overlows on -1_i8.to_u8 overlows on -1_i8.to_u8 + overlows on -1.to_u32 overlows on -1.to_u32 + overlows on 32768_u16.to_i16 overlows on 32768_u16.to_i16 + overlows on 65536_f32.to_u16 overlows on 65536_f32.to_u16 + overlows on 128_u32.to_i8 overlows on 128_u32.to_i8 + overlows on 32768_u64.to_i16 overlows on 32768_u64.to_i16 + overlows on 128_f64.to_i8 overlows on 128_f64.to_i8 + overlows on 9223372036854775808_u64.to_i64 overlows on 9223372036854775808_u64.to_i64 + overlows on 4294967296_f64.to_u32 overlows on 4294967296_f64.to_u32 + overlows on -1_i64.to_u64 overlows on -1_i64.to_u64 + overlows on 128_u64.to_i8 overlows on 128_u64.to_i8 + overlows on -1_i64.to_u32 overlows on -1_i64.to_u32 + overlows on 2147483648_u64.to_i32 overlows on 2147483648_u64.to_i32 + overlows on -1.to_u64 overlows on -1.to_u64 + overlows on -1_i16.to_u32 overlows on -1_i16.to_u32 + overlows on -1_i8.to_u32 overlows on -1_i8.to_u32 + overlows on 32768_f64.to_i16 overlows on 32768_f64.to_i16 + overlows on 65536_f64.to_u16 overlows on 65536_f64.to_u16 + comparisons + interprets UInt64 == Int32 (false when Int32 >= 0) interprets UInt64 == Int32 (false when Int32 >= 0) + interprets UInt8 < Int32 (false, right is greater than zero) interprets UInt8 < Int32 (false, right is greater than zero) + interprets UInt32 < Int32 (true) interprets UInt32 < Int32 (true) + interprets Float64 < Int32 interprets Float64 < Int32 + interprets UInt64 > UInt32 (true) interprets UInt64 > UInt32 (true) + interprets Int32 != Int32 (true) interprets Int32 != Int32 (true) + interprets Int32 > Float64 (true) interprets Int32 > Float64 (true) + interprets Char == Char (false) interprets Char == Char (false) + interprets Int32 < Int32 interprets Int32 < Int32 + interprets Float64 < Float64 interprets Float64 < Float64 + interprets Int32 > Float64 (false) interprets Int32 > Float64 (false) + interprets Bool != Bool (true) interprets Bool != Bool (true) + interprets Int32 == Int32 (true) interprets Int32 == Int32 (true) + interprets UInt64 != Int32 (true) interprets UInt64 != Int32 (true) + interprets Float64 / Float64 interprets Float64 / Float64 + interprets Float64 fdiv Float32 interprets Float64 fdiv Float32 + interprets UInt64 != Int32 (false) interprets UInt64 != Int32 (false) + interprets UInt8 < Int32 (true, right is greater than zero) interprets UInt8 < Int32 (true, right is greater than zero) + interprets Float32 / Int32 interprets Float32 / Int32 + interprets UInt64 < Int32 (false, right is greater than zero) interprets UInt64 < Int32 (false, right is greater than zero) + interprets Int32 != Int32 (false) interprets Int32 != Int32 (false) + interprets Int32 != UInt64 (false) interprets Int32 != UInt64 (false) + interprets UInt8 < Int32 (false, right is less than zero) interprets UInt8 < Int32 (false, right is less than zero) + interprets UInt64 == Int32 (false when Int32 < 0) interprets UInt64 == Int32 (false when Int32 < 0) + interprets Int32 != UInt64 (true) interprets Int32 != UInt64 (true) + interprets Bool == Bool (false) interprets Bool == Bool (false) + interprets Int32 == UInt64 (true) interprets Int32 == UInt64 (true) + interprets UInt32 < Int32 (false) interprets UInt32 < Int32 (false) + interprets Char == Char (true) interprets Char == Char (true) + interprets Int32 == UInt64 (false) interprets Int32 == UInt64 (false) + interprets Int32 < Float64 interprets Int32 < Float64 + interprets Float32 / Float32 interprets Float32 / Float32 + interprets Float32 fdiv Float64 interprets Float32 fdiv Float64 + interprets Int128 == Int128 (true) interprets Int128 == Int128 (true) + interprets UInt64 < Int32 (false, right is less than zero) interprets UInt64 < Int32 (false, right is less than zero) + interprets UInt64.unsafe_mod(UInt64) interprets UInt64.unsafe_mod(UInt64) + interprets Int128 == Int128 (false) interprets Int128 == Int128 (false) + interprets UInt64 < Int32 (true, right is greater than zero) interprets UInt64 < Int32 (true, right is greater than zero) + interprets Bool != Bool (false) interprets Bool != Bool (false) + interprets Int32 == Float64 (true) interprets Int32 == Float64 (true) + interprets Int32 == Float64 (false) interprets Int32 == Float64 (false) + interprets Int32 == Int32 (false) interprets Int32 == Int32 (false) + interprets UInt64 > UInt32 (false) interprets UInt64 > UInt32 (false) + discards comparison discards comparison + interprets Bool == Bool (true) interprets Bool == Bool (true) + interprets UInt64 == Int32 (true when Int32 >= 0) interprets UInt64 == Int32 (true when Int32 >= 0) + local variables + interprets local variable declaration (#12229) interprets local variable declaration (#12229) + interprets uninitialized interprets uninitialized + doesn't declare variable with no type doesn't declare variable with no type + 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 + interprets at the class level interprets at the class level + interprets variable set and get with operations interprets variable set and get with operations + doesn't declare variable with no type inside method doesn't declare variable with no type inside method + assigns to underscore assigns to underscore + interprets variable set interprets variable set + interprets variable set and get interprets variable set and get + interprets variable set with type restriction (#13023) interprets variable set with type restriction (#13023) + logical operations + does math primitive on union does math primitive on union + interprets not for generic class instance type interprets not for generic class instance type + does math convert on union does math convert on union + interprets not for generic module interprets not for generic module + interprets not for module (#12918) interprets not for module (#12918) + interprets not for nilable type (true) interprets not for nilable type (true) + interprets not for bool false interprets not for bool false + interprets not for mixed union (false) interprets not for mixed union (false) + interprets not for generic class instance metaclass interprets not for generic class instance metaclass + interprets not for nilable type (true) interprets not for nilable type (true) + interprets not for bool true interprets not for bool true + interprets not for nilable type (false) interprets not for nilable type (false) + interprets not for nilable proc type (false) interprets not for nilable proc type (false) + discards bool not discards bool not + interprets not for nilable proc type (true) interprets not for nilable proc type (true) + interprets not for mixed union (nil) interprets not for mixed union (nil) + interprets not for nilable type (false) interprets not for nilable type (false) + discards nil not discards nil not + interprets not for bool false interprets not for bool false + interprets not for mixed union (other) interprets not for mixed union (other) + interprets not for mixed union (true) interprets not for mixed union (true) + interprets not for generic module metaclass interprets not for generic module metaclass + interprets not for nil interprets not for nil + interprets not for nil type interprets not for nil type +Semantic: proc + disallows Struct in proc notation return type disallows Struct in proc notation return type + doesn't need to deduce type of block if return is void doesn't need to deduce type of block if return is void + disallows Proc in proc return types disallows Proc in proc return types + allows passing function to LibC without specifying types, using a class method allows passing function to LibC without specifying types, using a class method + disallows Tuple in proc return types disallows Tuple in proc return types + declares an instance variable with splat in proc notation declares an instance variable with splat in proc notation + uses array argument of proc arg (1) uses array argument of proc arg (1) + disallows Proc in proc notation parameter type disallows Proc in proc notation parameter type + types empty proc literal types empty proc literal + disallows Number in proc return types disallows Number in proc return types + allows writing a function type with Proc allows writing a function type with Proc + casts to Proc(Nil) when specified in return type casts to Proc(Nil) when specified in return type + allows passing function to LibC without specifying types, using a global method allows passing function to LibC without specifying types, using a global method + types proc pointer to instance method types proc pointer to instance method + allows new on proc type with less block params allows new on proc type with less block params + allows invoking a function with a generic subtype (2) allows invoking a function with a generic subtype (2) + disallows Float in proc notation parameter type disallows Float in proc notation parameter type + doesn't cause upcast bug (#8428) doesn't cause upcast bug (#8428) + disallows Tuple in procs disallows Tuple in procs + types proc pointer with types types proc pointer with types + disallows casting a proc type to one accepting same size argument but different input disallows casting a proc type to one accepting same size argument but different input + disallows Object in procs disallows Object in procs + disallows Enum in proc pointer disallows Enum in proc pointer + disallows StaticArray in captured block disallows StaticArray in captured block + can assign proc that returns anything to proc that returns nil, with local var (#3655) can assign proc that returns anything to proc that returns nil, with local var (#3655) + allows metaclass in proc return types allows metaclass in proc return types + disallows StaticArray in proc pointer disallows StaticArray in proc pointer + allows casting a proc type to one with void argument allows casting a proc type to one with void argument + can pass Proc(T) to Proc(Nil) in type restriction (#8964) can pass Proc(T) to Proc(Nil) in type restriction (#8964) + disallows Reference in proc pointer disallows Reference in proc pointer + disallows Float in captured block disallows Float in captured block + disallows StaticArray in proc notation parameter type disallows StaticArray in proc notation parameter type + types proc literal hard type inference (1) types proc literal hard type inference (1) + disallows Object in captured block disallows Object in captured block + allows passing NoReturn type for any return type (2) allows passing NoReturn type for any return type (2) + can assign proc that returns anything to proc that returns nil, with instance var (#3655) can assign proc that returns anything to proc that returns nil, with instance var (#3655) + types proc literal with return type (2) types proc literal with return type (2) + disallows Number in proc notation parameter type disallows Number in proc notation parameter type + can use @@cvar as pointer syntax receiver (#9239) can use @@cvar as pointer syntax receiver (#9239) + says wrong number of block params in new on proc type says wrong number of block params in new on proc type + disallows Object in proc notation parameter type disallows Object in proc notation parameter type + types int -> int proc call types int -> int proc call + disallows Reference in proc return types disallows Reference in proc return types + unpacks tuple but doesn't override local variables, when using new (#9813) unpacks tuple but doesn't override local variables, when using new (#9813) + errors when using macro as proc value (top-level with obj) (#7465) errors when using macro as proc value (top-level with obj) (#7465) + virtualizes proc type (#6789) virtualizes proc type (#6789) + disallows Number in procs disallows Number in procs + disallows casting a proc type to one accepting same size argument but different output disallows casting a proc type to one accepting same size argument but different output + binds proc literal to arguments and body binds proc literal to arguments and body + sets proc type as void if explicitly told so, when using new sets proc type as void if explicitly told so, when using new + disallows Int in proc pointer disallows Int in proc pointer + disallows casting a proc type to one accepting more arguments disallows casting a proc type to one accepting more arguments + disallows Object in proc pointer disallows Object in proc pointer + disallows Class in proc notation return type disallows Class in proc notation return type + can assign NoReturn proc to other proc (#3032) can assign NoReturn proc to other proc (#3032) + allows using proc arg name shadowing local variable allows using proc arg name shadowing local variable + accesses T inside variadic generic (2) accesses T inside variadic generic (2) + disallows Class in proc notation parameter type disallows Class in proc notation parameter type + disallows Number in proc pointer disallows Number in proc pointer + disallows Enum in procs disallows Enum in procs + disallows Object in proc notation return type disallows Object in proc notation return type + allows metaclass in procs allows metaclass in procs + gets pointer to lib fun without specifying types gets pointer to lib fun without specifying types + disallows Number in proc notation return type disallows Number in proc notation return type + types proc literal with a type that was never instantiated types proc literal with a type that was never instantiated + allows passing virtual type including module to proc allows passing virtual type including module to proc + disallows Int in proc notation parameter type disallows Int in proc notation parameter type + disallows Enum in captured block disallows Enum in captured block + has proc literal as restriction and errors if output is different has proc literal as restriction and errors if output is different + allows passing proc type if it is a lib alias allows passing proc type if it is a lib alias + disallows Proc in procs disallows Proc in procs + errors when using macro as proc value (top-level) (#7465) errors when using macro as proc value (top-level) (#7465) + types proc type spec types proc type spec + types int -> int proc literal types int -> int proc literal + allows passing union including module to proc allows passing union including module to proc + disallows StaticArray in proc return types disallows StaticArray in proc return types + types a proc pointer with generic types types a proc pointer with generic types + disallows Float in proc notation return type disallows Float in proc notation return type + accesses T inside variadic generic, in proc notation accesses T inside variadic generic, in proc notation + disallows Number in captured block disallows Number in captured block + can pass Proc(X, T) to Proc(X, Nil) in type restriction (#8964) can pass Proc(X, T) to Proc(X, Nil) in type restriction (#8964) + can match *T in block argument can match *T in block argument + disallows Struct in captured block disallows Struct in captured block + types proc call with return type types proc call with return type + virtualizes proc type with -> (#8730) virtualizes proc type with -> (#8730) + uses array argument of proc arg (2) uses array argument of proc arg (2) + disallows Enum in proc notation return type disallows Enum in proc notation return type + allows metaclass in proc pointer allows metaclass in proc pointer + says wrong return type in new on proc type says wrong return type in new on proc type + disallows Value in proc return types disallows Value in proc return types + disallows Reference in proc notation parameter type disallows Reference in proc notation parameter type + disallows Pointer in proc notation return type disallows Pointer in proc notation return type + disallows Pointer in procs disallows Pointer in procs + types int proc literal types int proc literal + disallows Object in proc return types disallows Object in proc return types + passes proc pointer as block passes proc pointer as block + disallows Struct in proc return types disallows Struct in proc return types + disallows Reference in proc notation return type disallows Reference in proc notation return type + disallows Value in proc pointer disallows Value in proc pointer + disallows Reference in procs disallows Reference in procs + allows passing NoReturn type for any return type (1) allows passing NoReturn type for any return type (1) + types proc call types proc call + types Proc(*T, Void) as Proc(*T, Nil) types Proc(*T, Void) as Proc(*T, Nil) + disallows Int in proc return types disallows Int in proc return types + errors when using macro as proc value (inside method) (#7465) errors when using macro as proc value (inside method) (#7465) + allows metaclass in proc notation parameter type allows metaclass in proc notation parameter type + disallows Tuple in captured block disallows Tuple in captured block + accesses T inside variadic generic accesses T inside variadic generic + disallows Proc in captured block disallows Proc in captured block + disallows Pointer in proc return types disallows Pointer in proc return types + finds method of object finds method of object + allows using Proc as restriction (3) allows using Proc as restriction (3) + uses array argument of proc arg (3) uses array argument of proc arg (3) + disallows Value in proc notation return type disallows Value in proc notation return type + can pass proc that returns T as Void with named args (#7523) can pass proc that returns T as Void with named args (#7523) + allows passing NoReturn type for any return type (3) allows passing NoReturn type for any return type (3) + disallows StaticArray in proc notation return type disallows StaticArray in proc notation return type + passes proc pointer as block with arguments passes proc pointer as block with arguments + uses array argument of proc arg (4) uses array argument of proc arg (4) + disallows Proc in proc pointer disallows Proc in proc pointer + *doesn't* merge Proc that returns NoReturn with another one that returns something else (#9971) *doesn't* merge Proc that returns NoReturn with another one that returns something else (#9971) + has proc literal as restriction and errors if sizes are different has proc literal as restriction and errors if sizes are different + errors when using local variable with proc argument name errors when using local variable with proc argument name + disallows Pointer in proc pointer disallows Pointer in proc pointer + types proc pointer with a type that was never instantiated types proc pointer with a type that was never instantiated + disallows Value in captured block disallows Value in captured block + disallows Enum in proc notation parameter type disallows Enum in proc notation parameter type + disallows Struct in procs disallows Struct in procs + disallows Float in proc pointer disallows Float in proc pointer + disallows Proc in proc notation return type disallows Proc in proc notation return type + disallows Class in procs disallows Class in procs + disallows Tuple in proc pointer disallows Tuple in proc pointer + disallows Value in proc notation parameter type disallows Value in proc notation parameter type + disallows Tuple in proc notation parameter type disallows Tuple in proc notation parameter type + ... ... + allows passing nil as proc callback if it is a lib alias allows passing nil as proc callback if it is a lib alias + allows invoking a function with a generic subtype (1) allows invoking a function with a generic subtype (1) + allows passing NoReturn type for any return type, with Proc notation (#12126) allows passing NoReturn type for any return type, with Proc notation (#12126) + can assign proc that returns anything to proc that returns nil, with class var (#3655) can assign proc that returns anything to proc that returns nil, with class var (#3655) + disallows Value in procs disallows Value in procs + disallows Enum in proc return types disallows Enum in proc return types + disallows Reference in captured block disallows Reference in captured block + allows metaclass in captured block allows metaclass in captured block + allows implicit cast of proc to return void in LibC function allows implicit cast of proc to return void in LibC function + errors if inferred return type doesn't match return type restriction (1) errors if inferred return type doesn't match return type restriction (1) + can use @ivar as pointer syntax receiver (#9239) can use @ivar as pointer syntax receiver (#9239) + disallows Int in captured block disallows Int in captured block + allows using Proc as restriction (1) allows using Proc as restriction (1) + disallows StaticArray in procs disallows StaticArray in procs + allows implicit cast of proc to return void in non-generic restriction allows implicit cast of proc to return void in non-generic restriction + disallows Int in proc notation return type disallows Int in proc notation return type + disallows casting a proc type to one accepting less arguments disallows casting a proc type to one accepting less arguments + disallows Float in proc return types disallows Float in proc return types + has proc literal as restriction and works when output not specified has proc literal as restriction and works when output not specified + disallows Float in procs disallows Float in procs + has proc literal as restriction and works has proc literal as restriction and works + disallows Tuple in proc notation return type disallows Tuple in proc notation return type + allows implicit cast of proc to return void in generic restriction allows implicit cast of proc to return void in generic restriction + allows new on proc type that is a lib alias allows new on proc type that is a lib alias + disallows Class in proc pointer disallows Class in proc pointer + errors if inferred return type doesn't match return type restriction (2) errors if inferred return type doesn't match return type restriction (2) + types nil or proc type types nil or proc type + disallows Struct in proc pointer disallows Struct in proc pointer + errors if missing argument type in proc literal errors if missing argument type in proc literal + doesn't capture closured var if using typeof doesn't capture closured var if using typeof + allows passing proc type if it is typedef'd allows passing proc type if it is typedef'd + accesses T and R accesses T and R + says wrong number of arguments says wrong number of arguments + disallows Pointer in captured block disallows Pointer in captured block + allows passing function to LibC without specifying types allows passing function to LibC without specifying types + disallows Int in procs disallows Int in procs + gives correct error message when proc return type is incorrect (#219) gives correct error message when proc return type is incorrect (#219) + allows using Proc as restriction (2) allows using Proc as restriction (2) + *doesn't* merge Proc that returns Nil with another one that returns something else (#3655) (this was reverted) *doesn't* merge Proc that returns Nil with another one that returns something else (#3655) (this was reverted) + doesn't crash on constant to proc pointer doesn't crash on constant to proc pointer + disallows Struct in proc notation parameter type disallows Struct in proc notation parameter type + forwards block and computes correct type (bug) forwards block and computes correct type (bug) + allows new on proc type allows new on proc type + doesn't let passing an non-covariant generic argument doesn't let passing an non-covariant generic argument + allows metaclass in proc notation return type allows metaclass in proc notation return type + types proc literal with return type (1) types proc literal with return type (1) + has proc literal as restriction and errors if input is different has proc literal as restriction and errors if input is different + disallows Pointer in proc notation parameter type disallows Pointer in proc notation parameter type + disallows Class in captured block disallows Class in captured block + disallows Class in proc return types disallows Class in proc return types + merges return type merges return type + types proc pointer types proc pointer +Crystal::Repl::Interpreter + responds_to? + doesn't crash if def body ends up with no type (#12219) doesn't crash if def body ends up with no type (#12219) + does responds_to? does responds_to? +Code gen: if + codegens if with return and no else codegens if with return and no else + codegens if value from then codegens if value from then + doesn't crash with if !var using var in else doesn't crash with if !var using var in else + codegens nested if with var (ssa bug) codegens nested if with var (ssa bug) + codegens bug #1729 codegens bug #1729 + codegens if inside def without an else with true codegens if inside def without an else with true + codegen if with union type and then without type codegen if with union type and then without type + codegens if of nilable type in else codegens if of nilable type in else + codegens if of nilable type in then 2 codegens if of nilable type in then 2 + doesn't generate truthy if branch if doesn't need value (bug) doesn't generate truthy if branch if doesn't need value (bug) + codegens if with int codegens if with int + codegens if with virtual codegens if with virtual + doesn't crash no NoReturn var (non-true left cond) (#1823) doesn't crash no NoReturn var (non-true left cond) (#1823) + codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises + doesn't crash no NoReturn var (true left cond) (#1823) doesn't crash no NoReturn var (true left cond) (#1823) + codegen if with union type and else without type codegen if with union type and else without type + doesn't crash with if !is_a? using var in then doesn't crash with if !is_a? using var in then + codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter + codegen if inside if codegen if inside if + codegens if with an else with false codegens if with an else with false + codegens if with an else with true codegens if with an else with true + codegens if with pointer 0x100000000 pointer codegens if with pointer 0x100000000 pointer + codegens if of nilable type in else 3 codegens if of nilable type in else 3 + codegens #3104 codegens #3104 + codegen if with nested if that returns codegen if with nested if that returns + codegens if with union codegens if with union + codegens if with nil codegens if with nil + codegens if with return in both branches codegens if with return in both branches + restricts with || always falsey restricts with || always falsey + codes if with two whiles codes if with two whiles + codegens if without an else with true codegens if without an else with true + considers or truthy/falsey right considers or truthy/falsey right + codegens if without an else with false codegens if without an else with false + codegens if of nilable type in then codegens if of nilable type in then +Semantic: abstract def + matches generic types matches generic types + doesn't error if free var in arg restriction shadows another type (#10153) doesn't error if free var in arg restriction shadows another type (#10153) + errors if missing a return type in subclass of generic subclass errors if missing a return type in subclass of generic subclass + doesn't error if implements with included module doesn't error if implements with included module + doesn't error with splat doesn't error with splat + allows arguments to be collapsed into splat allows arguments to be collapsed into splat + errors if abstract method of private type is not implemented by including class errors if abstract method of private type is not implemented by including class + doesn't error if implements a NoReturn param doesn't error if implements a NoReturn param + errors if using abstract def on metaclass errors if using abstract def on metaclass + doesn't error if implementation has more keyword arguments with default values doesn't error if implementation has more keyword arguments with default values + can implement by block signature even if yield comes later in macro code can implement by block signature even if yield comes later in macro code + matches generic return type matches generic return type + implements through extend (considers original type for generic lookup) (2) (#8096) implements through extend (considers original type for generic lookup) (2) (#8096) + errors if abstract method with arguments is not implemented by subclass (block difference) errors if abstract method with arguments is not implemented by subclass (block difference) + doesn't error if abstract method is implemented by subclass via module inclusion doesn't error if abstract method is implemented by subclass via module inclusion + errors if keyword argument doesn't have the same default value errors if keyword argument doesn't have the same default value + can return a more specific type can return a more specific type + gives correct error when no overload matches, when an abstract method is implemented (#1406) gives correct error when no overload matches, when an abstract method is implemented (#1406) + extra keyword arguments must have compatible type to double splat extra keyword arguments must have compatible type to double splat + errors if implementation doesn't have a splat errors if implementation doesn't have a splat + doesn't error if abstract method with args is implemented by subclass (with one default arg) doesn't error if abstract method with args is implemented by subclass (with one default arg) + errors if abstract method is not implemented by subclass (nested in module) errors if abstract method is not implemented by subclass (nested in module) + doesn't error if implements with parent module doesn't error if implements with parent module + doesn't error with splat and args with default value doesn't error with splat and args with default value + errors if implementation doesn't have keyword arguments errors if implementation doesn't have keyword arguments + doesn't error if abstract method with args is implemented by subclass (restriction -> no restriction) doesn't error if abstract method with args is implemented by subclass (restriction -> no restriction) + finds implements in included module in disorder (#4052) finds implements in included module in disorder (#4052) + errors if implementation has more keyword arguments errors if implementation has more keyword arguments + works on abstract method on abstract class works on abstract method on abstract class + errors if abstract method with arguments is not implemented by subclass (wrong type) errors if abstract method with arguments is not implemented by subclass (wrong type) + errors if implementation misses the double splat errors if implementation misses the double splat + errors if abstract method is not implemented by subclass errors if abstract method is not implemented by subclass + doesn't error if implementation have keyword arguments in different order doesn't error if implementation have keyword arguments in different order + double splat must match keyword argument type double splat must match keyword argument type + doesn't error if implementation have default value doesn't error if implementation have default value + errors if using abstract def on subclass errors if using abstract def on subclass + errors if missing return type errors if missing return type + can implement even if yield comes later in macro code can implement even if yield comes later in macro code + allow double splat argument allow double splat argument + errors if can't find child return type errors if can't find child return type + doesn't error if abstract method is implemented by subclass doesn't error if abstract method is implemented by subclass + doesn't error if abstract method with args is implemented by subclass doesn't error if abstract method with args is implemented by subclass + errors if abstract method with arguments is not implemented by subclass errors if abstract method with arguments is not implemented by subclass + errors if abstract method with arguments is not implemented by subclass (wrong number of arguments) errors if abstract method with arguments is not implemented by subclass (wrong number of arguments) + errors if implementation doesn't match keyword argument type errors if implementation doesn't match keyword argument type + matches generic module matches generic module + errors if double splat type doesn't match errors if double splat type doesn't match + doesn't error if implements with generic included module instance doesn't error if implements with generic included module instance + errors if different return type errors if different return type + matches generic module (a bit more complex) matches generic module (a bit more complex) + doesn't error if implements with parent class doesn't error if implements with parent class + doesn't error if abstract method is not implemented by including module doesn't error if abstract method is not implemented by including module + doesn't error if abstract method is implemented by including class doesn't error if abstract method is implemented by including class + allow double splat when abstract doesn't have it allow double splat when abstract doesn't have it + works on abstract def on sub-subclass works on abstract def on sub-subclass + errors if implementation doesn't have the same default value errors if implementation doesn't have the same default value + doesn't error if implementation matches keyword argument doesn't error if implementation matches keyword argument + errors if implementation doesn't match splat type errors if implementation doesn't match splat type + implements through extend (considers original type for generic lookup) (#8096) implements through extend (considers original type for generic lookup) (#8096) + errors if implementation doesn't have a keyword argument errors if implementation doesn't have a keyword argument + errors if using abstract def on subclass that also defines it as abstract errors if using abstract def on subclass that also defines it as abstract + errors if implementation doesn't have default value errors if implementation doesn't have default value + error shows full signature of block parameter error shows full signature of block parameter + errors if can't find parent return type errors if can't find parent return type + errors if implementation adds type restriction errors if implementation adds type restriction + matches instantiated generic types matches instantiated generic types + errors if abstract method is not implemented by including class errors if abstract method is not implemented by including class + doesn't error if abstract method with args is implemented by subclass (don't check subclasses) doesn't error if abstract method with args is implemented by subclass (don't check subclasses) + errors if abstract method of private type is not implemented by subclass errors if abstract method of private type is not implemented by subclass + allow splat instead of keyword argument allow splat instead of keyword argument + implementation is not inherited from supertype + nongeneric class nongeneric class + generic module generic module + generic class generic class + nongeneric module nongeneric module + matches instantiated generic module matches instantiated generic module + doesn't error if implements with generic parent class instance doesn't error if implements with generic parent class instance + errors if abstract method is not implemented by subclass of subclass errors if abstract method is not implemented by subclass of subclass + errors if using abstract def on non-abstract class errors if using abstract def on non-abstract class +Code gen: named args + calls twice with different types calls twice with different types + sends two regular arguments as named arguments in inverted position (1) sends two regular arguments as named arguments in inverted position (1) + calls with named arg and other args calls with named arg and other args + overloads based on required named args overloads based on required named args + uses named args in dispatch uses named args in dispatch + calls with named arg as object method calls with named arg as object method + uses bare splat in new (2) uses bare splat in new (2) + calls with named arg calls with named arg + calls new with named arg calls new with named arg + overloads based on required named args, with restrictions overloads based on required named args, with restrictions + sends one regular argument as named argument sends one regular argument as named argument + sends two regular arguments as named arguments sends two regular arguments as named arguments + sends two regular arguments as named arguments in inverted position (2) sends two regular arguments as named arguments in inverted position (2) +Semantic: nilable cast + doesn't introduce type filter for nilable cast object (#12661) doesn't introduce type filter for nilable cast object (#12661) + types as? with union types as? with union + types as? with NoReturn types as? with NoReturn + doesn't crash with typeof no-type (#7441) doesn't crash with typeof no-type (#7441) + types as? types as? + does upcast does upcast + types as? with nil types as? with nil + casts to module casts to module +unreachable + finds top level methods finds top level methods + finds method called from expanded macro finds method called from expanded macro + ignores autogenerated enum predicates ignores autogenerated enum predicates + tallies calls tallies calls + finds methods called from reachable code finds methods called from reachable code + finds virtual method finds virtual method + finds yielding methods finds yielding methods + finds method called from block finds method called from block + finds instance methods finds instance methods + finds method with `super` finds method with `super` + handles circular hierarchy references (#14034) handles circular hierarchy references (#14034) + finds instance methods in nested types finds instance methods in nested types + finds shadowed method finds shadowed method + finds initializer finds initializer + finds method called from proc finds method called from proc + finds method called from instance variable initializer finds method called from instance variable initializer + finds methods with proc parameter finds methods with proc parameter + finds abstract method finds abstract method + finds method with `previous_def` finds method with `previous_def` + finds method called from expanded macro expression finds method called from expanded macro expression + finds methods in generic type finds methods in generic type + finds method with free variable finds method with free variable + finds method in abstract type finds method in abstract type + finds class methods finds class methods +Code gen: or + codegens or with bool union as left node 4 codegens or with bool union as left node 4 + 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 union as left node 3 codegens or with bool union as left node 3 + codegens or with bool true and false codegens or with bool true and false + codegens or with bool true and true codegens or with bool true and true + codegens or with bool union as left node 3 codegens or with bool union as left node 3 + codegens or with primitive type other than bool with union codegens or with primitive type other than bool with union + codegens or with bool and int 2 codegens or with bool and int 2 + codegens or with bool union as left node 1 codegens or with bool union as left node 1 + codegens or with bool false and false codegens or with bool false and false + codegens or with nilable as left node 2 codegens or with nilable 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 non-false union as left node codegens or with non-false union as left node + codegens or with bool false and true codegens or with bool false and true + codegens or with primitive type other than bool codegens or with primitive type other than bool + codegens or with primitive type other than bool codegens or with primitive type other than bool + codegens or with bool union as left node 2 codegens or with bool union as left node 2 + codegens or with bool union as left node 1 codegens or with bool union as left node 1 + codegens or with nilable as left node 1 codegens or with nilable as left node 1 + codegens or with bool and int 1 codegens or with bool and int 1 +Normalize: case + normalizes case with Path to is_a? normalizes case with Path to is_a? + normalizes case with nil to is_a? normalizes case with nil to is_a? + normalizes case with call normalizes case with call + normalizes case with var in cond normalizes case with var in cond + normalizes case with implicit ! normalizes case with implicit ! + normalizes case with multiple expressions normalizes case with multiple expressions + normalizes case with multiple expressions and comma normalizes case with multiple expressions and comma + normalizes case with multiple expressions with underscore normalizes case with multiple expressions with underscore + normalizes case without cond, when and else normalizes case without cond, when and else + normalizes case without value with many expressions in when normalizes case without value with many expressions in when + normalizes case with implicit is_a? (#3040) normalizes case with implicit is_a? (#3040) + normalizes case with implicit call normalizes case with implicit call + normalizes case with many expressions in when normalizes case with many expressions in when + normalizes case with multiple expressions and implicit obj normalizes case with multiple expressions and implicit obj + normalizes case with multiple expressions and non-tuple normalizes case with multiple expressions and non-tuple + normalizes case with implicit responds_to? (#3040) normalizes case with implicit responds_to? (#3040) + normalizes case with implicit as? (#3040) normalizes case with implicit as? (#3040) + normalizes case with assignment normalizes case with assignment + normalizes case with assignment wrapped by paren normalizes case with assignment wrapped by paren + normalizes case with multiple expressions and types normalizes case with multiple expressions and types + normalizes case without when and else normalizes case without when and else + normalizes case with implicit as (#3040) normalizes case with implicit as (#3040) + normalizes case without when but else normalizes case without when but else + normalizes case with generic to is_a? normalizes case with generic to is_a? + normalizes case with multiple expressions with all underscores normalizes case with multiple expressions with all underscores + 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? normalizes case with Path.class to is_a? + normalizes case without cond, when but else normalizes case without cond, when but else + 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 Path.class to is_a? (in) normalizes case with Path.class to is_a? (in) +Crystal::Repl::Interpreter + integration + does String#includes? does String#includes? + does some Hash methods does some Hash methods + does caller does caller + does Range#to_a, Array#to_s does Range#to_a, Array#to_s + does Int32#to_s does Int32#to_s + does Float64#to_s (simple) does Float64#to_s (simple) + does YAML::Serializable does YAML::Serializable + does JSON does JSON + does XML does XML + does CSV does CSV + does YAML does YAML + does IO.pipe (checks that StaticArray is passed correctly to C calls) does IO.pipe (checks that StaticArray is passed correctly to C calls) + does Float64#to_s (complex) does Float64#to_s (complex) + does JSON::Serializable does JSON::Serializable +Code gen: asm + codegens with two outputs codegens with two outputs + passes correct string length to LLVM passes correct string length to LLVM + codegens with intel dialect codegens with intel dialect + codegens without inputs codegens without inputs + codegens with one input codegens with one input + codegens with two inputs codegens with two inputs +Code gen: offsetof + returns offset of extern union returns offset of extern union + 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 class field returns offset allowing manual access of first class field + returns offset of `StaticArray#@buffer` returns offset of `StaticArray#@buffer` + returns offset allowing manual access of first struct field returns offset allowing manual access of first struct field + returns offset allowing manual access of tuple items returns offset allowing manual access of tuple items + 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: def + uses free variable uses free variable + errors when calling two functions with nil type errors when calling two functions with nil type + types call with union argument types call with union argument + types a call with an argument uses a new scope types a call with an argument uses a new scope + gives correct error for wrong number of arguments for program call inside type (2) (#1024) gives correct error for wrong number of arguments for program call inside type (2) (#1024) + errors if return type doesn't match errors if return type doesn't match + allows recursion with arg allows recursion with arg + uses free variable with metaclass and default value uses free variable with metaclass and default value + calls with default argument calls with default argument + types a call with an argument types a call with an argument + gives correct error for wrong number of arguments for program call inside type (#1024) gives correct error for wrong number of arguments for program call inside type (#1024) + types call with global scope types call with global scope + errors when default value is incompatible with type restriction errors when default value is incompatible with type restriction + errors if declares def inside if errors if declares def inside if + errors when default value is incompatible with non-type restriction errors when default value is incompatible with non-type restriction + types simple recursion 2 types simple recursion 2 + reports undefined method reports undefined method + says compile-time type on error says compile-time type on error + reports no overload matches 2 reports no overload matches 2 + says can only defined def on types and self says can only defined def on types and self + points error at name (#6937) points error at name (#6937) + types empty body def types empty body def + defines class method with self defines class method with self + types simple recursion types simple recursion + errors if return type doesn't match on instance method errors if return type doesn't match on instance method + shows free variables if no overload matches shows free variables if no overload matches + uses free variable as block return type uses free variable as block return type + reports no overload matches reports no overload matches + types a call with a double types a call with a double + defines class method defines class method + reports no block given reports no block given + is ok if returns Int32? with explicit return is ok if returns Int32? with explicit return + gives correct error for methods in Class (2) gives correct error for methods in Class (2) + types getchar with Char types getchar with Char + accesses free var of default argument (#1101) accesses free var of default argument (#1101) + lookups methods in super modules lookups methods in super modules + types putchar with Char types putchar with Char + types a call with a float types a call with a float + assigns def owner assigns def owner + types a call with an argument types a call with an argument + types mutual infinite recursion types mutual infinite recursion + types mutual recursion types mutual recursion + clones regex literal value (#2384) clones regex literal value (#2384) + errors if trying to declare method on generic class instance errors if trying to declare method on generic class instance + fixes bug #165 fixes bug #165 + types a call with an int types a call with an int + uses free variable with metaclass uses free variable with metaclass + uses free variable and doesn't conflict with top-level type uses free variable and doesn't conflict with top-level type + can't use self in toplevel method can't use self in toplevel method + gives correct error for methods in Class gives correct error for methods in Class + allows recursion allows recursion + errors if return type doesn't match on class method errors if return type doesn't match on class method + reports block given reports block given + do not use body for the def type do not use body for the def type + doesn't find type in namespace through free var doesn't find type in namespace through free var +Semantic: fun + errors if defining class inside fun through macro (#6874) errors if defining class inside fun through macro (#6874) +Semantic: array + assignment in array literal works (#3195) assignment in array literal works (#3195) + types array literal of int types array literal of int + types array literal with splats (2) types array literal with splats (2) + types non-empty typed array literal of int types non-empty typed array literal of int + types array literal with splats types array literal with splats + types array literal of int with splats types array literal of int with splats + types empty typed array literal of int32 types empty typed array literal of int32 + types array literal of union types array literal of union + types array literal size correctly types array literal size correctly + types non-empty typed array literal of int types non-empty typed array literal of int +Normalize: def + expands with magic constant expands with magic constant + 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 on request with default arguments that yields (external names) expands a def on request with default arguments that yields (external names) + expands a def with splat and double splat expands a def with splat and double splat + expands a def on request with default arguments and type restrictions expands a def on request with default arguments and type restrictions + expands with splat and default argument expands with splat and default argument + gives correct body location with + block instance var arg, with body block instance var arg, with body + splat arg, with body splat arg, with body + splat arg, without body splat arg, without body + block instance var arg, without body block instance var arg, without body + default arg, with body default arg, with body + default arg with restriction, without body default arg with restriction, without body + default arg, without body default arg, without body + default arg with restriction, with body default arg with restriction, with body + expands def with reserved external name (#6559) expands def with reserved external name (#6559) + expands with named argument and yield expands with named argument and yield + expands with splat expands with splat + expands with two named argument expands with two named argument + expands with splat with one arg before expands with splat with one arg before + expands with more named arg which come in the correct order expands with more named arg which come in the correct order + uses bare * uses bare * + 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 with external names (2) expands a def with external names (2) + expands with two named argument and one not expands with two named argument and one not + expands with splat and zero expands with splat and zero + 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 with one named arg that is the only one (1) expands with one named arg that is the only one (1) + expands a def on request with default arguments that yields expands a def on request with default arguments that yields + expands a def with external names (1) expands a def with external names (1) + expands a def with double splat and two named args expands a def with double splat and two named args + expands with named argument expands with named argument + expands with magic constant specifying one when all are magic expands with magic constant specifying one when all are magic + expands arg with default value after splat expands arg with default value after splat + expands with magic constant with named arg with yield expands with magic constant with named arg with yield + 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 + expands a def on request with default arguments expands a def on request with default arguments + expands a def on request with default arguments (2) expands a def on request with default arguments (2) + 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 (external names) expands a def on request with default arguments (external names) + expands a def on request with default arguments that yields (2) expands a def on request with default arguments that yields (2) + expands a def with double splat and no args expands a def with double splat and no args + expands with magic constant with named arg expands with magic constant with named arg +Codegen: extern struct + declares extern struct with no constructor, assigns var declares extern struct with no constructor, assigns var + doesn't crash with proc with extern struct that's a closure doesn't crash with proc with extern struct that's a closure + 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 + 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 + declares extern struct with no constructor declares extern struct with no constructor + invokes proc with extern struct invokes proc with extern struct + 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 + invokes proc with extern struct with sret invokes proc with extern struct with sret + 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 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 + 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 + 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 + 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 + codegens proc that takes and returns large extern struct by value codegens proc that takes and returns large extern struct by value + 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 + declares extern struct, sets and gets instance var declares extern struct, sets and gets instance var + codegens extern proc call twice (#4982) codegens extern proc call twice (#4982) +Semantic: return + can use type var as return type with an included generic module can use type var as return type with an included generic module + allows nilable return type to match subclasses (#1735) allows nilable return type to match subclasses (#1735) + flattens splats inside multiple return values flattens splats inside multiple return values + can use non-type free var in return type (2) (#6543) can use non-type free var in return type (2) (#6543) + types bug (#1823) types bug (#1823) + forms a tuple from multiple return values forms a tuple from multiple return values + infers return type with many returns (1) infers return type with many returns (1) + allows returning NoReturn instead of the wanted type allows returning NoReturn instead of the wanted type + can use free var in return type (#2492) can use free var in return type (#2492) + can use type var as return type with an inherited generic class can use type var as return type with an inherited generic class + errors on return in top level errors on return in top level + doesn't confuse return type from base class doesn't confuse return type from base class + infers return type with many returns (2) infers return type with many returns (2) + can use type var as return type (#1226) can use type var as return type (#1226) + errors if non-type free var cannot be inferred errors if non-type free var cannot be inferred + infers return type infers return type + types return if true types return if true + can use non-type free var in return type (#6543) can use non-type free var in return type (#6543) +Crystal::Formatter + 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 "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" formats "-> :: foo" - formats "foo(self // 1)" formats "foo(self // 1)" - formats "1.===() { 3 }" formats "1.===() { 3 }" - formats " <<-HTML\n foo\n HTML" formats " <<-HTML\n foo\n HTML" - formats "1#foo" formats "1#foo" - formats "foo . bar" formats "foo . bar" - formats "10 ** a" formats "10 ** a" - formats "1 \\\n+ 2" formats "1 \\\n+ 2" - formats "case 1\nwhen a; 2\nelse; b\nend" formats "case 1\nwhen a; 2\nelse; b\nend" - formats "def foo( x , * y )\nend" formats "def foo( x , * y )\nend" - formats "{% begin %}\n \"\n foo\"\n{% end %}" formats "{% begin %}\n \"\n foo\"\n{% end %}" - formats "foo : StaticArray(Foo, 12)[34]" formats "foo : StaticArray(Foo, 12)[34]" - formats "unless a\nunless b\n3\nelse\n4\nend\nend" formats "unless a\nunless b\n3\nelse\n4\nend\nend" - formats "alias Foo = Bar" formats "alias Foo = Bar" - formats "yield( *1 , *2 )" formats "yield( *1 , *2 )" - formats "def foo\n@x : Int32\nend" formats "def foo\n@x : Int32\nend" - formats "$1" formats "$1" - formats " {%\na = 1 %}" formats " {%\na = 1 %}" - formats "{% if true %}\n # x\n{% end %}" formats "{% if true %}\n # x\n{% end %}" - formats "->{}" formats "->{}" - formats " {{\n1 + 2 }}" formats " {{\n1 + 2 }}" - formats "1 * 2" formats "1 * 2" - formats "if 1\n[ 1 , 2 , 3 ]\nend" formats "if 1\n[ 1 , 2 , 3 ]\nend" - formats "macro foo\n 1 + 2\nend" formats "macro foo\n 1 + 2\nend" - gives proper line number in syntax error inside macro gives proper line number in syntax error inside macro - formats "a = 1;;; b = 2" formats "a = 1;;; b = 2" - formats "def foo(a, # comment\n *b)\nend" formats "def foo(a, # comment\n *b)\nend" - formats "class Foo\n # ```\n # 1\n # ```\nend\n" formats "class Foo\n # ```\n # 1\n # ```\nend\n" - formats "{\n1 => 2 ,\n 3 => 4 }" formats "{\n1 => 2 ,\n 3 => 4 }" - formats "while true\n1\n\n# foo\nend" formats "while true\n1\n\n# foo\nend" - formats "foo[1, &.bar] ||= 1" formats "foo[1, &.bar] ||= 1" - formats "foo[&.bar]?" formats "foo[&.bar]?" - formats "a = [\n1,\n2]" formats "a = [\n1,\n2]" - formats "sizeof( Int32 )" formats "sizeof( Int32 )" - formats "1.!=() { 3 }" formats "1.!=() { 3 }" - formats "def foo(x : (self)?)\nend" formats "def foo(x : (self)?)\nend" - formats "1 / 2" formats "1 / 2" - formats "# foo\na = 1 # bar" formats "# foo\na = 1 # bar" - formats "@x[ 1 ] ||= 2" formats "@x[ 1 ] ||= 2" - formats "foo.[1]" formats "foo.[1]" - formats "yield (1).foo" formats "yield (1).foo" - formats "foo[a, b: 2]" formats "foo[a, b: 2]" - formats "foo a , *b" formats "foo a , *b" - formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" - formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" - formats "{ {foo: 2} }" formats "{ {foo: 2} }" - formats " <<-HTML\n \#{1} \#{2}\n HTML" formats " <<-HTML\n \#{1} \#{2}\n HTML" - formats "1.<= do\nend" formats "1.<= do\nend" - formats "{ {% begin %}1{% end %}, nil }" formats "{ {% begin %}1{% end %}, nil }" - formats "struct Foo(T)\n# bar\n1\nend" formats "struct Foo(T)\n# bar\n1\nend" - formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" - 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 \\\nbar" formats "foo \\\nbar" - formats "foo { | ( a, *b , c ) | a }" formats "foo { | ( a, *b , c ) | a }" - formats "1.>=() { 3 }" formats "1.>=() { 3 }" - formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" - formats "0x1234_u32" formats "0x1234_u32" - formats "def foo ( x : Int32 ) \n end" formats "def foo ( x : Int32 ) \n end" - formats "1 && (\n 2 || 3\n)" formats "1 && (\n 2 || 3\n)" - formats "if a\n2\nelse\nend" formats "if a\n2\nelse\nend" - formats "foo : self?" formats "foo : self?" - formats "foo : Pointer(Foo)*" formats "foo : Pointer(Foo)*" - formats "1 ;\n 2" formats "1 ;\n 2" - formats "/foo \#{ bar }/" formats "/foo \#{ bar }/" - formats "begin\n ()\nend" formats "begin\n ()\nend" - formats "->Foo.foo?" formats "->Foo.foo?" - formats "def foo\nend;def bar\nend" formats "def foo\nend;def bar\nend" - formats "1 + # foo\n2" formats "1 + # foo\n2" - formats "a &.b.as(C)" formats "a &.b.as(C)" - formats "{ A: 1 }\n" formats "{ A: 1 }\n" - 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 "def foo(x, *, z)\nend" formats "def foo(x, *, z)\nend" - formats "return 1 , 2" formats "return 1 , 2" - formats "while 1 &&\n2 &&\n3\n4\nend" formats "while 1 &&\n2 &&\n3\n4\nend" - formats "Set{ # foo\n 1,\n}" formats "Set{ # foo\n 1,\n}" - formats "yield 1 , *2" formats "yield 1 , *2" - formats "alias Foo =Bar" formats "alias Foo =Bar" - formats "\"\#{\"foo\"}\"" formats "\"\#{\"foo\"}\"" - formats "foo.bar &.baz( 1 , 2 )" formats "foo.bar &.baz( 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 "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 "10/a" formats "10/a" - formats "return 1 , *2" formats "return 1 , *2" - formats "foo\n .bar\n .baz(\n 1\n )" formats "foo\n .bar\n .baz(\n 1\n )" - formats "a, b = \nif 1\n2\nend" formats "a, b = \nif 1\n2\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 "foo.[ 1 , 2 ] =3" formats "foo.[ 1 , 2 ] =3" - formats "[\n1, # a\n2, # b\n 3 # c\n]" formats "[\n1, # a\n2, # b\n 3 # c\n]" - formats "return 1, {2, 3}" formats "return 1, {2, 3}" - formats "foo &.[]=(1, 2)" formats "foo &.[]=(1, 2)" - formats "if 1\n [\n 1,\n ].none?\nend" formats "if 1\n [\n 1,\n ].none?\nend" - formats "->do\nend" formats "->do\nend" - formats "{1 => 2,\n 3 => 4, # lala\n}\n" formats "{1 => 2,\n 3 => 4, # lala\n}\n" - formats "foo(1, 2,)" formats "foo(1, 2,)" - formats "def foo\n1\n2\n# foo\nend" formats "def foo\n1\n2\n# foo\nend" - formats "foo(bar(\n 1,\n 2,\n))" formats "foo(bar(\n 1,\n 2,\n))" - formats "a = foo(bar(\n 1,\n 2,\n))" formats "a = foo(bar(\n 1,\n 2,\n))" - 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\n hello \n FOO\nend" formats "macro foo\n <<-FOO\n hello \n FOO\nend" - formats "begin\n begin\n\n end\nend" formats "begin\n begin\n\n end\nend" - formats "break( 1 , 2 )" formats "break( 1 , 2 )" - formats "foo &.as?(T).bar" formats "foo &.as?(T).bar" - formats "foo(<<-X,\na\nX\n 1)" formats "foo(<<-X,\na\nX\n 1)" - formats "1.[]= { 3 }" formats "1.[]= { 3 }" - formats "$0" formats "$0" - formats "foo : (A -> B)\nbar : C" formats "foo : (A -> B)\nbar : C" - 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 "asm(\"a\" : : : : \"volatile\")" formats "asm(\"a\" : : : : \"volatile\")" - formats "a(&.b.c.as C)" formats "a(&.b.c.as C)" - formats "foo x: 1" formats "foo x: 1" - formats "macro foo\n {{ 1 + 2 }}\nend" formats "macro foo\n {{ 1 + 2 }}\nend" - formats "break {1, 2}, {3, 4}" formats "break {1, 2}, {3, 4}" - 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\nfoo\nFOO" formats "<<-FOO\nfoo\nFOO" - formats "1 && 2" formats "1 && 2" - formats ":*" formats ":*" - formats "alias Foo::Bar= Baz" formats "alias Foo::Bar= Baz" - formats "foo : ( A | B )" formats "foo : ( A | B )" - formats "@x : A(B | C)?" formats "@x : A(B | C)?" - formats "module Foo; 1; end" formats "module Foo; 1; end" - formats "1 if 2" formats "1 if 2" - formats "next 1, {2, 3}" formats "next 1, {2, 3}" - formats "a = foo(bar([\n 1,\n]))" formats "a = foo(bar([\n 1,\n]))" + formats "1.===(2) { 3 }" formats "1.===(2) { 3 }" + formats "foo(1 ||\n # foo\n 2)" formats "foo(1 ||\n # foo\n 2)" + formats "def foo ( ) \n1\nend" formats "def foo ( ) \n1\nend" + formats "macro foo()\nend" formats "macro foo()\nend" + formats "if a\nif b\n3\nelse\n4\nend\nend" formats "if a\nif b\n3\nelse\n4\nend\nend" + formats "page= <<-HTML\n \#{1}foo\nHTML" formats "page= <<-HTML\n \#{1}foo\nHTML" + formats "class Foo\n def foo\n # nothing\n end\nend" formats "class Foo\n def foo\n # nothing\n end\nend" + formats "x = <<-EOF\n 1\nEOF" formats "x = <<-EOF\n 1\nEOF" + 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 "def foo\n 1\n 2\nrescue IO\n 1\nend" formats "def foo\n 1\n 2\nrescue IO\n 1\nend" + formats "case 1\nend" formats "case 1\nend" + formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" + formats "foo = 1\n->foo.bar=(Int32)" formats "foo = 1\n->foo.bar=(Int32)" + formats "x : (A | B)" formats "x : (A | B)" formats "foo self // 1" formats "foo self // 1" - 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)" formats "foo(&.@bar)" - formats "[1,\n2,\n3\n]" formats "[1,\n2,\n3\n]" - formats "macro foo\n {% if 1 %} 2 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% end %}\nend" - formats "begin\n 1 \\\n + 2\n 3\nend" formats "begin\n 1 \\\n + 2\n 3\nend" - formats " {{ 1 + 2 }}" formats " {{ 1 + 2 }}" - formats "10 / a" formats "10 / a" - formats "case / /\nwhen / /, /x/\n / /\nend" formats "case / /\nwhen / /, /x/\n / /\nend" - formats "x : {A, B, }" formats "x : {A, B, }" - formats "/ /" formats "/ /" - formats "->( x : Int32 , y ) { x }" formats "->( x : Int32 , y ) { x }" - formats "__LINE__" formats "__LINE__" - formats "macro foo\n %foo{x,y}\nend" formats "macro foo\n %foo{x,y}\nend" - 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 "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 "if 1;\n2; end" formats "if 1;\n2; end" + formats "()" formats "()" + formats "foo.bar.baz\n.qux" formats "foo.bar.baz\n.qux" + formats "next {1, 2}, {3, 4}" formats "next {1, 2}, {3, 4}" + formats "x : (A -> B)?" formats "x : (A -> B)?" + formats "begin\n1\nensure\n2\nend" formats "begin\n1\nensure\n2\nend" + formats "\n# hello\n1" formats "\n# hello\n1" + formats "foo do \n x \n end" formats "foo do \n x \n end" + formats "%x(foo \#{ bar })" formats "%x(foo \#{ bar })" + formats "def foo ( @@x) \n end" formats "def foo ( @@x) \n end" + formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" + formats "foo = {1, {2,\n 3},\n 4}" formats "foo = {1, {2,\n 3},\n 4}" + formats "foo &.is_a?(T).bar" formats "foo &.is_a?(T).bar" + 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 "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 &.bar.nil?" formats "foo &.bar.nil?" + formats "case 1 # foo\nwhen 2\nend" formats "case 1 # foo\nwhen 2\nend" + 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(\n1,\n 2 \n)" formats "foo(\n1,\n 2 \n)" + formats "1 #=>2" formats "1 #=>2" + formats "# ```text\n# 1 + 2\n# ```" formats "# ```text\n# 1 + 2\n# ```" + formats "def foo: Int32\nend" formats "def foo: Int32\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 "foo &.bar.responds_to?(:baz)" formats "foo &.bar.responds_to?(:baz)" + formats ":&" formats ":&" + formats "class Foo # foo\nend" formats "class Foo # foo\nend" + formats "yield( 1 , 2 )" formats "yield( 1 , 2 )" + formats "{ %w() }" formats "{ %w() }" + 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 "begin\n # Comment\n\n\nend" formats "begin\n # Comment\n\n\nend" + formats "{1, 2, 3}" formats "{1, 2, 3}" + formats "a = 1 + # foo\n2" formats "a = 1 + # foo\n2" + formats "x : {A, B}" formats "x : {A, B}" + formats "foo &.[]?" formats "foo &.[]?" does not add `&` without flag `method_signature_yield` + formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx)\n yield\nend" formats "def foo(\nx)\n yield\nend" - formats "def foo(x ,)\n yield\nend" formats "def foo(x ,)\n yield\nend" formats "def foo(x,\n)\n yield\nend" formats "def foo(x,\n)\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()\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)\n yield\nend" formats "def foo(x\n)\n yield\nend" - formats "def foo # bar\n yield\nend" formats "def foo # bar\n yield\nend" - formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\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(\nx, y)\n yield\nend" formats "def foo(\nx, y)\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(\n)\n yield\nend" formats "def foo(\n)\n yield\nend" - formats "def foo(x)\n self // x\nend" formats "def foo(x)\n self // x\nend" - formats "abstract def foo\nabstract def bar" formats "abstract def foo\nabstract def bar" - formats "macro foo\n {{1 + 2}}\nend" formats "macro foo\n {{1 + 2}}\nend" - formats "next 1" formats "next 1" - formats "\"\#{\n foo = 1\n}\"" formats "\"\#{\n foo = 1\n}\"" - formats "<<-FOO\nfoo\nfoo\nFOO" formats "<<-FOO\nfoo\nfoo\nFOO" - formats "1_234" formats "1_234" - formats "[] of (((Array(T))))" formats "[] of (((Array(T))))" - formats "abstract def foo \n 1" formats "abstract def foo \n 1" - formats "def foo(**z)\nend" formats "def foo(**z)\nend" - formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" - formats "1 &+ 2" formats "1 &+ 2" - formats "1 || 2" formats "1 || 2" - formats "def foo(x) # bar\n # baz\nend" formats "def foo(x) # bar\n # baz\nend" - formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" - 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 {% 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 "def foo\nend\n\ndef bar\nend\n\n# foo" formats "def foo\nend\n\ndef bar\nend\n\n# foo" - formats "foo { | a, ( b , c ) | a + b + c }" formats "foo { | a, ( b , c ) | a + b + c }" - formats "@a" formats "@a" - formats "foo { | a, ( b , c, ), | a + b + c }" formats "foo { | a, ( b , c, ), | a + b + c }" - formats "if 1\n {{1 + 2}}\nend" formats "if 1\n {{1 + 2}}\nend" - formats "x.try &.[]= 123, 456" formats "x.try &.[]= 123, 456" - 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 "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" - formats "1.>= do\nend" formats "1.>= do\nend" - formats "ary.size = (1).to_i" formats "ary.size = (1).to_i" - formats "%{hello}" formats "%{hello}" - formats "'\\u{0123}'" formats "'\\u{0123}'" - 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 "a = 1\n;\nb = 2" formats "a = 1\n;\nb = 2" - formats "\"\" + <<-END\n bar\n END" formats "\"\" + <<-END\n bar\n END" - formats "def foo ( @@select) \n end" formats "def foo ( @@select) \n end" - formats "1 > 2" formats "1 > 2" - formats "next" formats "next" - formats "yield( 1 )" formats "yield( 1 )" - formats "foo &.[]" formats "foo &.[]" - formats "10 // a" formats "10 // a" - formats "foo 1 , &bar" formats "foo 1 , &bar" - formats "foo {;1}" formats "foo {;1}" - formats "foo a , b , x: 1" formats "foo a , b , x: 1" - formats "::StaticArray(T)" formats "::StaticArray(T)" - formats "::NamedTuple()" formats "::NamedTuple()" - formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" - formats "1.!=(2) { 3 }" formats "1.!=(2) { 3 }" - 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 "if a\n2\n3\nend" formats "if a\n2\n3\nend" - formats "1\n.." formats "1\n.." - formats "%w{one( two( three)}" formats "%w{one( two( three)}" - formats "foo &.[]( 1, 2 )" formats "foo &.[]( 1, 2 )" - formats "begin\n array[\n 0 # Zero\n ]\nend" formats "begin\n array[\n 0 # Zero\n ]\nend" - formats "1+2*3" formats "1+2*3" - formats "1 ... 2" formats "1 ... 2" - formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" - formats "\"foo \#{ __DIR__ }\"" formats "\"foo \#{ __DIR__ }\"" - formats "a = 1\na ||= begin\n 1\nend" formats "a = 1\na ||= begin\n 1\nend" - formats "foo &.bar.is_a?(Baz)" formats "foo &.bar.is_a?(Baz)" - formats "def foo(a, **b, # comment\n &block)\nend" formats "def foo(a, **b, # comment\n &block)\nend" - formats "1 && # foo\n 2 &&\n 3" formats "1 && # foo\n 2 &&\n 3" - formats "%w(one two three)" formats "%w(one two three)" - formats "{/ / => / /, / / => / /}" formats "{/ / => / /, / / => / /}" - formats "a.b &.[c]?\n1" formats "a.b &.[c]?\n1" - formats "lib Foo\nstruct Foo\nend\nend" formats "lib Foo\nstruct Foo\nend\nend" - formats "[\n] of \n Foo " formats "[\n] of \n Foo " - formats "nil?" formats "nil?" - formats "1 + \\\n2\n3" formats "1 + \\\n2\n3" - formats "-> : {Int32, String} {}" formats "-> : {Int32, String} {}" - formats "next *1" formats "next *1" - formats "require \"foo\"" formats "require \"foo\"" - formats "foo.%(bar)" formats "foo.%(bar)" - formats "foo { |x, *y| }" formats "foo { |x, *y| }" - formats "def foo(a,\n **b)\nend" formats "def foo(a,\n **b)\nend" - 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 "lib Foo\nfun foo : Int32\nend" formats "lib Foo\nfun foo : Int32\nend" - formats "while 1\n2 # foo\nend" formats "while 1\n2 # foo\nend" - formats "def foo(\n &block\n)\nend" formats "def foo(\n &block\n)\nend" - formats ":&*" formats ":&*" - formats "-> :: Foo . foo!" formats "-> :: Foo . foo!" - formats "class Foo;end" formats "class Foo;end" - 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 "lib Foo\n fun bar = Bar\nend" formats "lib Foo\n fun bar = Bar\nend" - formats "def foo (\nx ,\n y ) \n end" formats "def foo (\nx ,\n y ) \n end" - formats "module Moo ( T )\nend" formats "module Moo ( T )\nend" - adds `&` to yielding methods that don't have a block parameter (#8764) + 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(a, **b)\n yield\nend" formats "def foo(a, **b)\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\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()\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 "def foo(x\n)\n yield\nend" formats "def foo(x\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 yield\nend" formats "def foo(x)\n yield\nend" - formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" - formats "def foo(\n)\n yield\nend" formats "def foo(\n)\n yield\nend" - formats "def foo(\nx)\n yield\nend" formats "def foo(\nx)\n yield\nend" - formats "macro f\n yield\n {{ yield }}\nend" formats "macro f\n yield\n {{ yield }}\nend" + formats "def foo(x,\ny,)\n yield\nend" formats "def foo(x,\ny,)\n yield\nend" + formats "def foo(\nx,\n)\n yield\nend" formats "def foo(\nx,\n)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" - formats "foo x, self // 1" formats "foo x, self // 1" - formats "case 1\nelse # foo\n # bar\nend" formats "case 1\nelse # foo\n # bar\nend" - formats "1 ? 2 : 3" formats "1 ? 2 : 3" - 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 "def run\n\nrescue\n 2\n 3\nend" formats "def run\n\nrescue\n 2\n 3\nend" - 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 "->foo" formats "->foo" - formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" - formats " macro foo\n end\n\n :+" formats " macro foo\n end\n\n :+" - formats "return { {1, 2}, {3, 4} }, 5" formats "return { {1, 2}, {3, 4} }, 5" - formats "macro []=(x, y)\nend" formats "macro []=(x, y)\nend" - formats "enum Foo;end" formats "enum Foo;end" - formats "class X\n annotation FooAnnotation \n end \n end" formats "class X\n annotation FooAnnotation \n end \n end" - formats "foo{|x|\n x}" formats "foo{|x|\n x}" - formats "yield 1\n2" formats "yield 1\n2" - formats "class Foo\nx = 1\nend" formats "class Foo\nx = 1\nend" - formats "%w(\n one two\n three four\n)" formats "%w(\n one two\n three four\n)" - formats "foo(A |\nB |\nC)" formats "foo(A |\nB |\nC)" - formats "Foo( Bar( ) )" formats "Foo( Bar( ) )" - formats "{ {% for x in 1..2 %}3{% end %}, nil }" formats "{ {% for x in 1..2 %}3{% end %}, nil }" - formats "typeof( 1, 2, 3 )" formats "typeof( 1, 2, 3 )" - formats "foo(->{\n 1 + 2\n})" formats "foo(->{\n 1 + 2\n})" - formats "1.===(2) { 3 }" formats "1.===(2) { 3 }" - formats "run(\"a\", 1)" formats "run(\"a\", 1)" - formats "__DIR__" formats "__DIR__" - formats "1 unless 2" formats "1 unless 2" - formats "foo (1).bar" formats "foo (1).bar" - formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" + formats "def foo(x,\n y)\n yield\nend" formats "def foo(x,\n y)\n yield\nend" + formats "def foo(\n)\n yield\nend" formats "def foo(\n)\n yield\nend" + formats "def foo(x ,)\n yield\nend" formats "def foo(x ,)\n yield\nend" + formats "case 1 \n when 2 ;\n 3 \n end" formats "case 1 \n when 2 ;\n 3 \n end" + formats "private getter foo" formats "private getter foo" + formats "foo &.as?(T).bar" formats "foo &.as?(T).bar" formats "1\n\n2" formats "1\n\n2" - formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" - formats "foo[x: 1, &.bar] = 1" formats "foo[x: 1, &.bar] = 1" - formats "macro foo\n {% for x in y %} 2 {% end %}\nend" formats "macro foo\n {% for x in y %} 2 {% end %}\nend" - formats "#######" formats "#######" - formats "foo.bar += 2" formats "foo.bar += 2" - formats "foo = 1\n->foo.bar(Int32)" formats "foo = 1\n->foo.bar(Int32)" - formats "unless a\n2; 3\nelse\n3\nend" formats "unless a\n2; 3\nelse\n3\nend" - formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" - formats "%" formats "%" - formats "asm(\"nop\" : \"a\"(0) )" formats "asm(\"nop\" : \"a\"(0) )" - 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 "loop do\n 1\nrescue\n 2\nend" formats "loop do\n 1\nrescue\n 2\nend" - formats "def foo ( @x) \n end" formats "def foo ( @x) \n end" - formats "foo(\n a: 1,\n b: 2,\n )\n" formats "foo(\n a: 1,\n b: 2,\n )\n" - formats " <<-HTML\n foo\nHTML" formats " <<-HTML\n foo\nHTML" - formats "foo 1, # comment\n do\n end" formats "foo 1, # comment\n do\n end" - formats "@[Foo]" formats "@[Foo]" - formats "case nil\nelse nil; nil\n# comment\nend" formats "case nil\nelse nil; nil\n# comment\nend" - formats "foo[1, &.bar] = 1" formats "foo[1, &.bar] = 1" + formats "if 1\n ((1) + 2)\nend" formats "if 1\n ((1) + 2)\nend" + formats "1.>= do\nend" formats "1.>= do\nend" + formats "foo(bar(baz3 do\nend))" formats "foo(bar(baz3 do\nend))" + formats "->@@foo.foo?" formats "->@@foo.foo?" + formats "foo[ 1 , 2 ] =3" formats "foo[ 1 , 2 ] =3" + formats "&- 1" formats "&- 1" + formats "begin\n1 ? 2 : 3\nend" formats "begin\n1 ? 2 : 3\nend" + 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 "instance_alignof( Int32 )" formats "instance_alignof( Int32 )" + formats "1 &+ 2" formats "1 &+ 2" + formats "case 1 \n when 2 then \n 3 \n end" formats "case 1 \n when 2 then \n 3 \n end" + gives proper line number in syntax error inside macro gives proper line number in syntax error inside macro + formats "_ = 1" formats "_ = 1" + formats "a &.b.as(C)" formats "a &.b.as(C)" + formats "next( 1 )" formats "next( 1 )" + formats "foo(1,\n &.bar)" formats "foo(1,\n &.bar)" + formats "foo[&.bar] ||= 1" formats "foo[&.bar] ||= 1" formats "foo &.[a] = 1" formats "foo &.[a] = 1" - formats "NamedTuple(\n a: Int32,)" formats "NamedTuple(\n a: Int32,)" - formats "foo &.as?(T)" formats "foo &.as?(T)" - 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 "return { {1, 2}, {3, 4} }" formats "return { {1, 2}, {3, 4} }" - formats "Set { 1 , 2 }" formats "Set { 1 , 2 }" - formats "def foo ( x : self ) \n end" formats "def foo ( x : self ) \n end" - formats "-> : Int32 {}" formats "-> : Int32 {}" - formats "foo do # hello\nend" formats "foo do # hello\nend" - formats "if 1\n {% if 2 %} {% end %}\nend" formats "if 1\n {% if 2 %} {% end %}\nend" - formats "def foo(x) forall T # bar\n # baz\nend" formats "def foo(x) forall T # bar\n # baz\nend" - formats "@@a" formats "@@a" - formats "foo({\nbar: 1,\n})" formats "foo({\nbar: 1,\n})" - formats "def foo ( @x, @y) \n end" formats "def foo ( @x, @y) \n end" - formats "if 1\n foo(\n bar,\n # comment\n )\nend" formats "if 1\n foo(\n bar,\n # comment\n )\nend" - formats "SomeLib.UppercasedFunCall 1, 2" formats "SomeLib.UppercasedFunCall 1, 2" - formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(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 "if 1\n# nothing\nend" formats "if 1\n# nothing\nend" - formats "->@foo.foo?" formats "->@foo.foo?" - formats "def foo( x , & block : Int32->Float64)\nend" formats "def foo( x , & block : Int32->Float64)\nend" - formats "->do\nx\nend" formats "->do\nx\nend" - formats "if 1\n2\nend\nif 3\nend" formats "if 1\n2\nend\nif 3\nend" - formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" - formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" - 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 foo ( x = 1 ) \n end" formats "def foo ( x = 1 ) \n end" - formats "def foo\n1\nend" formats "def foo\n1\nend" - formats "bla.select(&.all?{ |x| x } )" formats "bla.select(&.all?{ |x| x } )" - formats "foo((1..3))" formats "foo((1..3))" - formats "def foo\n2 # foo\nend" formats "def foo\n2 # foo\nend" - formats "select # some comment\nwhen bar\n break\nend" formats "select # some comment\nwhen bar\n break\nend" - formats "if / /\nend" formats "if / /\nend" - formats "x\n# foo\n\n# bar" formats "x\n# foo\n\n# bar" - formats "\n # hello\n\n1" formats "\n # hello\n\n1" - formats "def foo(x : ( A | B )) : ( A | B )\nend" formats "def foo(x : ( A | B )) : ( A | B )\nend" - formats "__FILE__" formats "__FILE__" - 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 "{% 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 "$~ = 1" formats "$~ = 1" + 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 "foo(\n 1,\n) do\n 2\nend" formats "foo(\n 1,\n) do\n 2\nend" formats "def foo(a,\n *b)\nend" formats "def foo(a,\n *b)\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 "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 "if 1\n2\n3\n# foo\nend" formats "if 1\n2\n3\n# foo\nend" - formats "foo(baz(x, y) do\n 1 + 2\nend)" formats "foo(baz(x, y) do\n 1 + 2\nend)" - formats "begin\n array[\n 0, # Zero\n ]\nend" formats "begin\n array[\n 0, # Zero\n ]\nend" - formats "foo { | a, ( b , (c, d) ) | a + b + c }" formats "foo { | a, ( b , (c, d) ) | a + b + c }" - formats "->{}" formats "->{}" - formats "if a\n2\nend" formats "if a\n2\nend" - formats " ( 1; 2; 3 ) " formats " ( 1; 2; 3 ) " - 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 "(())" formats "(())" - formats "->foo?" formats "->foo?" - formats "yield 1 , \n2" formats "yield 1 , \n2" - formats "<<-FOO\nfoobar\nFOO" formats "<<-FOO\nfoobar\nFOO" - formats "if a\n2; 3\nelse\n3\nend" formats "if a\n2; 3\nelse\n3\nend" - formats "foo : A(B)\nbar : C" formats "foo : A(B)\nbar : C" - formats "foo : Foo*****" formats "foo : Foo*****" - formats "foo(\n 1, 2,\n&block)" formats "foo(\n 1, 2,\n&block)" - formats "foo()" formats "foo()" - formats "1 // 2" formats "1 // 2" - formats "@x[ 1 ] += 2" formats "@x[ 1 ] += 2" - 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 "case 1\nwhen 2\n#comment\nend" formats "case 1\nwhen 2\n#comment\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 "def foo ( x : Int32 = 1 ) \n end" formats "def foo ( x : Int32 = 1 ) \n end" + formats "select # some comment\nwhen bar\n break\nend" formats "select # some comment\nwhen bar\n break\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 ()" formats "foo ()" + formats "def foo(*y, **z)\nend" formats "def foo(*y, **z)\nend" + formats "@foo : Int32 # comment\n\ndef foo\nend" formats "@foo : Int32 # comment\n\ndef foo\nend" + formats "def foo\n1\n2\n# foo\nend" formats "def foo\n1\n2\n# foo\nend" formats "foo &.[]=( 1, 2 )" formats "foo &.[]=( 1, 2 )" - formats "include Foo" formats "include Foo" - 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 "1\n2 \n # foo" formats "1\n2 \n # foo" - formats "foo (1), 2" formats "foo (1), 2" - formats "[ # foo\n 1,\n]" formats "[ # foo\n 1,\n]" - formats "-> : Int32[1] {}" formats "-> : Int32[1] {}" - formats "foo &.[]?" formats "foo &.[]?" - formats "-> : Int32 | String { 1 }" formats "-> : Int32 | String { 1 }" - formats "%[hello]" formats "%[hello]" - formats "a(&.b.c.as(C))" formats "a(&.b.c.as(C))" - formats "def self . foo\nend" formats "def self . foo\nend" - formats "if 1\ncase 1\nwhen 2\n3\nend\nend" formats "if 1\ncase 1\nwhen 2\n3\nend\nend" - formats "-> :: foo?" formats "-> :: foo?" - formats "{ {1, 2, 3} => 4 }" formats "{ {1, 2, 3} => 4 }" - formats "select \n when foo \n 2 \n end" formats "select \n when foo \n 2 \n end" - formats "fun foo(x : Int32) : Int32\n 1\nend" formats "fun foo(x : Int32) : Int32\n 1\nend" - formats "->: Int32 do\nx\nend" formats "->: Int32 do\nx\nend" - formats "/\#{1}/imx" formats "/\#{1}/imx" - formats "asm(\"nop\"\n: \"a\"(0) )" formats "asm(\"nop\"\n: \"a\"(0) )" - formats "foo(\n 1, # hola\n2, # chau\n )" formats "foo(\n 1, # hola\n2, # chau\n )" - formats "lib Foo\n $foo = hello : Int32 \nend" formats "lib Foo\n $foo = hello : Int32 \nend" - formats "case 1 \n when .foo? \n 3 \n end" formats "case 1 \n when .foo? \n 3 \n end" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" - formats "lib Foo\nfun foo( ... ) : Int32\nend" formats "lib Foo\nfun foo( ... ) : Int32\nend" - formats "{x => self // 1}" formats "{x => self // 1}" - 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 "bar = foo([\n 1,\n 2,\n 3,\n])" formats "bar = foo([\n 1,\n 2,\n 3,\n])" - formats "foo(\n1,\n 2 \n)" formats "foo(\n1,\n 2 \n)" - 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 "Hash{\n foo => <<-EOF\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" - formats "\"hel\\nlo\"" formats "\"hel\\nlo\"" - formats "1.==() { 3 }" formats "1.==() { 3 }" - formats "a = # foo\n bar(1)" formats "a = # foo\n bar(1)" - formats "foo &.bar.responds_to?(:baz)" formats "foo &.bar.responds_to?(:baz)" - 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 "def foo( x , & block : ->)\nend" formats "def foo( x , & block : ->)\nend" - formats "x.try &.[] 123" formats "x.try &.[] 123" - formats "foo &.[]?( 1, 2 )" formats "foo &.[]?( 1, 2 )" - formats "foo(out x)" formats "foo(out x)" - formats "begin\n1 ? 2 : 3\nend" formats "begin\n1 ? 2 : 3\nend" - formats "@[Foo()]" formats "@[Foo()]" - formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - 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 "foo[]" formats "foo[]" - 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 "[\n # foo\n] of String" formats "[\n # foo\n] of String" - formats "::Pointer(T)" formats "::Pointer(T)" - formats "page= <<-HTML\n foo\nHTML" formats "page= <<-HTML\n foo\nHTML" - 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(1, # foo\n &.bar)" formats "foo(1, # foo\n &.bar)" - formats "1 &&\n2 &&\n3" formats "1 &&\n2 &&\n3" - formats "x = 1\nx += 1" formats "x = 1\nx += 1" - formats "begin\n1\nrescue ex\n3\nelse\n4\nend" formats "begin\n1\nrescue ex\n3\nelse\n4\nend" - formats "\n# hello\n\n1" formats "\n# hello\n\n1" - formats "a || b" formats "a || b" - formats "class Foo\nend\nclass Bar\nend" formats "class Foo\nend\nclass Bar\nend" - formats "case 1 \n in Int32 \n 3 \n end" formats "case 1 \n in Int32 \n 3 \n end" - 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 " [ 1, \n 2 , \n 3 ] " formats " [ 1, \n 2 , \n 3 ] " - formats "macro foo\n %foo\nend" formats "macro foo\n %foo\nend" - formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" - formats "foo[ 1, 2 ]?" formats "foo[ 1, 2 ]?" - formats "def foo ( ) \n1\nend" formats "def foo ( ) \n1\nend" - formats " {% if 1 %} 2 {% end %}" formats " {% if 1 %} 2 {% end %}" - formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" - formats "1&+2&*3" formats "1&+2&*3" - formats "foo.[]" formats "foo.[]" - formats "class Foo \n\n 1 \n\nend" formats "class Foo \n\n 1 \n\nend" - formats "break( 1 )" formats "break( 1 )" - formats "1 ; 2" formats "1 ; 2" - 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 "def foo\n 1\n # Comment\n\n\nend" formats "def foo\n 1\n # Comment\n\n\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(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - formats "foo[x: 1, &.bar] ||= 1" formats "foo[x: 1, &.bar] ||= 1" - formats "if 1\nbegin\n2\nensure\n3\nend\nend" formats "if 1\nbegin\n2\nensure\n3\nend\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 "alias Foo::Bar = Baz" formats "alias Foo::Bar = Baz" - formats ":\"foo\"" formats ":\"foo\"" - formats "macro foo=(x)\nend" formats "macro foo=(x)\nend" - formats "/foo/" formats "/foo/" - formats "foo(a: //, b: //)" formats "foo(a: //, b: //)" - formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\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 "def foo\n\n1\n\nend" formats "def foo\n\n1\n\nend" - formats "begin\n # Comment\n\n\nend" formats "begin\n # Comment\n\n\nend" - formats "x : {\"foo bar\": Int32}" formats "x : {\"foo bar\": Int32}" - formats "begin\n1\n2\n3\nend" formats "begin\n1\n2\n3\nend" - formats "foo[1, &.bar]" formats "foo[1, &.bar]" - formats "a = \nif 1\n2\nend" formats "a = \nif 1\n2\nend" - formats "-> : Int32 {}" formats "-> : Int32 {}" - 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 "begin\n1\nrescue ex\n3\nend" formats "begin\n1\nrescue ex\n3\nend" - formats "x = <<-EOF\n 1\nEOF" formats "x = <<-EOF\n 1\nEOF" - formats "def foo(x = __FILE__ )\nend" formats "def foo(x = __FILE__ )\nend" - formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" - formats "foo &.nil?" formats "foo &.nil?" - formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" - formats "@x ||= 1" formats "@x ||= 1" - formats "->Foo.foo!" formats "->Foo.foo!" - formats "1.as? Int32" formats "1.as? Int32" - formats "def foo\na = bar do\n1\nend\nend" formats "def foo\na = bar do\n1\nend\nend" - formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" - formats "foo[1, &.bar]?" formats "foo[1, &.bar]?" - formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" - formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" - formats "a = while 1\n2\nend" formats "a = while 1\n2\nend" - formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" - formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" - formats "$? = 1" formats "$? = 1" - formats "def foo : (A | B(C))\n nil\nend" formats "def foo : (A | B(C))\n nil\nend" - formats "foo = {1, {2,\n 3},\n 4}" formats "foo = {1, {2,\n 3},\n 4}" + formats "return {1, 2}, 3" formats "return {1, 2}, 3" + formats "macro foo\n {% if 1 %} 2 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% end %}\nend" formats "return" formats "return" - formats "\"\#{foo = 1\n}\"" formats "\"\#{foo = 1\n}\"" - formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" - formats "class Foo\n def foo\n # nothing\n end\nend" formats "class Foo\n def foo\n # nothing\n end\nend" - formats "foo.[] =1" formats "foo.[] =1" - formats "...\n2" formats "...\n2" - formats "def foo\n {{@type}}\nend" formats "def foo\n {{@type}}\nend" - formats "Foo:: Bar" formats "Foo:: Bar" - formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" - formats " <<-EOF\n 1\nEOF" formats " <<-EOF\n 1\nEOF" - formats "macro foo\n def bar \n end \n end" formats "macro foo\n def bar \n end \n end" - formats "foo(\n 1,\n 2\n) do\n 1\nend" formats "foo(\n 1,\n 2\n) do\n 1\nend" - formats "class Foo # foo\nend" formats "class Foo # foo\nend" - formats "1.==(2) { 3 }" formats "1.==(2) { 3 }" - formats "return *1" formats "return *1" - formats "foo &.responds_to?(:foo)" formats "foo &.responds_to?(:foo)" - formats "foo" formats "foo" - formats "class Foo; 1; end" formats "class Foo; 1; end" - formats " ((1) + 2)" formats " ((1) + 2)" - formats "def foo(\"bar baz\" qux)\nend" formats "def foo(\"bar baz\" qux)\nend" - formats "1..\n2" formats "1..\n2" - formats "with foo yield bar" formats "with foo yield bar" - formats "next( 1 , 2 )" formats "next( 1 , 2 )" - 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 "\n# hello\n\n\n1" formats "\n# hello\n\n\n1" - formats "struct Foo \n\n 1 \n\nend" formats "struct Foo \n\n 1 \n\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 do\n [foo <<-X\n bar\n X\n ]\nend" formats "foo do\n [foo <<-X\n bar\n X\n ]\nend" - formats "->foo=" formats "->foo=" - formats "foo &.>=(2)" formats "foo &.>=(2)" - formats "select\n# when foo\nwhen bar\n break\nend" formats "select\n# when foo\nwhen bar\n break\nend" - formats "[foo <<-X\nbar\nX\n]" formats "[foo <<-X\nbar\nX\n]" - formats "Foo( )" formats "Foo( )" - formats "asm(\"a\" : \"b\"(c)\n)" formats "asm(\"a\" : \"b\"(c)\n)" - formats "def +(x)\nend" formats "def +(x)\nend" - formats "{ \"foo\" => 1 }" formats "{ \"foo\" => 1 }" - formats "1.as Int32" formats "1.as Int32" - formats "def foo : A | B(C)\n nil\nend" formats "def foo : A | B(C)\n nil\nend" - formats "alignof( Int32 )" formats "alignof( Int32 )" - formats "asm(\"a\" :: : : \"volatile\")" formats "asm(\"a\" :: : : \"volatile\")" - formats "foo 1, a: 1,\nb: 2,\nc: 3" formats "foo 1, a: 1,\nb: 2,\nc: 3" - formats "class Foo ( T )\nend" formats "class Foo ( T )\nend" - formats "{1, 2, 3}" formats "{1, 2, 3}" - formats "foo( 1 , 2 )" formats "foo( 1 , 2 )" - formats "asm(\"nop\" : : )" formats "asm(\"nop\" : : )" - formats "case\nend" formats "case\nend" - formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - formats "break 1 , *2" formats "break 1 , *2" - formats "def foo(a : T) forall T\n #\n\nend" formats "def foo(a : T) forall T\n #\n\nend" - formats "def foo(a, **b : Int32)\nend" formats "def foo(a, **b : Int32)\nend" - formats "foo bar # comment\n\n# doc\ndef baz; end" formats "foo bar # comment\n\n# doc\ndef baz; end" + formats "def foo( & )\nend" formats "def foo( & )\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 "case 1 \n when 2 , 3 \n 4 \n end" formats "case 1 \n when 2 , 3 \n 4 \n end" + formats "\"\#{\n foo = 1\n}\"" formats "\"\#{\n foo = 1\n}\"" + 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 +\n # foo\n 2" formats "1 +\n # foo\n 2" + formats ":\"foo bar\"" formats ":\"foo bar\"" + formats "if 1\n1\n\n# foo\nend" formats "if 1\n1\n\n# foo\nend" + formats "->{}" formats "->{}" + formats "[/ /, / /]" formats "[/ /, / /]" + formats "lib Foo\n $foo = hello : Int32 \nend" formats "lib Foo\n $foo = hello : Int32 \nend" + formats "a = 1 if 1 == 2 ||\n 3 == 4\n" formats "a = 1 if 1 == 2 ||\n 3 == 4\n" + formats "a = %w(\n one two\n three four\n)" formats "a = %w(\n one two\n three four\n)" + 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 : self?" formats "foo : self?" + formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" + formats "<<-FOO\nfoo\nFOO" formats "<<-FOO\nfoo\nFOO" formats "break *1 ,2" formats "break *1 ,2" - formats "foo.bar. as? Int32" formats "foo.bar. as? Int32" - formats "foo.[1, 2] = 3" formats "foo.[1, 2] = 3" - 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 ,\n\n 3 => 4 }" formats "{ 1 => 2 ,\n\n 3 => 4 }" - formats "unless a\nunless b\nelse\n4\nend\nend" formats "unless a\nunless b\nelse\n4\nend\nend" - formats "{\n a: 1,\n foo: bar,\n}" formats "{\n a: 1,\n foo: bar,\n}" - formats "yield 1 , 2" formats "yield 1 , 2" - formats "::Foo:: Bar" formats "::Foo:: Bar" + formats "def foo(\n foo,\n @[MyAnn] &block\n); end" formats "def foo(\n foo,\n @[MyAnn] &block\n); end" + formats "{/ / => / /, / / => / /}" formats "{/ / => / /, / / => / /}" formats "1 ||\n # foo\n 2" formats "1 ||\n # foo\n 2" - formats "macro foo\n {%1 + 2%}\\\nend" formats "macro foo\n {%1 + 2%}\\\nend" - formats "select \n when foo ; 2 \n end" formats "select \n when foo ; 2 \n end" - formats "1 # foo" formats "1 # foo" - formats "~ 1" formats "~ 1" + 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 "{ {1, 2, 3} }" formats "{ {1, 2, 3} }" + formats "a = 1;;; b = 2" formats "a = 1;;; b = 2" + formats "\"\#{\n foo = 1}\"" formats "\"\#{\n foo = 1}\"" + 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 "enum Foo\nend" formats "enum Foo\nend" + formats "Set{ # foo\n 1,\n}" formats "Set{ # foo\n 1,\n}" + formats "1 && 2" formats "1 && 2" + formats "yield(1 , \n2)" formats "yield(1 , \n2)" + formats "{} of A => B\n{} of Foo => Bar" formats "{} of A => B\n{} of Foo => Bar" + formats "x : Int32[ 8 ]" formats "x : Int32[ 8 ]" + formats "a = 1\ndef bar\nend" formats "a = 1\ndef bar\nend" + formats "{ } of A => B" formats "{ } of A => B" + formats "yield 1 , \n2" formats "yield 1 , \n2" + 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 "->( x : Int32 , y ) { x }" formats "->( x : Int32 , y ) { x }" + formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" + formats "{ {foo: 2} }" formats "{ {foo: 2} }" + formats "-> : {Int32} { String }" formats "-> : {Int32} { String }" + formats "case 1\nelse # foo\n # bar\nend" formats "case 1\nelse # foo\n # bar\nend" + formats "asm(\n\"nop\"\n)" formats "asm(\n\"nop\"\n)" + formats "\"hello\"" formats "\"hello\"" + 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 "Foo( A , 1 )" formats "Foo( A , 1 )" formats "->( x , y ) { x }" formats "->( x , y ) { x }" - formats "if 1;\n2;\nelse;\n3;\nend" formats "if 1;\n2;\nelse;\n3;\nend" - formats "FOO = 2\nA = 1" formats "FOO = 2\nA = 1" - formats "x.is_a? T\n3\n" formats "x.is_a? T\n3\n" - formats "foo.bar.baz\n.qux" formats "foo.bar.baz\n.qux" - 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 "x : (A -> B)?" formats "x : (A -> B)?" - formats "if 1\n ((1) + 2)\nend" formats "if 1\n ((1) + 2)\nend" - formats "foo ( )" formats "foo ( )" - formats "[] of Foo" formats "[] of Foo" - formats "->(x : Int32) {}" formats "->(x : Int32) {}" - formats "lib Foo\nfun foo\nend" formats "lib Foo\nfun foo\nend" - formats "next( 1 )" formats "next( 1 )" - formats "あ.い, う.え.お = 1, 2" formats "あ.い, う.え.お = 1, 2" - 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 "-> :: Foo . foo?" formats "-> :: Foo . foo?" - formats "{ # foo\n 1,\n}" formats "{ # foo\n 1,\n}" - formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" - formats "unless a\n2\n3\nend" formats "unless a\n2\n3\nend" - formats "foo . responds_to? :bar" formats "foo . responds_to? :bar" - formats "a &.!.!" formats "a &.!.!" - formats "def foo()\n1\nend" formats "def foo()\n1\nend" - formats "def %(x)\n 1\nend" formats "def %(x)\n 1\nend" - formats "foo = 1\n->foo.foo" formats "foo = 1\n->foo.foo" - formats ":+" formats ":+" - formats "10//a" formats "10//a" - formats "def foo( & block )\nend" formats "def foo( & block )\nend" - formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" - formats "%r(foo \#{ bar })" formats "%r(foo \#{ bar })" - formats "a.!" formats "a.!" - formats "def foo(a, &@b)\nend" formats "def foo(a, &@b)\nend" - formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" - formats "foo.[] = 1" formats "foo.[] = 1" - formats "def foo(@[MyAnn] v); end" formats "def foo(@[MyAnn] v); end" - formats "args.any? &.name.baz" formats "args.any? &.name.baz" - formats "lib Foo::Bar\nend" formats "lib Foo::Bar\nend" - formats "alias Foo=Bar" formats "alias Foo=Bar" - formats "SomeLib.UppercasedFunCall" formats "SomeLib.UppercasedFunCall" - formats "def foo(\n a,\n b,\n)\nend" formats "def foo(\n a,\n b,\n)\nend" - 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 "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" - formats "-> :: Foo . foo" formats "-> :: Foo . foo" - formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" - formats "instance_sizeof( Int32 )" formats "instance_sizeof( Int32 )" - formats " <<-EOF\n 1\n EOF" formats " <<-EOF\n 1\n EOF" - formats "-> : {x: Int32, y: String} {}" formats "-> : {x: Int32, y: String} {}" - formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" + formats "begin\n #hola\n 1\nend\n" formats "begin\n #hola\n 1\nend\n" + formats "a = while 1\n2\nend" formats "a = while 1\n2\nend" + formats "case 1\nelse\n 2\nend" formats "case 1\nelse\n 2\nend" + 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 "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 "while 1 # foo\nend" formats "while 1 # foo\nend" + formats "if 1 &&\n2 &&\n3\n4\nend" formats "if 1 &&\n2 &&\n3\n4\nend" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" - formats "alias A = (B)" formats "alias A = (B)" - formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" - formats "X(typeof(begin\n e.is_a?(Y)\nend))" formats "X(typeof(begin\n e.is_a?(Y)\nend))" - formats "->( ){ x }" formats "->( ){ x }" - formats "lib Foo\n fun foo =\n bar : Void\nend" formats "lib Foo\n fun foo =\n bar : Void\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 "if a\n2\n3\nelse\n4\n5\nend" formats "if a\n2\n3\nelse\n4\n5\nend" + formats "def foo(a,\n **b)\nend" formats "def foo(a,\n **b)\nend" + formats "a, b = \nif 1\n2\nend" formats "a, b = \nif 1\n2\nend" + formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" + formats "def foo : A | B(C)\n nil\nend" formats "def foo : A | B(C)\n nil\nend" + formats "def foo(\n a,\n b\n)\nend" formats "def foo(\n a,\n b\n)\nend" + formats "alias X = (A, B) ->\nbar : C" formats "alias X = (A, B) ->\nbar : C" + formats "Foo" formats "Foo" + formats "unless a\n2\nend" formats "unless a\n2\nend" + formats "foo.as? ( Int32* )" formats "foo.as? ( Int32* )" + formats "foo 1" formats "foo 1" + formats "foo( )" formats "foo( )" + formats "if 1\n2\n3\n# foo\nend" formats "if 1\n2\n3\n# foo\nend" + formats "class Actor\n macro inherited\nend\nend\n" formats "class Actor\n macro inherited\nend\nend\n" + formats "struct Foo(T)\n# bar\n1\nend" formats "struct Foo(T)\n# bar\n1\nend" + formats "<<-HTML\n hello \n world \n HTML" formats "<<-HTML\n hello \n world \n HTML" + formats "module M\n @[MyAnn(\n 1\n\n )]\nend" formats "module M\n @[MyAnn(\n 1\n\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 "a = 1\n;\nb = 2" formats "a = 1\n;\nb = 2" + formats "begin\n 1\nend\n\n1\n" formats "begin\n 1\nend\n\n1\n" + formats "unless a\n2\n3\nelse\n4\n5\nend" formats "unless a\n2\n3\nelse\n4\n5\nend" + formats "def foo(\n **a # comment\n)\n 1\nend" formats "def foo(\n **a # comment\n)\n 1\nend" + formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" formats "lib Foo\nfun foo(x : Int32, y : Float64) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, y : Float64) : Int32\nend" - formats "begin\n / /\nend" formats "begin\n / /\nend" - formats "instance_alignof( Int32 )" formats "instance_alignof( Int32 )" - formats "x 1, \\\n 2" formats "x 1, \\\n 2" - formats "foo([\n 1,\n 2,\n 3,\n])" formats "foo([\n 1,\n 2,\n 3,\n])" - formats "a = b = 1\na, b =\n b, a" formats "a = b = 1\na, b =\n b, a" + formats "with foo yield bar" formats "with foo yield bar" + formats "def foo( & block )\nend" formats "def foo( & block )\nend" + formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" + formats "{% foo <<-X\nbar\nX\n%}" formats "{% foo <<-X\nbar\nX\n%}" + formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" + formats "1.[]=() { 3 }" formats "1.[]=() { 3 }" + formats "def foo( x , & block : Int32->Float64)\nend" formats "def foo( x , & block : Int32->Float64)\nend" + formats "{ {% begin %}1{% end %}, nil }" formats "{ {% begin %}1{% end %}, nil }" + formats "def foo(a : T) forall T\n #\n\n\nend" formats "def foo(a : T) forall T\n #\n\n\nend" + formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" + formats "yield 1" formats "yield 1" + 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(\n foo,\n\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n\n @[MyAnn]\n &block\n); end" + formats "return 1, {2, 3}" formats "return 1, {2, 3}" + formats "a = foo(bar(baz3 do\nend))" formats "a = foo(bar(baz3 do\nend))" + formats "join io, &.inspect" formats "join io, &.inspect" + formats "{ {1}.foo, 2 }" formats "{ {1}.foo, 2 }" + formats "foo.bar = \n1" formats "foo.bar = \n1" + formats "if a\n # hello\n 2\nend" formats "if a\n # hello\n 2\nend" formats "coco.lala\nfoo\n .bar" formats "coco.lala\nfoo\n .bar" - formats "{{ foo <<-X\nbar\nX\n}}" formats "{{ foo <<-X\nbar\nX\n}}" + 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 "class Foo \n\n 1 \n\nend" formats "class Foo \n\n 1 \n\nend" + formats "lib Foo\n fun bar = Bar\nend" formats "lib Foo\n fun bar = Bar\nend" + formats "::foo(1, 2)" formats "::foo(1, 2)" + formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" + formats "foo.[1]" formats "foo.[1]" + formats "next 1 , *2" formats "next 1 , *2" + formats "foo(\"bar\": 1, \"baz qux\": 2)" formats "foo(\"bar\": 1, \"baz qux\": 2)" + formats "if a\n2\nelse\n3\nend" formats "if a\n2\nelse\n3\nend" + formats "a+1" formats "a+1" + formats "lib Foo\nfun foo () : Int32\nend" formats "lib Foo\nfun foo () : Int32\nend" + formats "__DIR__" formats "__DIR__" + formats "foo = 1\n->foo.foo" formats "foo = 1\n->foo.foo" + formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" + formats "foo do | x | \n x \n end" formats "foo do | x | \n x \n end" + 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 "foo { | ( a, *b , c ) | a }" formats "foo { | ( a, *b , c ) | a }" + formats "foo[] =1" formats "foo[] =1" + formats "begin\n1\nrescue ex : Int32 \n3\nend" formats "begin\n1\nrescue ex : Int32 \n3\nend" + formats "foo(\n 1, 2,\n&block)" formats "foo(\n 1, 2,\n&block)" + formats "1.<= do\nend" formats "1.<= do\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\n foo = 1\n}\"" formats "\"\#{ # foo\n foo = 1\n}\"" + formats "a &.!" formats "a &.!" + formats "{\n1 => 2 ,\n 3 => 4 }" formats "{\n1 => 2 ,\n 3 => 4 }" + formats "1 + # foo\n2" formats "1 + # foo\n2" + formats "case\n# hello\nwhen 1\n 2\nend" formats "case\n# hello\nwhen 1\n 2\nend" + formats "def foo\n@x : Int32\nend" formats "def foo\n@x : Int32\nend" + formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" + formats "-> :: Foo . foo?" formats "-> :: Foo . foo?" + formats "\"\\a\\c\\b\\d\"" formats "\"\\a\\c\\b\\d\"" + formats "foo : Foo * * * * *" formats "foo : 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 @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" + formats "x : Int32" formats "x : Int32" + formats "{ 1 => 2 ,\n\n 3 => 4 }" formats "{ 1 => 2 ,\n\n 3 => 4 }" + formats "a.!" formats "a.!" + formats "def foo\nend\ndef bar\nend" formats "def foo\nend\ndef bar\nend" + formats "foo\n .bar\n .baz(\n 1\n )" formats "foo\n .bar\n .baz(\n 1\n )" + formats "-> :: Foo . foo!" formats "-> :: Foo . foo!" + formats ":&*" formats ":&*" + formats "-> : Int32 { }" formats "-> : Int32 { }" + formats "case / /\nwhen /x/, / /\n / /\nend" formats "case / /\nwhen /x/, / /\n / /\nend" + formats "def foo(\n a,\n b,\n)\nend" formats "def foo(\n a,\n b,\n)\nend" + formats "foo(/ /)" formats "foo(/ /)" + formats "require \"foo\"" formats "require \"foo\"" + formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" + formats "-> : Array(Int32) {}" formats "-> : Array(Int32) {}" formats "foo &.@bar" formats "foo &.@bar" + formats "$? = 1" formats "$? = 1" + formats "as? Foo" formats "as? Foo" + formats "def foo(x, *, y, **z)\nend" formats "def foo(x, *, y, **z)\nend" + formats "foo 1,\na: 1,\nb: 2,\nc: 3" formats "foo 1,\na: 1,\nb: 2,\nc: 3" + formats "\n\n1" formats "\n\n1" + formats "a(&.b.c.as(C))" formats "a(&.b.c.as(C))" + formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" + formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" + formats "{1 => 2,\n 3 => 4, # lala\n}\n" formats "{1 => 2,\n 3 => 4, # lala\n}\n" + formats "def foo( x , & block : ->)\nend" formats "def foo( x , & block : ->)\nend" + formats "foo[&.bar]" formats "foo[&.bar]" + formats "foo( 1 , 2 )" formats "foo( 1 , 2 )" + formats "foo 1, # comment\n # bar\n do\n end" formats "foo 1, # comment\n # bar\n do\n end" + formats "foo &.bar.as(T)" formats "foo &.bar.as(T)" + formats "[] of (((Array(T))))" formats "[] of (((Array(T))))" + formats "-> : Int32[1] {}" formats "-> : Int32[1] {}" + formats "$?.bar" formats "$?.bar" + formats "next { 1 , 2 }" formats "next { 1 , 2 }" + formats "foo.bar / 2\n" formats "foo.bar / 2\n" + formats "[] of Int32\n1" formats "[] of Int32\n1" + formats "yield (1).foo" formats "yield (1).foo" + formats "->() do x end" formats "->() do x end" + formats "foo 1, # comment\n do\n end" formats "foo 1, # comment\n do\n end" + formats "1.as Int32" formats "1.as Int32" + formats "[ * [ * [ 1 ] ], * \n[ 2] ]" formats "[ * [ * [ 1 ] ], * \n[ 2] ]" + formats "[1, 2, 3]" formats "[1, 2, 3]" + formats "foo &.nil?()" formats "foo &.nil?()" formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" - formats "foo.[]" formats "foo.[]" - formats "yield *1" formats "yield *1" - formats ":&**" formats ":&**" - formats "def foo ( x , y ,\n) \n end" formats "def foo ( x , y ,\n) \n end" - formats "yield(1 , \n2)" formats "yield(1 , \n2)" - formats "$0.bar" formats "$0.bar" - formats "1 \\\nif 2" formats "1 \\\nif 2" - formats "foo : (F(A)) | D" formats "foo : (F(A)) | D" - formats "x : (A -> )" formats "x : (A -> )" + formats "macro foo(\n a,\n **b,\n)\nend" formats "macro foo(\n a,\n **b,\n)\nend" + formats "run(\"a\", 1)" formats "run(\"a\", 1)" + formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" + formats "foo = 1\n->foo.foo?" formats "foo = 1\n->foo.foo?" + formats "alias A = (B(C, (C | D)) | E)" formats "alias A = (B(C, (C | D)) | E)" + formats "def foo(**b, # comment\n &block)\nend" formats "def foo(**b, # comment\n &block)\nend" + formats "case 1 \n when 2 \n 3 \n end" formats "case 1 \n when 2 \n 3 \n end" + formats "alias A = (B)" formats "alias A = (B)" formats "private FOO = 2\nprivate A = 1" formats "private FOO = 2\nprivate A = 1" - formats "begin 0[1] rescue 2 end" formats "begin 0[1] rescue 2 end" - formats "asm(\n\"nop\"\n)" formats "asm(\n\"nop\"\n)" - formats "if 1;\n2;\nelsif 3;\n4;\nend" formats "if 1;\n2;\nelsif 3;\n4;\nend" - formats "while 1\n# nothing\nend" formats "while 1\n# nothing\nend" - formats "foo(bar([\n 1,\n]))" formats "foo(bar([\n 1,\n]))" - formats "case 1 \n when 2 ;\n 3 \n end" formats "case 1 \n when 2 ;\n 3 \n end" - formats "1.<=() { 3 }" formats "1.<=() { 3 }" - formats "next {1, 2}, 3" formats "next {1, 2}, 3" - formats "foo.bar=(2)\n1" formats "foo.bar=(2)\n1" - formats "class Foo\n# nothing\nend" formats "class Foo\n# nothing\nend" - 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 "begin; 1; end" formats "begin; 1; end" - formats "foo : (String -> String?) | (String)" formats "foo : (String -> String?) | (String)" - formats "while 1 # foo\n # bar\n 2\nend" formats "while 1 # foo\n # bar\n 2\nend" - formats "Foo( A , 1 )" formats "Foo( A , 1 )" - 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 + 2" formats "1 + 2" - formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" + formats "->@@foo.foo!" formats "->@@foo.foo!" + formats "asm(\"a\" :::: \"volatile\"\n)" formats "asm(\"a\" :::: \"volatile\"\n)" + formats "1\n# hello\n\n\n" formats "1\n# hello\n\n\n" + formats "x[ y ] += 1" formats "x[ y ] += 1" + formats "def foo ( bar @select) \n end" formats "def foo ( bar @select) \n end" + formats "class X; annotation FooAnnotation ; end ; end" formats "class X; annotation FooAnnotation ; end ; end" + formats "-> :: Foo . foo" formats "-> :: Foo . foo" + formats "foo.[ 1, 2 ]?" formats "foo.[ 1, 2 ]?" formats "if a\n b &c\nend" formats "if a\n b &c\nend" - formats "foo[&.bar] ||= 1" formats "foo[&.bar] ||= 1" - formats "\"\\a\\c\#{foo}\\b\\d\"" formats "\"\\a\\c\#{foo}\\b\\d\"" - formats " {%\na = 1\n %}" formats " {%\na = 1\n %}" - formats "foo.[ 1 , 2 ]" formats "foo.[ 1 , 2 ]" - 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(\"bar\": 1, \"baz qux\": 2)" formats "foo(\"bar\": 1, \"baz qux\": 2)" - formats "Foo::Bar?" formats "Foo::Bar?" - formats "private def foo\nend\nprivate def bar\nend" formats "private def foo\nend\nprivate def bar\nend" - formats "if 1\n2 # foo\nend" formats "if 1\n2 # foo\nend" - formats "foo = 1\n->foo.bar=(Int32)" formats "foo = 1\n->foo.bar=(Int32)" - formats "[] of Int32\n1" formats "[] of Int32\n1" - formats "foo(\n 1, 2)" formats "foo(\n 1, 2)" - formats "<<-HTML\n hello \n world \n HTML" formats "<<-HTML\n hello \n world \n HTML" - formats " 1" formats " 1" - 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 "foo(\n# x\n1,\n\n# y\nz: 2\n)" formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" - formats "foo(1 &- 2)" formats "foo(1 &- 2)" - 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 "foo &.==(2)" formats "foo &.==(2)" - formats "def foo(a,\n &block)\nend" formats "def foo(a,\n &block)\nend" - formats "1 == / /" formats "1 == / /" - formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" - formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" - formats "a[1] , b[2] = 1 , 2" formats "a[1] , b[2] = 1 , 2" - formats "foo[&.bar] = 1" formats "foo[&.bar] = 1" - 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 "def foo(\n foo,\n @[MyAnn] &block\n); end" formats "def foo(\n foo,\n @[MyAnn] &block\n); end" - formats "foo &.nil?()" formats "foo &.nil?()" - formats "def foo( x , & block )\nend" formats "def foo( x , & block )\nend" - formats "foo(\n 1,\n # 2,\n 3,\n)" formats "foo(\n 1,\n # 2,\n 3,\n)" - formats "a=1" formats "a=1" - formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" + formats "1 ;\n 2" formats "1 ;\n 2" + formats "{%\n if 1\n 2\n end\n%}" formats "{%\n if 1\n 2\n end\n%}" + formats "unless a\nunless b\n3\nelse\n4\nend\nend" formats "unless a\nunless b\n3\nelse\n4\nend\nend" + 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 "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" + formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" + formats "case 1 \n when 2 ; 3 \n end" formats "case 1 \n when 2 ; 3 \n end" + formats "<<-HTML\n \#{1}x\n y\n HTML" formats "<<-HTML\n \#{1}x\n y\n HTML" + formats "foo(&.@bar)" formats "foo(&.@bar)" + formats "def foo( x , & block : Int32 ->)\nend" formats "def foo( x , & block : Int32 ->)\nend" + formats "[\n 1, # foo\n 3,\n]" formats "[\n 1, # foo\n 3,\n]" + formats "{ {1 => 2} }" formats "{ {1 => 2} }" + formats "foo x: 1" formats "foo x: 1" + formats "Foo( x: Int32 , y: Float64 )" formats "Foo( x: Int32 , y: Float64 )" + formats "foo . responds_to? :bar" formats "foo . responds_to? :bar" + formats "x : (A -> )" formats "x : (A -> )" + formats "1 unless 2" formats "1 unless 2" + 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 "FOO = 2\nA = 1" formats "FOO = 2\nA = 1" + formats "foo do;\n1; end" formats "foo do;\n1; end" + formats "foo &.as(T).bar" formats "foo &.as(T).bar" + formats "1.== { 3 }" formats "1.== { 3 }" + formats "unless a\nelse\n2\nend" formats "unless a\nelse\n2\nend" + formats "a &.a.!" formats "a &.a.!" + formats "@x[ 1 ] &&= 2" formats "@x[ 1 ] &&= 2" + formats "\n# hello\n\n\n1" formats "\n# hello\n\n\n1" + formats "1\n..\n2" formats "1\n..\n2" + formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" + 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 "1 rescue 2" formats "1 rescue 2" + formats "->(x : Int32) {}" formats "->(x : Int32) {}" formats "def foo ( x , y , ) \n end" formats "def foo ( x , y , ) \n end" - formats "foo a , **b" formats "foo a , **b" - 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 "next( *1 , *2 )" formats "next( *1 , *2 )" + formats "yield( *1 , *2 )" formats "yield( *1 , *2 )" + formats "\"foo \#{bar}\" \\\n \"baz\"" formats "\"foo \#{bar}\" \\\n \"baz\"" + formats "[\n1,\n\n2]" formats "[\n1,\n\n2]" + formats "SomeLib.UppercasedFunCall" formats "SomeLib.UppercasedFunCall" + 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 "[\n a(), # b\n]" formats "[\n a(), # b\n]" + formats "{\n <<-KEY => 1,\n key\n KEY\n}" formats "{\n <<-KEY => 1,\n key\n KEY\n}" + formats "foo.bar(&.%(baz))" formats "foo.bar(&.%(baz))" + formats "def foo(x @@y)\nend" formats "def foo(x @@y)\nend" + formats "case 1\nwhen a; 2\nelse; b\nend" formats "case 1\nwhen a; 2\nelse; b\nend" + formats "x: Int32" formats "x: Int32" + formats "def foo(a : T) forall T\n #\n\nend" formats "def foo(a : T) forall T\n #\n\nend" + formats "case 1 \n when .foo? \n 3 \n end" formats "case 1 \n when .foo? \n 3 \n end" + formats "$?" formats "$?" + formats "module Foo;end" formats "module Foo;end" + formats "break *1 , *2" formats "break *1 , *2" + formats "1\n2\n# foo" formats "1\n2\n# foo" + formats "foo(1,\n2,\n)" formats "foo(1,\n2,\n)" + formats "responds_to? :foo" formats "responds_to? :foo" + formats "<<-FOO\nbarfoobar\nFOO" formats "<<-FOO\nbarfoobar\nFOO" + formats "def foo(@[MyAnn] &block); end" formats "def foo(@[MyAnn] &block); end" + formats "@[Foo]\ndef foo\nend" formats "@[Foo]\ndef foo\nend" + formats "true" formats "true" + formats "unless a\n2; 3\nelse\n3\nend" formats "unless a\n2; 3\nelse\n3\nend" + formats "[\n # foo\n] of String" formats "[\n # foo\n] of String" + formats "begin\n1\nrescue Int32 \n3\nend" formats "begin\n1\nrescue Int32 \n3\nend" + formats "foo.bar(1) # comment\n .baz" formats "foo.bar(1) # comment\n .baz" + formats "while / /\nend" formats "while / /\nend" + formats "->do\nend" formats "->do\nend" + formats "nil" formats "nil" formats ":^" formats ":^" - formats "foo.as ( Int32* )" formats "foo.as ( Int32* )" - formats "begin\n1\nrescue\n3\nensure\n2\nend" formats "begin\n1\nrescue\n3\nensure\n2\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 "def a\n [\n 1, # x\n # y\n ]\nend" formats "def a\n [\n 1, # x\n # y\n ]\nend" + formats "(())" formats "(())" + formats "case / /\nwhen / /, /x/\n / /\nend" formats "case / /\nwhen / /, /x/\n / /\nend" + formats "%i(one two three)" formats "%i(one two three)" + formats "a[b] ||= c" formats "a[b] ||= c" + 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 "enum Foo\n A; B; C\nend\n" formats "enum Foo\n A; B; C\nend\n" + formats "1_234" formats "1_234" + formats "case 1\nwhen 2\n#comment\nend" formats "case 1\nwhen 2\n#comment\nend" + formats "String???" formats "String???" + 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 "$1.bar" formats "$1.bar" + formats "alias Foo::Bar=Baz" formats "alias Foo::Bar=Baz" + formats "alignof( Int32 )" formats "alignof( Int32 )" + formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" + formats "case 1\nwhen 2\n\n#comment\nend" formats "case 1\nwhen 2\n\n#comment\nend" + formats "-> :: foo!" formats "-> :: foo!" + formats "::Tuple()" formats "::Tuple()" + 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 "1+2*3" formats "1+2*3" + formats "\"\#{\"foo\"}\"" formats "\"\#{\"foo\"}\"" + formats "foo\n \nbar" formats "foo\n \nbar" + formats "1 + \\\n2\n3" formats "1 + \\\n2\n3" + formats "def foo(\"bar baz\" qux)\nend" formats "def foo(\"bar baz\" qux)\nend" + formats "def foo(\n **a\n)\n 1\nend" formats "def foo(\n **a\n)\n 1\nend" + 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 1,\n)]" formats "@[Foo(\n 1,\n)]" + formats "enum Foo;end" formats "enum Foo;end" + formats "/foo/imx" formats "/foo/imx" + formats "foo . bar()" formats "foo . bar()" + 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 "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 " 1" formats " 1" + formats "macro foo\n 1 + 2\nend" formats "macro foo\n 1 + 2\nend" + formats "macro foo\n %foo{x.id+2}\nend" formats "macro foo\n %foo{x.id+2}\nend" + formats "foo . responds_to?( :bar )" formats "foo . responds_to?( :bar )" + formats "macro foo # bar\n baz\nend" formats "macro foo # bar\n baz\nend" + formats "# foo\na = 1 # bar" formats "# foo\na = 1 # bar" + formats "\" \" * 2" formats "\" \" * 2" + formats "#######" formats "#######" + formats "Foo:: Bar" formats "Foo:: Bar" + formats "foo([\n 1,\n 2,\n 3,\n])" formats "foo([\n 1,\n 2,\n 3,\n])" + formats "[\n1, # a\n2, # b\n 3 # c\n]" formats "[\n1, # a\n2, # b\n 3 # c\n]" + formats "->foo!" formats "->foo!" + formats "def foo(x : (A | B)) \n end" formats "def foo(x : (A | B)) \n end" + formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" + formats "x = 1\nx += 1" formats "x = 1\nx += 1" + formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" + formats "@[ Foo ]\ndef foo\nend" formats "@[ Foo ]\ndef foo\nend" + formats "%(hello)" formats "%(hello)" + formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" + formats "begin\n array[\n 0 # Zero\n ]\nend" formats "begin\n array[\n 0 # Zero\n ]\nend" + formats "def foo\n@x = uninitialized Int32\nend" formats "def foo\n@x = uninitialized Int32\nend" + formats "foo 1, a: 1,\nb: 2,\nc: 3" formats "foo 1, a: 1,\nb: 2,\nc: 3" + formats "alias Foo =Bar" formats "alias Foo =Bar" + formats "foo &.[]=(1, 2)" formats "foo &.[]=(1, 2)" + formats "def foo(x : ( A | B )) : ( A | B )\nend" formats "def foo(x : ( A | B )) : ( A | B )\nend" + formats "alias Foo=\nBar" formats "alias Foo=\nBar" + formats "'a'" formats "'a'" + formats "lib Foo::Bar\nend" formats "lib Foo::Bar\nend" + 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 "if 1\n# nothing\nend" formats "if 1\n# nothing\nend" + formats "<<-FOO\nfoo\n1\nFOO" formats "<<-FOO\nfoo\n1\nFOO" + formats "def %(x)\n 1\nend" formats "def %(x)\n 1\nend" + formats "foo a , b , x: 1" formats "foo a , b , x: 1" + formats "foo(1, 2,\n)" formats "foo(1, 2,\n)" + formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" + formats "def foo( @[MyAnn] v ); end" formats "def foo( @[MyAnn] v ); end" + formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" + formats "yield *1 ,2" formats "yield *1 ,2" + formats "Foo( * T, { * A ,*\n B } )" formats "Foo( * T, { * A ,*\n B } )" + formats "asm(\n# foo\n\"nop\"\n# bar\n)" formats "asm(\n# foo\n\"nop\"\n# bar\n)" + formats "{1 => foo <<-X\nbar\nX\n}" formats "{1 => foo <<-X\nbar\nX\n}" + formats "while 1 # foo\n # bar\n 2\nend" formats "while 1 # foo\n # bar\n 2\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 "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" + 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 "{ * 1 * 2,\n*\n3, 4 }" formats "{ * 1 * 2,\n*\n3, 4 }" + formats "unless a\n2\nelse\nend" formats "unless a\n2\nelse\nend" + formats "unless a\n # hello\n 2\nend" formats "unless a\n # hello\n 2\nend" + 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.bar(&.baz)" formats "foo.bar(&.baz)" + formats " <<-HTML\n \#{1} \#{2}\n HTML" formats " <<-HTML\n \#{1} \#{2}\n HTML" + formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" + formats "-> :: foo?" formats "-> :: foo?" + formats "<<-HTML\n \#{\"foo\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n HTML" + formats "def foo\nend\n\ndef bar\nend\n\n# foo" formats "def foo\nend\n\ndef bar\nend\n\n# foo" + formats " <<-EOF\n 1\n 2\n EOF" formats " <<-EOF\n 1\n 2\n EOF" + formats "def foo ( @x) \n end" formats "def foo ( @x) \n end" + formats "(\n a = 1\n a\n)" formats "(\n a = 1\n a\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 "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 "->\n:\nInt32\n{\n}" formats "->\n:\nInt32\n{\n}" - formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" - formats "def foo : self | Nil\n nil\nend" formats "def foo : self | Nil\n nil\nend" - formats "return {1, 2}, {3, 4}" formats "return {1, 2}, {3, 4}" - formats "-> :: foo=" formats "-> :: foo=" - 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 "next { 1 , 2 }" formats "next { 1 , 2 }" + formats "ary.size = (1).to_i" formats "ary.size = (1).to_i" + formats "false" formats "false" + formats "1.!=(2) { 3 }" formats "1.!=(2) { 3 }" + formats ":>>" formats ":>>" + 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 "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" + formats " {%\na = 1\n %}" formats " {%\na = 1\n %}" + formats "1.!= { 3 }" formats "1.!= { 3 }" + formats "x 1, \\\n 2" formats "x 1, \\\n 2" + formats "asm(\"nop\" ::: \"eax\" )" formats "asm(\"nop\" ::: \"eax\" )" + formats "alias A = ( A | B )" formats "alias A = ( A | B )" + formats "foo &.bar do\n 1 + 2\nend" formats "foo &.bar do\n 1 + 2\nend" + formats "def foo(\nx, #foo\nz #bar\n)\nend" formats "def foo(\nx, #foo\nz #bar\n)\nend" + formats "foo.bar\n .baz(\n 1\n )" formats "foo.bar\n .baz(\n 1\n )" formats "->(){}" formats "->(){}" - formats "def a\n {\n 1, # x\n # y\n }\nend" formats "def a\n {\n 1, # x\n # y\n }\nend" - formats "Foo" formats "Foo" - formats "offsetof( String, @length )" formats "offsetof( String, @length )" - formats "x = a do\n 1 ||\n 2\nend" formats "x = a do\n 1 ||\n 2\nend" - formats "->(x : Int32) { }" formats "->(x : Int32) { }" - formats "NamedTuple(\n a: Int32,\n)" formats "NamedTuple(\n a: Int32,\n)" - formats "until 1\n2\nend" formats "until 1\n2\nend" - formats "@[ Foo ]\ndef foo\nend" formats "@[ Foo ]\ndef foo\nend" - formats "-> :: Foo . foo=" formats "-> :: Foo . foo=" - formats "foo &.bar( 1 , 2 )" formats "foo &.bar( 1 , 2 )" - formats "Union(Int32, String)?" formats "Union(Int32, String)?" - formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" - formats "def foo(&block: Int32)\nend" formats "def foo(&block: Int32)\nend" - formats "1.>= { 3 }" formats "1.>= { 3 }" - formats "macro foo\n %foo{x.id+2}\nend" formats "macro foo\n %foo{x.id+2}\nend" formats "foo(\n 1,\n &.foo\n)" formats "foo(\n 1,\n &.foo\n)" - formats "foo[ 1 , 2 ] =3" formats "foo[ 1 , 2 ] =3" - 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 "1\n\n\n2" formats "1\n\n\n2" - formats "foo : (self)?" formats "foo : (self)?" - formats "foo x: 1, y: 2" formats "foo x: 1, y: 2" + 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 "{ 1 => 2 ,\n 3 => 4 }" formats "{ 1 => 2 ,\n 3 => 4 }" + formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" + formats "asm(\"nop\" : \"a\"(0) )" formats "asm(\"nop\" : \"a\"(0) )" + formats "def foo\n # Comment\n\n\nend" formats "def foo\n # Comment\n\n\nend" + formats "yield *1" formats "yield *1" + formats "foo[ 1, 2 ]?" formats "foo[ 1, 2 ]?" + formats "def foo # bar\n # baz\nend" formats "def foo # bar\n # baz\nend" + formats "foo[&.bar]?" formats "foo[&.bar]?" + formats "0x1234_u32" formats "0x1234_u32" + formats "select \n when foo then 2 \n end" formats "select \n when foo then 2 \n end" + formats "next { {1, 2}, {3, 4} }, 5" formats "next { {1, 2}, {3, 4} }, 5" + 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 "macro foo\n {{\n1 + 2 }}\nend" formats "macro foo\n {{\n1 + 2 }}\nend" + formats "break { {1, 2}, {3, 4} }" formats "break { {1, 2}, {3, 4} }" + formats "\n # hello\n\n1" formats "\n # hello\n\n1" + formats "1 \\\nrescue 2" formats "1 \\\nrescue 2" + formats "break 1 , *2" formats "break 1 , *2" + formats "->( x )\n:\nInt32 { }" formats "->( x )\n:\nInt32 { }" + 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 "@@a" formats "@@a" + formats "1 * 2" formats "1 * 2" + 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..\n2" formats "1..\n2" + formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" + formats "foo &.==(2)" formats "foo &.==(2)" + formats "1 if 2" formats "1 if 2" + formats "next 1, {2, 3}" formats "next 1, {2, 3}" + formats "foo.\nbar" formats "foo.\nbar" + formats "1.<= { 3 }" formats "1.<= { 3 }" + formats "foo.bar += 2" formats "foo.bar += 2" + formats "1.<=(2) { 3 }" formats "1.<=(2) { 3 }" + formats "yield *1 , *2" formats "yield *1 , *2" + formats "NamedTuple()" formats "NamedTuple()" + formats "1 # foo" formats "1 # foo" + formats "1.[]= { 3 }" formats "1.[]= { 3 }" + formats "def `(x)\n 1\nend" formats "def `(x)\n 1\nend" + formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" + formats "a = \\\n # foo\n bar(1)" formats "a = \\\n # foo\n bar(1)" + formats "asm(\"nop\" : : )" formats "asm(\"nop\" : : )" + formats "foo[x: 1, &.bar]" formats "foo[x: 1, &.bar]" + 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 "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 "Set { 1 , 2 }" formats "Set { 1 , 2 }" + formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" + formats "10 // a" formats "10 // a" + formats " macro foo\n end\n\n :+" formats " macro foo\n end\n\n :+" + 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 "begin\n a\nend.b { }\nc" formats "begin\n a\nend.b { }\nc" + formats "return { 1 , 2 }" formats "return { 1 , 2 }" + formats "foo &.bar.as?(T)" formats "foo &.bar.as?(T)" + formats "a = case 1\nwhen 2\n3\nend" formats "a = case 1\nwhen 2\n3\nend" + formats "foo(1, # foo\n &.bar)" formats "foo(1, # foo\n &.bar)" + formats "def foo(a, **b, # comment\n &block)\nend" formats "def foo(a, **b, # comment\n &block)\nend" + formats "begin\n1\nrescue ex\n3\nend" formats "begin\n1\nrescue ex\n3\nend" + formats "module Foo; 1; end" formats "module Foo; 1; end" + formats "foo (1)" formats "foo (1)" + formats "foo . bar( x , y )" formats "foo . bar( x , y )" + formats "foo.bar\n.baz" formats "foo.bar\n.baz" + formats "return( *1 , *2 )" formats "return( *1 , *2 )" + formats "! 1" formats "! 1" + formats "foo bar:baz, qux:other" formats "foo bar:baz, qux:other" + formats "'\\u{0123}'" formats "'\\u{0123}'" + formats "" formats "" + formats "あ.い = 1" formats "あ.い = 1" + formats "[\n 1, 2, # foo\n 3,\n]" formats "[\n 1, 2, # foo\n 3,\n]" + formats "lib Foo\n $foo : Int32 \nend" formats "lib Foo\n $foo : Int32 \nend" + formats "{ # foo\n 1,\n}" formats "{ # foo\n 1,\n}" 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 "def foo(a : T) forall T \n #\nend" formats "def foo(a : T) forall T \n #\nend" - formats "if 1\nif 2\n3 # foo\nend\nend" formats "if 1\nif 2\n3 # foo\nend\nend" - 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 "foo(1 &+ \n2)" formats "foo(1 &+ \n2)" - formats "unless a\nelse\n2\nend" formats "unless a\nelse\n2\nend" - formats "foo { |x| (x).a }" formats "foo { |x| (x).a }" - formats "{ 1 => 2 }" formats "{ 1 => 2 }" + formats "foo : Foo*****" formats "foo : Foo*****" + 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 "yield" formats "yield" + formats "[\n# foo\n] of String" formats "[\n# foo\n] of String" + formats "foo\n.bar\n.baz" formats "foo\n.bar\n.baz" + formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" + formats "&+ 1" formats "&+ 1" + formats "@[Foo::Bar]" formats "@[Foo::Bar]" + formats "foo ((1) ? 2 : 3)" formats "foo ((1) ? 2 : 3)" + formats "foo.bar. as? Int32" formats "foo.bar. as? Int32" + formats "->: Int32 do\nx\nend" formats "->: Int32 do\nx\nend" + formats "return {1, 2}, {3, 4}" formats "return {1, 2}, {3, 4}" + formats "case nil\nelse nil; nil\n# comment\nend" formats "case nil\nelse nil; nil\n# comment\nend" + formats "if 1\n foo(\n bar,\n # comment\n )\nend" formats "if 1\n foo(\n bar,\n # comment\n )\nend" + formats "if 1\n2 # foo\nend" formats "if 1\n2 # foo\nend" + formats "1 == / /" formats "1 == / /" + formats "foo\n .foo1(bar\n .bar1\n .bar2)" formats "foo\n .foo1(bar\n .bar1\n .bar2)" + formats "break( 1 )" formats "break( 1 )" + formats "foo do | x , y | \n x \n end" formats "foo do | x , y | \n x \n end" + formats "def foo(\n &block\n)\nend" formats "def foo(\n &block\n)\nend" + 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 "struct Foo \n\n 1 \n\nend" formats "struct Foo \n\n 1 \n\nend" + formats "1 # foo\n1234 # bar\n\n10 # bar" formats "1 # foo\n1234 # bar\n\n10 # bar" + formats "->@foo.foo=" formats "->@foo.foo=" + formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" + formats " <<-EOF\n 1\nEOF" formats " <<-EOF\n 1\nEOF" + 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/2" formats "1/2" + formats "foo : (String -> String?) | (String)" formats "foo : (String -> String?) | (String)" + formats "\"foo\" \\\n \"bar\"" formats "\"foo\" \\\n \"bar\"" + formats "foo.bar. as Int32" formats "foo.bar. as Int32" + formats "if 0\n1 &&\n2 &&\n3\nend" formats "if 0\n1 &&\n2 &&\n3\nend" + formats "foo(out x)" formats "foo(out x)" + formats "select \n when foo ; 2 \n end" formats "select \n when foo ; 2 \n end" + formats "1.<=() { 3 }" formats "1.<=() { 3 }" + formats " * a = 1 " formats " * a = 1 " + formats "\n# hello\n\n1" formats "\n# hello\n\n1" + 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 "/ /" formats "/ /" + formats "begin\n 1\n # Comment\n\n\nend" formats "begin\n 1\n # Comment\n\n\nend" + formats "def foo(x)\n self // x\nend" formats "def foo(x)\n self // x\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 "def func # comment\n (1 + 2) / 3\nend" formats "def func # comment\n (1 + 2) / 3\nend" + formats "getter foo # comment\n\ndef foo\nend" formats "getter foo # comment\n\ndef foo\nend" + formats "{ \"foo\": 1 }" formats "{ \"foo\": 1 }" + formats "Tuple()" formats "Tuple()" + formats "[foo <<-X\nbar\nX\n]" formats "[foo <<-X\nbar\nX\n]" + formats "struct Foo\n # bar\n # baz\n1\nend" formats "struct Foo\n # bar\n # baz\n1\nend" + formats "{ {1, 2, 3} => 4 }" formats "{ {1, 2, 3} => 4 }" + formats "1 ?\n 2 : \n 3" formats "1 ?\n 2 : \n 3" + formats "{ %() }" formats "{ %() }" + formats "::Tuple(T)" formats "::Tuple(T)" + formats "def foo(@x)\n\nrescue\nend" formats "def foo(@x)\n\nrescue\nend" + formats "return *1 ,2" formats "return *1 ,2" + formats "a = \"\n\"\n1 # 1\n12 # 2\n" formats "a = \"\n\"\n1 # 1\n12 # 2\n" + formats "foo &bar" formats "foo &bar" + formats "def foo ( bar @@select) \n end" formats "def foo ( bar @@select) \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 "foo[1, &.bar]?" formats "foo[1, &.bar]?" + formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" + formats "return( 1 )" formats "return( 1 )" + formats "foo.@bar" formats "foo.@bar" + formats "foo(\n 1,\n # 2,\n 3,\n)" formats "foo(\n 1,\n # 2,\n 3,\n)" + formats "%w(\n one two\n three four\n)" formats "%w(\n one two\n three four\n)" + formats "lib Foo\nfun foo( ... ) : Int32\nend" formats "lib Foo\nfun foo( ... ) : Int32\nend" + formats "a&+1" formats "a&+1" + formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" + formats "def foo(x = __FILE__ )\nend" formats "def foo(x = __FILE__ )\nend" + formats "def foo(x : A(B), y)\nend" formats "def foo(x : A(B), y)\nend" formats "foo(1, / /)" formats "foo(1, / /)" - formats "asm(\"nop\" ::: \"eax\" )" formats "asm(\"nop\" ::: \"eax\" )" - formats "alias Foo::Bar =Baz" formats "alias Foo::Bar =Baz" - formats "a = begin\n1\n2\nend" formats "a = begin\n1\n2\nend" - formats "-> { }" formats "-> { }" - formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" - formats "{ } of A => B" formats "{ } of A => B" - 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 "@[Foo(\n 1,\n)]" formats "@[Foo(\n 1,\n)]" - formats "->@foo.foo" formats "->@foo.foo" - formats "break { {1, 2}, {3, 4} }" formats "break { {1, 2}, {3, 4} }" - formats "x: Int32" formats "x: Int32" - 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 "$~.bar" formats "$~.bar" - 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 "true" formats "true" + formats "def x(@y = ->(z) {})\nend" formats "def x(@y = ->(z) {})\nend" + formats "if 1\nelse\n2\nend\n3" formats "if 1\nelse\n2\nend\n3" + formats "1.[]=(2) { 3 }" formats "1.[]=(2) { 3 }" + formats "::StaticArray(T)" formats "::StaticArray(T)" formats "{ foo: 1 }" formats "{ foo: 1 }" - formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" - formats "def `(x)\n 1\nend" formats "def `(x)\n 1\nend" - formats "module Moo \n\n 1 \n\nend" formats "module Moo \n\n 1 \n\nend" - formats "1\n.as?(Int32)" formats "1\n.as?(Int32)" - formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" + 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 "pointerof( @a )" formats "pointerof( @a )" + formats "foo[1, &.bar]" formats "foo[1, &.bar]" + formats "next *1" formats "next *1" + formats "1.[]= do\nend" formats "1.[]= do\nend" + formats "alias Foo= Bar" formats "alias Foo= Bar" + formats "typeof( 1, 2, 3 )" formats "typeof( 1, 2, 3 )" + formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" + formats "foo(1 &- 2)" formats "foo(1 &- 2)" + formats "abstract def foo \n 1" formats "abstract def foo \n 1" + 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 "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 "foo(<<-X,\na\nX\n 1)" formats "foo(<<-X,\na\nX\n 1)" + formats "case 1\nend" formats "case 1\nend" + formats "foo { | a, ( b , c, ), | a + b + c }" formats "foo { | a, ( b , c, ), | a + b + c }" + formats " {% begin %} 2 {% end %}" formats " {% begin %} 2 {% end %}" + formats "module Foo # foo\nend" formats "module Foo # foo\nend" + formats "bar = foo([\n 1,\n 2,\n 3,\n])" formats "bar = foo([\n 1,\n 2,\n 3,\n])" + formats "foo.bar do\n baz\n .b\nend" formats "foo.bar do\n baz\n .b\nend" + formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" + formats "[ # foo\n 1,\n]" formats "[ # foo\n 1,\n]" + formats "@x[ 1 ] ||= 2" formats "@x[ 1 ] ||= 2" + formats "alias Foo = Bar" formats "alias Foo = Bar" + formats "if a\n2; 3\nelse\n3\nend" formats "if a\n2; 3\nelse\n3\nend" + formats "+ a + d" formats "+ a + d" + formats "a = \\\n # foo\n nil" formats "a = \\\n # foo\n nil" + 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 "1\n\n\n2" formats "1\n\n\n2" + formats "-> do\nend" formats "-> do\nend" + formats "def foo(x : self ?) \n end" formats "def foo(x : self ?) \n end" + formats "enum Foo : Int32\nA = 1\nend" formats "enum Foo : Int32\nA = 1\nend" + formats "{%\n unless true\n 1\n end\n%}" formats "{%\n unless true\n 1\n end\n%}" + formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" + 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 <<-X\nbar\nX\n}}" formats "{{ foo <<-X\nbar\nX\n}}" formats "foo 1, do\n2\nend" formats "foo 1, do\n2\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 "class Foo\n1\n\n# foo\nend" formats "class Foo\n1\n\n# foo\nend" - formats "yield *1 ,2" formats "yield *1 ,2" - formats "def foo(x, **z, &block)\nend" formats "def foo(x, **z, &block)\nend" - formats "case / /\nwhen /x/, / /\n / /\nend" formats "case / /\nwhen /x/, / /\n / /\nend" + formats "1 if 2\n# foo\n3" formats "1 if 2\n# foo\n3" + formats " .. 2" formats " .. 2" + formats "return( 1 , 2 )" formats "return( 1 , 2 )" + formats "1 \\\nensure 2" formats "1 \\\nensure 2" + 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 ":+" formats ":+" + formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" + 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 "foo &.is_a?(T)" formats "foo &.is_a?(T)" + formats "foo(\n 1, # hola\n2, # chau\n )" formats "foo(\n 1, # hola\n2, # chau\n )" + formats "$0.bar" formats "$0.bar" + formats "def foo\n {{@type}}\nend" formats "def foo\n {{@type}}\nend" + formats "foo(\n a: 1,\n b: 2,\n )\n" formats "foo(\n a: 1,\n b: 2,\n )\n" + formats "def foo ( x , y ) \n end" formats "def foo ( x , y ) \n end" + formats "if 1\nelse\n2 # foo\nend" formats "if 1\nelse\n2 # foo\nend" + formats "...\n2" formats "...\n2" + formats "def self . foo\nend" formats "def self . foo\nend" + formats "begin; 1; end" formats "begin; 1; end" + formats "->@foo.foo!" formats "->@foo.foo!" + formats " [ 1 , 2 , 3 ] " formats " [ 1 , 2 , 3 ] " formats "a &.b.c.as C" formats "a &.b.c.as C" - formats "module Foo # foo\nend" formats "module Foo # foo\nend" - formats "if 1\n1\n\n# foo\nend" formats "if 1\n1\n\n# foo\nend" - 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 "a = \\\n # foo\n bar(1)" formats "a = \\\n # foo\n bar(1)" - 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 "$~ = 1" formats "$~ = 1" - formats "a&-1" formats "a&-1" + formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" + formats "1 # foo\n2 # bar" formats "1 # foo\n2 # bar" + formats "1 &&\n2" formats "1 &&\n2" + formats "sizeof( Int32 )" formats "sizeof( Int32 )" + formats "[1,\n2,\n3]" formats "[1,\n2,\n3]" + formats "a = begin\n1\n2\nend" formats "a = begin\n1\n2\nend" + formats "next *1 , *2" formats "next *1 , *2" + formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" + formats "while 1 &&\n2 &&\n3\n4\nend" formats "while 1 &&\n2 &&\n3\n4\nend" + formats "bar do\n foo <<-X\n bar\n X\nend" formats "bar do\n foo <<-X\n bar\n X\nend" + formats "macro foo( x = 1, y = 2, &block)\nend" formats "macro foo( x = 1, y = 2, &block)\nend" + formats "yield(\n1 , \n2)" formats "yield(\n1 , \n2)" + formats "1.=== do\nend" formats "1.=== do\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 "x.try &.[] 123" formats "x.try &.[] 123" + formats "def foo ( x ) : Int32 \n end" formats "def foo ( x ) : Int32 \n end" + formats "a &.b.c.as(C)" formats "a &.b.c.as(C)" + formats "case\nelse\n 1\nend" formats "case\nelse\n 1\nend" + formats " {% if 1 %} 2 {% end %}" formats " {% if 1 %} 2 {% end %}" + formats "foo = 1\n->foo.bar(Int32*)" formats "foo = 1\n->foo.bar(Int32*)" + formats "def foo(x, **z, &block)\nend" formats "def foo(x, **z, &block)\nend" + formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" + formats "foo &.[]?( 1, 2 )" formats "foo &.[]?( 1, 2 )" + formats "return 1" formats "return 1" + formats "a &.b.as C" formats "a &.b.as C" + formats "a = foo(bar([\n 1,\n]))" formats "a = foo(bar([\n 1,\n]))" + formats "while 1\n# nothing\nend" formats "while 1\n# nothing\nend" + formats "1 \\\nif 2" formats "1 \\\nif 2" + formats "def foo(a, **b : Int32)\nend" formats "def foo(a, **b : Int32)\nend" + formats "foo{|x|\n x}" formats "foo{|x|\n x}" + formats "A = 1\nFOO = 2\n\nEX = 3" formats "A = 1\nFOO = 2\n\nEX = 3" + formats "return { {1, 2}, {3, 4} }, 5" formats "return { {1, 2}, {3, 4} }, 5" + formats "foo.responds_to? :bar\n1" formats "foo.responds_to? :bar\n1" + formats "alias Foo::Bar = Baz" formats "alias Foo::Bar = Baz" + formats "foo({\nbar: 1,\n})" formats "foo({\nbar: 1,\n})" + formats "case\nend" formats "case\nend" + formats "->do\nx\nend" formats "->do\nx\nend" + formats "next 1" formats "next 1" + formats "fun foo(x : Int32) : Int32\n 1\nend" formats "fun foo(x : Int32) : Int32\n 1\nend" + formats "`foo`" formats "`foo`" + formats "0_u64" formats "0_u64" + formats "1 # foo\n1234 # bar" formats "1 # foo\n1234 # bar" + formats "1*2" formats "1*2" + formats "foo\n .bar(\n 1\n )" formats "foo\n .bar(\n 1\n )" + formats "def foo ( @@select) \n end" formats "def foo ( @@select) \n end" + formats "def foo\nend;def bar\nend" formats "def foo\nend;def bar\nend" + formats "lib Foo\nunion Foo\nend\nend" formats "lib Foo\nunion Foo\nend\nend" + formats "->( ){ x }" formats "->( ){ x }" + formats "def foo\n# hello\n1\nend" formats "def foo\n# hello\n1\nend" + formats "#!shebang\n1 + 2" formats "#!shebang\n1 + 2" + formats "def foo (\nx ,\n y ) \n end" formats "def foo (\nx ,\n y ) \n end" + formats "if 1\n ->{ 1 }\nend" formats "if 1\n ->{ 1 }\nend" + formats "10/a" formats "10/a" + formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" + formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" + formats "1 // 2" formats "1 // 2" + formats "def foo(@[MyAnn] v); end" formats "def foo(@[MyAnn] v); end" + formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" + formats "0u64" formats "0u64" + formats "foo.[ 1 , 2 ]" formats "foo.[ 1 , 2 ]" + formats "foo x: 1, y: 2" formats "foo x: 1, y: 2" + formats "foo &.[]?(1, 2)" formats "foo &.[]?(1, 2)" + 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\ndef foo (\nx ,\n y ) \n end\nend" formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" + formats "select\n# when foo\nwhen bar\n break\nend" formats "select\n# when foo\nwhen bar\n break\nend" + formats "if 1\nbegin\n2\nensure\n3\nend\nend" formats "if 1\nbegin\n2\nensure\n3\nend\nend" + formats " {{ 1 + 2 }}" formats " {{ 1 + 2 }}" + 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 "foo[1, &.bar] = 1" formats "foo[1, &.bar] = 1" + formats "foo &.bar( 1 , 2 )" formats "foo &.bar( 1 , 2 )" + formats "{ {% for x in 1..2 %}3{% end %}, nil }" formats "{ {% for x in 1..2 %}3{% end %}, nil }" + formats "@x : A(B | C)?" formats "@x : A(B | C)?" + formats "[c.x]\n .foo" formats "[c.x]\n .foo" + formats "asm(\"a\" : : : : \"volatile\")" formats "asm(\"a\" : : : : \"volatile\")" + 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 "foo(1, 2,)" formats "foo(1, 2,)" + formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" + formats "foo &.as(T)" formats "foo &.as(T)" + 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 "asm(\"nop\")" formats "asm(\"nop\")" + formats "foo[]" formats "foo[]" + formats "foo : (F(A)) | D" formats "foo : (F(A)) | D" + formats "foo : (self)?" formats "foo : (self)?" + formats "1.>=(2) { 3 }" formats "1.>=(2) { 3 }" + formats "foo(\"b\#{1}\" \\\n\"baz\")" formats "foo(\"b\#{1}\" \\\n\"baz\")" + formats "x : A?" formats "x : A?" + formats "a = if 1\n2\n3\nend" formats "a = if 1\n2\n3\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 : (A -> B)" formats "x : (A -> B)" + 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 "def foo(**z)\nend" formats "def foo(**z)\nend" + formats "{ # foo\n 1 => 2,\n}" formats "{ # foo\n 1 => 2,\n}" + formats "a[1] , b[2] = 1 , 2" formats "a[1] , b[2] = 1 , 2" + formats "->@foo.foo?" formats "->@foo.foo?" + formats "lib Bar\n enum Foo\n end\nend" formats "lib Bar\n enum Foo\n end\nend" + formats "@[Foo]" formats "@[Foo]" + formats "foo : (A -> B)\nbar : C" formats "foo : (A -> B)\nbar : C" + formats "return *1 , *2" formats "return *1 , *2" + formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" + formats "foo(bar([\n 1,\n]))" formats "foo(bar([\n 1,\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 " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" + formats "foo (1).bar" formats "foo (1).bar" + 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:: Bar" formats "::Foo:: Bar" + formats "foo(self // 1)" formats "foo(self // 1)" + formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" + formats "1 || 2" formats "1 || 2" + formats "foo : (A) | D" formats "foo : (A) | D" + formats "{ {{FOO}}, nil}" formats "{ {{FOO}}, nil}" + formats "foo.% bar" formats "foo.% bar" + formats "@a" formats "@a" + 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 "while 1;\n2; end" formats "while 1;\n2; end" + formats "foo()" formats "foo()" + 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 "<<-HTML\n \#{1}x\n y\n z\n HTML" formats "<<-HTML\n \#{1}x\n y\n z\n HTML" + 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 "1 &&\n2 &&\n3" formats "1 &&\n2 &&\n3" + formats "->{}" formats "->{}" + formats "asm(\"nop\" :::: \"volatile\" )" formats "asm(\"nop\" :::: \"volatile\" )" + formats "foo((1..3))" formats "foo((1..3))" + formats "module Moo ( T )\nend" formats "module Moo ( T )\nend" + formats "def foo( x , & block )\nend" formats "def foo( x , & block )\nend" + formats "def foo(**z : Foo)\nend" formats "def foo(**z : Foo)\nend" + formats "@[::Foo::Bar]" formats "@[::Foo::Bar]" + formats "foo.as?(T).bar" formats "foo.as?(T).bar" + formats "if 1\nelse\n# nothing\nend" formats "if 1\nelse\n# nothing\nend" + adds `&` to yielding methods that don't have a block parameter (#8764) + formats "def foo\n yield\nend" formats "def foo\n yield\nend" + formats "macro f\n yield\n {{ yield }}\nend" formats "macro f\n yield\n {{ yield }}\nend" + formats "def foo(x,\ny)\n yield\nend" formats "def foo(x,\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(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,\n)\n yield\nend" formats "def foo(\nx,\n)\n yield\nend" + formats "def foo(\nx, y)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" + formats "def foo(x,\ny,)\n yield\nend" formats "def foo(x,\ny,)\n yield\nend" + formats "def foo(\n)\n yield\nend" formats "def foo(\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(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" + formats "def foo(a, **b)\n yield\nend" formats "def foo(a, **b)\n yield\nend" + formats "def foo(\nx)\n yield\nend" formats "def foo(\nx)\n yield\nend" + formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" + formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" + formats "class Foo\nend\nclass Bar\nend" formats "class Foo\nend\nclass Bar\nend" + formats "if a\n2\n3\nelse\n4\n5\nend" formats "if a\n2\n3\nelse\n4\n5\nend" + formats "next { {1, 2}, {3, 4} }" formats "next { {1, 2}, {3, 4} }" Unicode bi-directional control characters - formats "%q(\u202A)" formats "%q(\u202A)" - formats "\"\u2068\"" formats "\"\u2068\"" - formats "\"\u2066\"" formats "\"\u2066\"" - formats "\"\u202E\"" formats "\"\u202E\"" - formats "{\"\u2066\": 1}" formats "{\"\u2066\": 1}" - formats "%Q(\u2067\#{1})" formats "%Q(\u2067\#{1})" - formats "%Q(\u202A\#{1})" formats "%Q(\u202A\#{1})" - formats "<<-EOS\n\u202C\#{1}\nEOS" formats "<<-EOS\n\u202C\#{1}\nEOS" - formats "\"\\c\u2067\"" formats "\"\\c\u2067\"" - formats "def foo(\"\u2066\" x)\nend" formats "def foo(\"\u2066\" x)\nend" - formats "\"\\c\u2068\"" formats "\"\\c\u2068\"" - formats "foo(\"\u2066\": 1)" formats "foo(\"\u2066\": 1)" - formats "<<-EOS\n\u2068\#{1}\nEOS" formats "<<-EOS\n\u2068\#{1}\nEOS" - formats "/\u2069/" formats "/\u2069/" + formats "<<-EOS\n\u2069\#{1}\nEOS" formats "<<-EOS\n\u2069\#{1}\nEOS" + formats "\"\u202D\#{1}\"" formats "\"\u202D\#{1}\"" + formats "<<-EOS\n\u2066\#{1}\nEOS" formats "<<-EOS\n\u2066\#{1}\nEOS" + formats "%r(\u2066)" formats "%r(\u2066)" + formats "{\"\u202A\": 1}" formats "{\"\u202A\": 1}" + formats "%r(\u202C\#{1})" formats "%r(\u202C\#{1})" + formats "\"\u202A\"" formats "\"\u202A\"" + formats "%(\u2066)" formats "%(\u2066)" + formats "{\"\u202C\": 1}" formats "{\"\u202C\": 1}" + formats "%w(\u2068)" formats "%w(\u2068)" + formats "%Q(\u2069)" formats "%Q(\u2069)" + formats "\"\u202C\"" formats "\"\u202C\"" + formats "%w(\u202C)" formats "%w(\u202C)" + formats "def foo(\"\u2068\" x)\nend" formats "def foo(\"\u2068\" x)\nend" + formats "%i(\u202C)" formats "%i(\u202C)" + formats "<<-'EOS'\n\u202B\nEOS" formats "<<-'EOS'\n\u202B\nEOS" + formats "def foo(\"\u202B\" x)\nend" formats "def foo(\"\u202B\" x)\nend" + formats "def foo(\"\u2067\" x)\nend" formats "def foo(\"\u2067\" x)\nend" + formats "<<-'EOS'\n\u202D\nEOS" formats "<<-'EOS'\n\u202D\nEOS" + formats "/\u2068\#{1}/" formats "/\u2068\#{1}/" + formats "<<-'EOS'\n\u2066\nEOS" formats "<<-'EOS'\n\u2066\nEOS" + formats "%q(\u202C)" formats "%q(\u202C)" + formats "{\"\u2069\": 1}" formats "{\"\u2069\": 1}" + formats "%r(\u202A)" formats "%r(\u202A)" + formats "%q(\u202E)" formats "%q(\u202E)" + formats "<<-EOS\n\u202B\#{1}\nEOS" formats "<<-EOS\n\u202B\#{1}\nEOS" + formats "/\u202D/" formats "/\u202D/" + formats "%i(\u202D)" formats "%i(\u202D)" + formats "\"\\c\u202A\"" formats "\"\\c\u202A\"" formats "%Q(\u202C)" formats "%Q(\u202C)" - formats "/\u202B/" formats "/\u202B/" - formats "%q(\u2066)" formats "%q(\u2066)" - formats "%q(\u2069)" formats "%q(\u2069)" - formats "%r(\u202E)" formats "%r(\u202E)" + formats "NamedTuple(\"\u202E\": Int32)" formats "NamedTuple(\"\u202E\": Int32)" + formats "<<-'EOS'\n\u2067\nEOS" formats "<<-'EOS'\n\u2067\nEOS" + formats "%i(\u202E)" formats "%i(\u202E)" + formats "foo(\"\u202E\": 1)" formats "foo(\"\u202E\": 1)" + formats "foo(\"\u202B\": 1)" formats "foo(\"\u202B\": 1)" + formats "\"\\c\u202D\"" formats "\"\\c\u202D\"" + formats "<<-EOS\n\u2067\nEOS" formats "<<-EOS\n\u2067\nEOS" + formats "\"\\c\u2066\"" formats "\"\\c\u2066\"" + formats "%Q(\u2067\#{1})" formats "%Q(\u2067\#{1})" + formats "/\u2066\#{1}/" formats "/\u2066\#{1}/" + formats "%w(\u202D)" formats "%w(\u202D)" + formats "\"\\c\u2066\#{1}\"" formats "\"\\c\u2066\#{1}\"" + formats "%Q(\u202D\#{1})" formats "%Q(\u202D\#{1})" formats "/\u202A\#{1}/" formats "/\u202A\#{1}/" - formats "%Q(\u202A)" formats "%Q(\u202A)" - formats "/\u2069\#{1}/" formats "/\u2069\#{1}/" + formats "foo(\"\u2066\": 1)" formats "foo(\"\u2066\": 1)" + formats "def foo(\"\u202D\" x)\nend" formats "def foo(\"\u202D\" x)\nend" + formats "foo(\"\u2069\": 1)" formats "foo(\"\u2069\": 1)" + formats "%Q(\u2068\#{1})" formats "%Q(\u2068\#{1})" + formats "/\u202A/" formats "/\u202A/" + formats "foo(\"\u202C\": 1)" formats "foo(\"\u202C\": 1)" + formats "%(\u202D)" formats "%(\u202D)" + formats "%Q(\u2068)" formats "%Q(\u2068)" + formats "%r(\u2067)" formats "%r(\u2067)" + formats "%r(\u2066\#{1})" formats "%r(\u2066\#{1})" + formats "<<-EOS\n\u202E\#{1}\nEOS" formats "<<-EOS\n\u202E\#{1}\nEOS" + formats "/\u202C/" formats "/\u202C/" + formats "NamedTuple(\"\u2069\": Int32)" formats "NamedTuple(\"\u2069\": Int32)" + formats "%q(\u2068)" formats "%q(\u2068)" + formats "\"\u2067\"" formats "\"\u2067\"" + formats "%Q(\u202E)" formats "%Q(\u202E)" formats "\"\u202C\#{1}\"" formats "\"\u202C\#{1}\"" + formats "%r(\u2069\#{1})" formats "%r(\u2069\#{1})" + formats "\"\\c\u2069\"" formats "\"\\c\u2069\"" + formats "%i(\u202B)" formats "%i(\u202B)" + formats "%Q(\u202A\#{1})" formats "%Q(\u202A\#{1})" formats "%(\u202C)" formats "%(\u202C)" - formats "\"\\c\u202B\#{1}\"" formats "\"\\c\u202B\#{1}\"" + formats "%w(\u2067)" formats "%w(\u2067)" + formats "%i(\u2067)" formats "%i(\u2067)" + formats "%w(\u2069)" formats "%w(\u2069)" formats "\"\\c\u202A\#{1}\"" formats "\"\\c\u202A\#{1}\"" - formats "def foo(\"\u202A\" x)\nend" formats "def foo(\"\u202A\" x)\nend" - formats "%w(\u202B)" formats "%w(\u202B)" - formats "<<-EOS\n\u202B\#{1}\nEOS" formats "<<-EOS\n\u202B\#{1}\nEOS" - formats "%i(\u2068)" formats "%i(\u2068)" - formats "%r(\u2067\#{1})" formats "%r(\u2067\#{1})" - formats "\"\\c\u2066\#{1}\"" formats "\"\\c\u2066\#{1}\"" - formats "NamedTuple(\"\u202B\": Int32)" formats "NamedTuple(\"\u202B\": Int32)" - formats "<<-EOS\n\u2066\nEOS" formats "<<-EOS\n\u2066\nEOS" - formats "<<-EOS\n\u2069\nEOS" formats "<<-EOS\n\u2069\nEOS" - formats "%(\u202D)" formats "%(\u202D)" - formats "def foo(\"\u2069\" x)\nend" formats "def foo(\"\u2069\" x)\nend" - formats "\"\\c\u202C\#{1}\"" formats "\"\\c\u202C\#{1}\"" - formats "{\"\u202A\": 1}" formats "{\"\u202A\": 1}" - formats "\"\u202B\"" formats "\"\u202B\"" - formats "NamedTuple(\"\u202A\": Int32)" formats "NamedTuple(\"\u202A\": Int32)" - formats "<<-'EOS'\n\u2066\nEOS" formats "<<-'EOS'\n\u2066\nEOS" - formats "<<-'EOS'\n\u202A\nEOS" formats "<<-'EOS'\n\u202A\nEOS" - formats "foo(\"\u202A\": 1)" formats "foo(\"\u202A\": 1)" - formats "<<-EOS\n\u202E\#{1}\nEOS" formats "<<-EOS\n\u202E\#{1}\nEOS" - formats "%q(\u2067)" formats "%q(\u2067)" formats "\"\u202E\#{1}\"" formats "\"\u202E\#{1}\"" - formats "\"\\c\u2066\"" formats "\"\\c\u2066\"" - formats "NamedTuple(\"\u2069\": Int32)" formats "NamedTuple(\"\u2069\": Int32)" - formats "foo(\"\u202C\": 1)" formats "foo(\"\u202C\": 1)" - formats "%Q(\u2069\#{1})" formats "%Q(\u2069\#{1})" - formats "/\u2066/" formats "/\u2066/" - formats "/\u2066\#{1}/" formats "/\u2066\#{1}/" - formats "/\u2068\#{1}/" formats "/\u2068\#{1}/" - formats "\"\u202D\#{1}\"" formats "\"\u202D\#{1}\"" - formats "%(\u202A)" formats "%(\u202A)" - formats "%Q(\u202B\#{1})" formats "%Q(\u202B\#{1})" - formats "%(\u202E)" formats "%(\u202E)" - formats "/\u202A/" formats "/\u202A/" - formats "{\"\u202C\": 1}" formats "{\"\u202C\": 1}" - formats "%(\u2068)" formats "%(\u2068)" - formats "%q(\u202D)" formats "%q(\u202D)" - formats "%r(\u202D)" formats "%r(\u202D)" - formats "%(\u2067)" formats "%(\u2067)" - formats "%r(\u202E\#{1})" formats "%r(\u202E\#{1})" - formats "%Q(\u2067)" formats "%Q(\u2067)" - formats "\"\\c\u202B\"" formats "\"\\c\u202B\"" - formats "foo(\"\u202D\": 1)" formats "foo(\"\u202D\": 1)" - formats "foo(\"\u2068\": 1)" formats "foo(\"\u2068\": 1)" - formats "%w(\u202C)" formats "%w(\u202C)" + formats "{\"\u2066\": 1}" formats "{\"\u2066\": 1}" formats "%Q(\u202B)" formats "%Q(\u202B)" - formats "<<-EOS\n\u2068\nEOS" formats "<<-EOS\n\u2068\nEOS" - formats "%q(\u202B)" formats "%q(\u202B)" - formats "<<-EOS\n\u202A\#{1}\nEOS" formats "<<-EOS\n\u202A\#{1}\nEOS" - formats "%r(\u2068)" formats "%r(\u2068)" + formats "<<-EOS\n\u2068\#{1}\nEOS" formats "<<-EOS\n\u2068\#{1}\nEOS" + formats "/\u2069/" formats "/\u2069/" + formats "\"\u2066\#{1}\"" formats "\"\u2066\#{1}\"" + formats "%(\u202A)" formats "%(\u202A)" formats "\"\\c\u2068\#{1}\"" formats "\"\\c\u2068\#{1}\"" - formats "%r(\u202B)" formats "%r(\u202B)" - formats "\"\u2069\#{1}\"" formats "\"\u2069\#{1}\"" - formats "%w(\u202E)" formats "%w(\u202E)" - formats "/\u202D/" formats "/\u202D/" + formats "/\u202B\#{1}/" formats "/\u202B\#{1}/" + formats "NamedTuple(\"\u2068\": Int32)" formats "NamedTuple(\"\u2068\": Int32)" + formats "%Q(\u2069\#{1})" formats "%Q(\u2069\#{1})" + formats "\"\u2067\#{1}\"" formats "\"\u2067\#{1}\"" + formats "<<-EOS\n\u202C\nEOS" formats "<<-EOS\n\u202C\nEOS" formats "%Q(\u202E\#{1})" formats "%Q(\u202E\#{1})" - formats "\"\\c\u2067\#{1}\"" formats "\"\\c\u2067\#{1}\"" - formats "\"\u202A\#{1}\"" formats "\"\u202A\#{1}\"" - formats "foo(\"\u202B\": 1)" formats "foo(\"\u202B\": 1)" - formats "def foo(\"\u2067\" x)\nend" formats "def foo(\"\u2067\" x)\nend" - formats "%i(\u202A)" formats "%i(\u202A)" - formats "<<-'EOS'\n\u202B\nEOS" formats "<<-'EOS'\n\u202B\nEOS" - formats "%(\u2066)" formats "%(\u2066)" - formats "%w(\u202A)" formats "%w(\u202A)" - formats "def foo(\"\u202D\" x)\nend" formats "def foo(\"\u202D\" x)\nend" - formats "%r(\u202C\#{1})" formats "%r(\u202C\#{1})" - formats "\"\\c\u202C\"" formats "\"\\c\u202C\"" - formats "%q(\u202C)" formats "%q(\u202C)" - formats "%i(\u2066)" formats "%i(\u2066)" - formats "/\u202C/" formats "/\u202C/" formats "\"\\c\u202E\#{1}\"" formats "\"\\c\u202E\#{1}\"" - formats "/\u202C\#{1}/" formats "/\u202C\#{1}/" - formats "\"\u202B\#{1}\"" formats "\"\u202B\#{1}\"" - formats "%(\u2069)" formats "%(\u2069)" - formats "%Q(\u2068)" formats "%Q(\u2068)" - formats "%r(\u2069)" formats "%r(\u2069)" - formats "%w(\u202D)" formats "%w(\u202D)" - formats "%Q(\u202D\#{1})" formats "%Q(\u202D\#{1})" - formats "/\u2068/" formats "/\u2068/" - formats "\"\u2067\"" formats "\"\u2067\"" - formats "%r(\u2066\#{1})" formats "%r(\u2066\#{1})" - formats "%Q(\u202C\#{1})" formats "%Q(\u202C\#{1})" - formats "%Q(\u2066)" formats "%Q(\u2066)" - formats "<<-EOS\n\u202C\nEOS" formats "<<-EOS\n\u202C\nEOS" - formats "def foo(\"\u202B\" x)\nend" formats "def foo(\"\u202B\" x)\nend" - formats "/\u202D\#{1}/" formats "/\u202D\#{1}/" - formats "%w(\u2069)" formats "%w(\u2069)" - formats "\"\u202C\"" formats "\"\u202C\"" - formats "\"\\c\u202E\"" formats "\"\\c\u202E\"" - formats "\"\\c\u202D\#{1}\"" formats "\"\\c\u202D\#{1}\"" + formats "%r(\u202A\#{1})" formats "%r(\u202A\#{1})" + formats "NamedTuple(\"\u202B\": Int32)" formats "NamedTuple(\"\u202B\": Int32)" + formats "%q(\u202D)" formats "%q(\u202D)" + formats "%q(\u202A)" formats "%q(\u202A)" + formats "%i(\u2069)" formats "%i(\u2069)" + formats "<<-'EOS'\n\u2068\nEOS" formats "<<-'EOS'\n\u2068\nEOS" + formats "\"\\c\u202B\"" formats "\"\\c\u202B\"" + formats "<<-EOS\n\u2066\nEOS" formats "<<-EOS\n\u2066\nEOS" + formats "{\"\u202E\": 1}" formats "{\"\u202E\": 1}" + formats "%r(\u202B\#{1})" formats "%r(\u202B\#{1})" + formats "%r(\u202E\#{1})" formats "%r(\u202E\#{1})" formats "\"\\c\u2069\#{1}\"" formats "\"\\c\u2069\#{1}\"" - formats "{\"\u2068\": 1}" formats "{\"\u2068\": 1}" - formats "%i(\u202B)" formats "%i(\u202B)" - formats "<<-EOS\n\u2067\#{1}\nEOS" formats "<<-EOS\n\u2067\#{1}\nEOS" - formats "<<-EOS\n\u2067\nEOS" formats "<<-EOS\n\u2067\nEOS" - formats "%q(\u202E)" formats "%q(\u202E)" - formats "%Q(\u202E)" formats "%Q(\u202E)" - formats "%i(\u202D)" formats "%i(\u202D)" - formats "\"\u202D\"" formats "\"\u202D\"" - formats "%Q(\u202D)" formats "%Q(\u202D)" - formats "%Q(\u2068\#{1})" formats "%Q(\u2068\#{1})" + formats "{\"\u202B\": 1}" formats "{\"\u202B\": 1}" + formats "%r(\u2068)" formats "%r(\u2068)" + formats "foo(\"\u202A\": 1)" formats "foo(\"\u202A\": 1)" formats "<<-EOS\n\u202B\nEOS" formats "<<-EOS\n\u202B\nEOS" - formats "<<-EOS\n\u202A\nEOS" formats "<<-EOS\n\u202A\nEOS" - formats "%r(\u202C)" formats "%r(\u202C)" - formats "/\u202B\#{1}/" formats "/\u202B\#{1}/" - formats "%r(\u2069\#{1})" formats "%r(\u2069\#{1})" - formats "/\u202E/" formats "/\u202E/" + formats "%i(\u2066)" formats "%i(\u2066)" + formats "%r(\u2068\#{1})" formats "%r(\u2068\#{1})" + formats "%i(\u2068)" formats "%i(\u2068)" + formats "/\u202B/" formats "/\u202B/" + formats "\"\\c\u202D\#{1}\"" formats "\"\\c\u202D\#{1}\"" formats "/\u202E\#{1}/" formats "/\u202E\#{1}/" - formats "NamedTuple(\"\u2068\": Int32)" formats "NamedTuple(\"\u2068\": Int32)" + formats "\"\u2066\"" formats "\"\u2066\"" + formats "%q(\u202B)" formats "%q(\u202B)" + formats "def foo(\"\u2069\" x)\nend" formats "def foo(\"\u2069\" x)\nend" + formats "<<-'EOS'\n\u2069\nEOS" formats "<<-'EOS'\n\u2069\nEOS" + formats "%r(\u202C)" formats "%r(\u202C)" + formats "%r(\u2067\#{1})" formats "%r(\u2067\#{1})" + formats "%Q(\u202A)" formats "%Q(\u202A)" + formats "NamedTuple(\"\u2066\": Int32)" formats "NamedTuple(\"\u2066\": Int32)" + formats "foo(\"\u2067\": 1)" formats "foo(\"\u2067\": 1)" + formats "/\u202C\#{1}/" formats "/\u202C\#{1}/" + formats "%(\u2068)" formats "%(\u2068)" + formats "%(\u202B)" formats "%(\u202B)" + formats "%q(\u2069)" formats "%q(\u2069)" + formats "\"\\c\u2067\#{1}\"" formats "\"\\c\u2067\#{1}\"" + formats "%r(\u202B)" formats "%r(\u202B)" + formats "<<-EOS\n\u2068\nEOS" formats "<<-EOS\n\u2068\nEOS" formats "%Q(\u2066\#{1})" formats "%Q(\u2066\#{1})" + formats "%Q(\u202D)" formats "%Q(\u202D)" + formats "<<-EOS\n\u202A\nEOS" formats "<<-EOS\n\u202A\nEOS" + formats "\"\u202D\"" formats "\"\u202D\"" + formats "%w(\u202E)" formats "%w(\u202E)" + formats "<<-EOS\n\u202A\#{1}\nEOS" formats "<<-EOS\n\u202A\#{1}\nEOS" + formats "%(\u2069)" formats "%(\u2069)" formats "\"\u2068\#{1}\"" formats "\"\u2068\#{1}\"" - formats "{\"\u2067\": 1}" formats "{\"\u2067\": 1}" - formats "<<-'EOS'\n\u2068\nEOS" formats "<<-'EOS'\n\u2068\nEOS" - formats "%i(\u2067)" formats "%i(\u2067)" - formats "%Q(\u2069)" formats "%Q(\u2069)" - formats "NamedTuple(\"\u202D\": Int32)" formats "NamedTuple(\"\u202D\": Int32)" - formats "<<-'EOS'\n\u202D\nEOS" formats "<<-'EOS'\n\u202D\nEOS" - formats "\"\\c\u2069\"" formats "\"\\c\u2069\"" - formats "<<-EOS\n\u2069\#{1}\nEOS" formats "<<-EOS\n\u2069\#{1}\nEOS" + formats "\"\\c\u2068\"" formats "\"\\c\u2068\"" + formats "foo(\"\u202D\": 1)" formats "foo(\"\u202D\": 1)" + formats "%Q(\u2067)" formats "%Q(\u2067)" + formats "\"\u202B\#{1}\"" formats "\"\u202B\#{1}\"" + formats "\"\u202B\"" formats "\"\u202B\"" formats "/\u2067/" formats "/\u2067/" - formats "foo(\"\u2069\": 1)" formats "foo(\"\u2069\": 1)" - formats "NamedTuple(\"\u2066\": Int32)" formats "NamedTuple(\"\u2066\": Int32)" - formats "%w(\u2066)" formats "%w(\u2066)" - formats "%r(\u2068\#{1})" formats "%r(\u2068\#{1})" - formats "%i(\u2069)" formats "%i(\u2069)" - formats "\"\u2069\"" formats "\"\u2069\"" - formats "\"\u202A\"" formats "\"\u202A\"" - formats "def foo(\"\u202C\" x)\nend" formats "def foo(\"\u202C\" x)\nend" - formats "{\"\u202E\": 1}" formats "{\"\u202E\": 1}" + formats "/\u2068/" formats "/\u2068/" + formats "<<-EOS\n\u202C\#{1}\nEOS" formats "<<-EOS\n\u202C\#{1}\nEOS" + formats "def foo(\"\u202A\" x)\nend" formats "def foo(\"\u202A\" x)\nend" + formats "{\"\u2068\": 1}" formats "{\"\u2068\": 1}" + formats "%r(\u2069)" formats "%r(\u2069)" + formats "<<-EOS\n\u202E\nEOS" formats "<<-EOS\n\u202E\nEOS" + formats "/\u202E/" formats "/\u202E/" formats "NamedTuple(\"\u2067\": Int32)" formats "NamedTuple(\"\u2067\": Int32)" - formats "<<-'EOS'\n\u2069\nEOS" formats "<<-'EOS'\n\u2069\nEOS" - formats "def foo(\"\u2068\" x)\nend" formats "def foo(\"\u2068\" x)\nend" - formats "<<-'EOS'\n\u202C\nEOS" formats "<<-'EOS'\n\u202C\nEOS" - formats "%r(\u202A)" formats "%r(\u202A)" + formats "<<-EOS\n\u202D\nEOS" formats "<<-EOS\n\u202D\nEOS" + formats "%r(\u202E)" formats "%r(\u202E)" + formats "/\u202D\#{1}/" formats "/\u202D\#{1}/" + formats "def foo(\"\u202E\" x)\nend" formats "def foo(\"\u202E\" x)\nend" + formats "NamedTuple(\"\u202C\": Int32)" formats "NamedTuple(\"\u202C\": Int32)" + formats "/\u2066/" formats "/\u2066/" + formats "%Q(\u2066)" formats "%Q(\u2066)" + formats "%(\u2067)" formats "%(\u2067)" + formats "<<-EOS\n\u2067\#{1}\nEOS" formats "<<-EOS\n\u2067\#{1}\nEOS" + formats "%w(\u202B)" formats "%w(\u202B)" + formats "<<-EOS\n\u2069\nEOS" formats "<<-EOS\n\u2069\nEOS" formats "{\"\u202D\": 1}" formats "{\"\u202D\": 1}" - formats "\"\\c\u202A\"" formats "\"\\c\u202A\"" - formats "%w(\u2068)" formats "%w(\u2068)" - formats "<<-'EOS'\n\u202E\nEOS" formats "<<-'EOS'\n\u202E\nEOS" - formats "\"\\c\u202D\"" formats "\"\\c\u202D\"" - formats "%r(\u202D\#{1})" formats "%r(\u202D\#{1})" - formats "%(\u202B)" formats "%(\u202B)" - formats "foo(\"\u2067\": 1)" formats "foo(\"\u2067\": 1)" - formats "%w(\u2067)" formats "%w(\u2067)" + formats "\"\u2069\"" formats "\"\u2069\"" + formats "def foo(\"\u2066\" x)\nend" formats "def foo(\"\u2066\" x)\nend" + formats "foo(\"\u2068\": 1)" formats "foo(\"\u2068\": 1)" + formats "NamedTuple(\"\u202D\": Int32)" formats "NamedTuple(\"\u202D\": Int32)" + formats "{\"\u2067\": 1}" formats "{\"\u2067\": 1}" + formats "%Q(\u202C\#{1})" formats "%Q(\u202C\#{1})" formats "/\u2067\#{1}/" formats "/\u2067\#{1}/" - formats "<<-EOS\n\u202E\nEOS" formats "<<-EOS\n\u202E\nEOS" - formats "%i(\u202C)" formats "%i(\u202C)" - formats "foo(\"\u202E\": 1)" formats "foo(\"\u202E\": 1)" - formats "\"\u2066\#{1}\"" formats "\"\u2066\#{1}\"" - formats "%r(\u202B\#{1})" formats "%r(\u202B\#{1})" - formats "NamedTuple(\"\u202E\": Int32)" formats "NamedTuple(\"\u202E\": Int32)" - formats "{\"\u202B\": 1}" formats "{\"\u202B\": 1}" - formats "<<-EOS\n\u2066\#{1}\nEOS" formats "<<-EOS\n\u2066\#{1}\nEOS" - formats "<<-'EOS'\n\u2067\nEOS" formats "<<-'EOS'\n\u2067\nEOS" - formats "<<-EOS\n\u202D\nEOS" formats "<<-EOS\n\u202D\nEOS" - formats "%r(\u202A\#{1})" formats "%r(\u202A\#{1})" + formats "\"\u2068\"" formats "\"\u2068\"" + formats "NamedTuple(\"\u202A\": Int32)" formats "NamedTuple(\"\u202A\": Int32)" + formats "\"\u202E\"" formats "\"\u202E\"" + formats "\"\u2069\#{1}\"" formats "\"\u2069\#{1}\"" + formats "\"\\c\u202E\"" formats "\"\\c\u202E\"" formats "<<-EOS\n\u202D\#{1}\nEOS" formats "<<-EOS\n\u202D\#{1}\nEOS" - formats "%i(\u202E)" formats "%i(\u202E)" - formats "NamedTuple(\"\u202C\": Int32)" formats "NamedTuple(\"\u202C\": Int32)" - formats "%r(\u2066)" formats "%r(\u2066)" - formats "%r(\u2067)" formats "%r(\u2067)" - formats "\"\u2067\#{1}\"" formats "\"\u2067\#{1}\"" - formats "{\"\u2069\": 1}" formats "{\"\u2069\": 1}" - formats "%q(\u2068)" formats "%q(\u2068)" - formats "def foo(\"\u202E\" x)\nend" formats "def foo(\"\u202E\" x)\nend" - formats "{% verbatim do %}{{1}} + {{2}}{% end %}" formats "{% verbatim do %}{{1}} + {{2}}{% end %}" - formats "while 1\n2\nend" formats "while 1\n2\nend" - formats "[\n 1, # foo\n 3,\n]" formats "[\n 1, # foo\n 3,\n]" - 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 "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" - formats "<<-HTML\n \#{1}x\n y\n z\n HTML" formats "<<-HTML\n \#{1}x\n y\n z\n HTML" - formats "if 1\n node.is_a?(T)\nend" formats "if 1\n node.is_a?(T)\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 "::Tuple(T)" formats "::Tuple(T)" - formats "foo.% bar" formats "foo.% bar" - formats "! 1" formats "! 1" - formats "->@@foo.foo" formats "->@@foo.foo" - 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 "Tuple()" formats "Tuple()" - 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 "%i(one two three)" formats "%i(one two three)" - formats "foo.bar(1) # comment\n .baz" formats "foo.bar(1) # comment\n .baz" - formats "enum Foo; A = 1; end" formats "enum Foo; A = 1; end" - formats "def foo(\n **a # comment\n)\n 1\nend" formats "def foo(\n **a # comment\n)\n 1\nend" - formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" - formats "private getter foo" formats "private getter foo" - formats "Foo( x: Int32 )" formats "Foo( x: Int32 )" - formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" - formats "foo.foo1(\n bar\n .bar1\n .bar2)" formats "foo.foo1(\n bar\n .bar1\n .bar2)" - formats "while 1 # foo\nend" formats "while 1 # foo\nend" - formats "macro foo\n {% 1 + 2 %}\nend" formats "macro foo\n {% 1 + 2 %}\nend" - formats "foo bar, \\\nbaz" formats "foo bar, \\\nbaz" - 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 "case\nelse\n 1\nend" formats "case\nelse\n 1\nend" - formats "NamedTuple(a: Int32,)" formats "NamedTuple(a: Int32,)" - formats "[/ /, / /]" formats "[/ /, / /]" - formats "a , b = 1 , 2" formats "a , b = 1 , 2" - formats "enum Foo\nA \nend" formats "enum Foo\nA \nend" - formats "1 if nil?\na.b + c" formats "1 if nil?\na.b + c" - formats "macro foo\n 1 + 2 \n end" formats "macro foo\n 1 + 2 \n end" - formats "[\n1,\n2,\n3]" formats "[\n1,\n2,\n3]" - formats "{ {1 => 2} }" formats "{ {1 => 2} }" - formats "a = %w(\n one two\n three four\n)" formats "a = %w(\n one two\n three four\n)" - 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 "{ %() }" formats "{ %() }" - formats "foo \\\n foo: 1,\n bar: 2" formats "foo \\\n foo: 1,\n bar: 2" - formats " <<-EOF\n 1\n 2\n EOF" formats " <<-EOF\n 1\n 2\n EOF" - formats "break *1" formats "break *1" - formats "{% foo <<-X\nbar\nX\n%}" formats "{% foo <<-X\nbar\nX\n%}" - formats "enum Foo\nA = 1\nend" formats "enum Foo\nA = 1\nend" - formats "break 1, {2, 3}" formats "break 1, {2, 3}" - formats "a = 1\ndef bar\nend" formats "a = 1\ndef bar\nend" - formats "asm(\"nop\" :: \"r\"(0))" formats "asm(\"nop\" :: \"r\"(0))" - formats "1 # foo\n2 # bar" formats "1 # foo\n2 # bar" - formats "\"\#{ # foo\n foo = 1\n}\"" formats "\"\#{ # foo\n foo = 1\n}\"" - formats "%x(foo \#{ bar })" formats "%x(foo \#{ bar })" - formats "def foo\n1\nrescue\n2\nend" formats "def foo\n1\nrescue\n2\nend" - 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 "enum Foo\nend" formats "enum Foo\nend" - formats "def foo( & \n )\nend" formats "def foo( & \n )\nend" - formats "begin\n1\nrescue ex : Int32 \n3\nend" formats "begin\n1\nrescue ex : Int32 \n3\nend" - formats "def foo(@[MyAnn] &); end" formats "def foo(@[MyAnn] &); 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 "case 1\nelse\n 2\nend" formats "case 1\nelse\n 2\nend" - formats "1.[]=() { 3 }" formats "1.[]=() { 3 }" - formats "a &.a.!" formats "a &.a.!" - formats "if 1\n ->{ 1 }\nend" formats "if 1\n ->{ 1 }\nend" - formats "->{ x }" formats "->{ x }" - formats "enum Foo : Int32\nA = 1\nend" formats "enum Foo : Int32\nA = 1\nend" - formats "$1.bar" formats "$1.bar" - formats "[\n1,\n\n2]" formats "[\n1,\n\n2]" - formats "foo[x: 1, &.bar]" formats "foo[x: 1, &.bar]" - formats "def foo ( @@x) \n end" formats "def foo ( @@x) \n end" - formats "1/2" formats "1/2" - formats "def foo(x @y)\nend" formats "def foo(x @y)\nend" - formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" - formats "[1, 2, 3]" formats "[1, 2, 3]" - formats "@foo : Int32 # comment\n\ndef foo\nend" formats "@foo : Int32 # comment\n\ndef foo\nend" - 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 "%r(\u202D)" formats "%r(\u202D)" + formats "\"\\c\u2067\"" formats "\"\\c\u2067\"" + formats "%w(\u202A)" formats "%w(\u202A)" + formats "%w(\u2066)" formats "%w(\u2066)" + formats "%q(\u2066)" formats "%q(\u2066)" + formats "%(\u202E)" formats "%(\u202E)" + formats "%r(\u202D\#{1})" formats "%r(\u202D\#{1})" + formats "<<-'EOS'\n\u202E\nEOS" formats "<<-'EOS'\n\u202E\nEOS" + formats "\"\\c\u202C\#{1}\"" formats "\"\\c\u202C\#{1}\"" + formats "<<-'EOS'\n\u202A\nEOS" formats "<<-'EOS'\n\u202A\nEOS" + formats "\"\u202A\#{1}\"" formats "\"\u202A\#{1}\"" + formats "%Q(\u202B\#{1})" formats "%Q(\u202B\#{1})" + formats "<<-'EOS'\n\u202C\nEOS" formats "<<-'EOS'\n\u202C\nEOS" + formats "/\u2069\#{1}/" formats "/\u2069\#{1}/" + formats "\"\\c\u202B\#{1}\"" formats "\"\\c\u202B\#{1}\"" + formats "%q(\u2067)" formats "%q(\u2067)" + formats "\"\\c\u202C\"" formats "\"\\c\u202C\"" + formats "def foo(\"\u202C\" x)\nend" formats "def foo(\"\u202C\" x)\nend" + formats "%i(\u202A)" formats "%i(\u202A)" + formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" + formats "foo.[1, 2] = 3" formats "foo.[1, 2] = 3" + formats "a = \nif 1\n2\nend" formats "a = \nif 1\n2\nend" + 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 "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" formats "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" + formats "{x => self // 1}" formats "{x => self // 1}" + formats "asm(\"nop\"\n: \"a\"(0) )" formats "asm(\"nop\"\n: \"a\"(0) )" + 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 "{%\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 "long_variable_name = [1, 2, 3,\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" formats "1\n.as(Int32)" formats "1\n.as(Int32)" - formats "if 1\nelse\n2\nend\n3" formats "if 1\nelse\n2\nend\n3" - 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 "\n# hello\n1" formats "\n# hello\n1" - formats "bar do\n foo <<-X\n bar\n X\nend" formats "bar do\n foo <<-X\n bar\n X\nend" - formats "macro foo\n \\{\nend" formats "macro foo\n \\{\nend" - formats "if 1\n {% for x in y %} {% end %}\nend" formats "if 1\n {% for x in y %} {% end %}\nend" - formats "foo { | a, ( _ , c ) | a + c }" formats "foo { | a, ( _ , c ) | a + c }" - 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 "return( 1 )" formats "return( 1 )" - formats "foo &.as(T).bar" formats "foo &.as(T).bar" - formats "foo a: 1\nb" formats "foo a: 1\nb" - formats "'\\n'" formats "'\\n'" - 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 "{% if z %}\n class Foo\n end\n{% end %}" formats "{% if z %}\n class Foo\n end\n{% end %}" - formats "[1, 2, 3, ]" formats "[1, 2, 3, ]" - formats "foo &.bar.nil?()" formats "foo &.bar.nil?()" + formats "X(typeof(begin\n e.is_a?(Y)\nend))" formats "X(typeof(begin\n e.is_a?(Y)\nend))" + formats " <<-EOF\n 1\n EOF" formats " <<-EOF\n 1\n EOF" + formats "case\nend" formats "case\nend" + formats ":&**" formats ":&**" + formats "x\n# foo\n\n# bar" formats "x\n# foo\n\n# bar" + formats "1 ; 2" formats "1 ; 2" + formats "->{}" formats "->{}" + formats "[\n 1, 2, # foo\n 3, 4,\n]" formats "[\n 1, 2, # foo\n 3, 4,\n]" + 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 "[\n <<-EOF,\n foo\n EOF\n]" formats "[\n <<-EOF,\n foo\n EOF\n]" - formats "foo do # a\n # b\n bar\nend" formats "foo do # a\n # b\n bar\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 "begin\n array[\n 0, # Zero\n ]\nend" formats "begin\n array[\n 0, # Zero\n ]\nend" + formats "1\n.." formats "1\n.." + formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" + formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" + formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" + formats "foo : (Array(String)?) | String" formats "foo : (Array(String)?) | String" + 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 "break 1" formats "break 1" formats "def foo(\n **a\n # comment\n)\n 1\nend" formats "def foo(\n **a\n # comment\n)\n 1\nend" - formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" - formats "asm(\"a\" :::: \"volatile\"\n)" formats "asm(\"a\" :::: \"volatile\"\n)" - formats "1.<=(2) { 3 }" formats "1.<=(2) { 3 }" - formats "1 rescue 2" formats "1 rescue 2" - formats "A = 1\nFOO = 2\n\nEX = 3" formats "A = 1\nFOO = 2\n\nEX = 3" - formats "a-1" formats "a-1" - formats "{% if true %}\n # x\n # y\n{% end %}" formats "{% if true %}\n # x\n # y\n{% end %}" - formats "<<-FOO\nbarfoo\nFOO" formats "<<-FOO\nbarfoo\nFOO" - formats "foo ()" formats "foo ()" - 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 "alias A = (B(C, (C | D)) | E)" formats "alias A = (B(C, (C | D)) | E)" - formats "[\n a(), # b\n]" formats "[\n a(), # b\n]" - formats "%(hello)" formats "%(hello)" - formats "foo[ 1 , 2 ]" formats "foo[ 1 , 2 ]" - formats "begin\n #hola\n 1\nend\n" formats "begin\n #hola\n 1\nend\n" - formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" - formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" - formats "{ {{FOO}}, nil}" formats "{ {{FOO}}, nil}" - 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 "<<-HTML\n hello \n HTML" formats "<<-HTML\n hello \n HTML" - formats "foo.bar(&.%(baz))" formats "foo.bar(&.%(baz))" - 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 " {% for x in y %} 2 {% end %}" formats " {% for x in y %} 2 {% end %}" - formats "[1,\n2,\n3]" formats "[1,\n2,\n3]" - formats "-> : {Int32} { String }" formats "-> : {Int32} { String }" - formats " {{\n1 + 2\n }}" formats " {{\n1 + 2\n }}" - formats "->{}" formats "->{}" - formats "[c.x]\n .foo" formats "[c.x]\n .foo" - formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" - formats "a = case 1\nwhen 2\n3\nend" formats "a = case 1\nwhen 2\n3\nend" - formats "if 1\n2 && 3\nend" formats "if 1\n2 && 3\nend" - formats " [ 1 , 2 , 3 ] " formats " [ 1 , 2 , 3 ] " - formats "def /(x)\n 1\nend" formats "def /(x)\n 1\nend" - formats "def foo ( x ) : Int32 \n end" formats "def foo ( x ) : Int32 \n end" - formats "def foo(\n a,\n b\n)\nend" formats "def foo(\n a,\n b\n)\nend" - formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" - formats "foo(/ /)" formats "foo(/ /)" - formats "begin\n a\nend.b { }\nc" formats "begin\n a\nend.b { }\nc" - formats "[\n 1, 2, # foo\n 3,\n]" formats "[\n 1, 2, # foo\n 3,\n]" - formats "lib Foo\nfun foo() : Int32\nend" formats "lib Foo\nfun foo() : Int32\nend" - formats "foo &.bar.as?(T)" formats "foo &.bar.as?(T)" + 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(1 &+ \n2)" formats "foo(1 &+ \n2)" + formats "foo(\n 1, 2, &block)" formats "foo(\n 1, 2, &block)" + formats "1 + \\\n2" formats "1 + \\\n2" + formats "enum Foo; A = 1; end" formats "enum Foo; A = 1; end" + formats "foo.as ( Int32* )" formats "foo.as ( Int32* )" + formats "if / /\nend" formats "if / /\nend" + formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" + formats "if 1;\n2;\nelse;\n3;\nend" formats "if 1;\n2;\nelse;\n3;\nend" + formats "/foo/" formats "/foo/" + formats "def foo : (A, B) ->\n nil\nend" formats "def foo : (A, B) ->\n nil\nend" + formats "macro foo(x, *, z)\nend" formats "macro foo(x, *, z)\nend" + formats "NamedTuple(a: Int32,)" formats "NamedTuple(a: Int32,)" + formats "break *1" formats "break *1" + formats "foo[&.bar] = 1" formats "foo[&.bar] = 1" + 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 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 "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 "1 if 2\n# foo" formats "1 if 2\n# foo" + formats "a.b &.[c]\n1" formats "a.b &.[c]\n1" + formats "foo(->{\n 1 + 2\n})" formats "foo(->{\n 1 + 2\n})" formats "{ 1 => 2 , 3 => 4 }" formats "{ 1 => 2 , 3 => 4 }" - formats "alias Foo::Bar=Baz" formats "alias Foo::Bar=Baz" - formats "inner &.color=(@color)\n1" formats "inner &.color=(@color)\n1" - formats "begin\n 1 + \\\n 2\n 3\nend" formats "begin\n 1 + \\\n 2\n 3\nend" - formats "foo do | x | \n x \n end" formats "foo do | x | \n x \n end" - formats "1 .. 2" formats "1 .. 2" + formats "foo[bar.baz]\n .qux" formats "foo[bar.baz]\n .qux" + formats "module Foo ( U, *T ); 1; end" formats "module Foo ( U, *T ); 1; end" formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" - formats "def foo ( x : Foo.class ) \n end" formats "def foo ( x : Foo.class ) \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 "\"foo\" \\\n \"bar\"" formats "\"foo\" \\\n \"bar\"" - formats "foo\n .foo1(bar\n .bar1\n .bar2)" formats "foo\n .foo1(bar\n .bar1\n .bar2)" - formats ":&" formats ":&" - formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" - formats "[ * [ * [ 1 ] ], * \n[ 2] ]" formats "[ * [ * [ 1 ] ], * \n[ 2] ]" - formats "extend Foo" formats "extend Foo" - formats "select \n when foo then 2 \n end" formats "select \n when foo then 2 \n end" - formats "a &.b[c]?" formats "a &.b[c]?" - formats "join io, &.inspect" formats "join io, &.inspect" - formats "{\n <<-KEY => 1,\n key\n KEY\n}" formats "{\n <<-KEY => 1,\n key\n KEY\n}" - formats "a.b &.[c]\n1" formats "a.b &.[c]\n1" - formats "@[::Foo::Bar]" formats "@[::Foo::Bar]" - formats "unless a\n2\nelse\nend" formats "unless a\n2\nelse\nend" - formats "foo.bar # comment\n .baz" formats "foo.bar # comment\n .baz" - formats "asm(\"a\" ::: \"f\"\n)" formats "asm(\"a\" ::: \"f\"\n)" - formats "foo.bar do\n baz\n .b\nend" formats "foo.bar do\n baz\n .b\nend" - formats "`foo \#{ bar }`" formats "`foo \#{ bar }`" - formats "if 1 # foo\n2\nend" formats "if 1 # foo\n2\nend" - formats "def foo ( x , y ) \n end" formats "def foo ( x , y ) \n end" - formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" - formats "b &.[c]?.d" formats "b &.[c]?.d" + formats "x : Int32*" formats "x : Int32*" + formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" + formats "return 1 , 2" formats "return 1 , 2" + formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" + formats "enum Foo\nA \nend" formats "enum Foo\nA \nend" + formats "foo &.[](1, 2)" formats "foo &.[](1, 2)" + formats "foo(a: //, b: //)" formats "foo(a: //, b: //)" + formats "foo(&.bar)" formats "foo(&.bar)" + formats "foo(baz1 do\nend)" formats "foo(baz1 do\nend)" + formats "->Foo.foo" formats "->Foo.foo" + formats "unless a\n2\n3\nend" formats "unless a\n2\n3\nend" + formats ":&+" formats ":&+" + 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 "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" + formats "\"foo \#{ __DIR__ }\"" formats "\"foo \#{ __DIR__ }\"" 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 "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "break { {1, 2}, {3, 4} }, 5" formats "break { {1, 2}, {3, 4} }, 5" - formats "next *1 ,2" formats "next *1 ,2" - formats "asm(\"a\" : :: : \"volatile\")" formats "asm(\"a\" : :: : \"volatile\")" - formats "x : Int32[ 8 ]" formats "x : Int32[ 8 ]" - formats "\"\#{\n foo = 1}\"" formats "\"\#{\n foo = 1}\"" - formats "while / /\nend" formats "while / /\nend" - formats "1*2" formats "1*2" - formats "x : Int32**" formats "x : Int32**" + formats "[\n a() # b\n]" formats "[\n a() # b\n]" + formats "foo . is_a? Bar" formats "foo . is_a? Bar" + formats "x : { {A, B}, {C, D} }" formats "x : { {A, B}, {C, D} }" + formats "alias Foo::Bar =Baz" formats "alias Foo::Bar =Baz" + formats "class Foo < \n Bar \n\n 1 \n\nend" formats "class Foo < \n Bar \n\n 1 \n\nend" + formats "lib Foo\n fun Foo = Bar\nend" formats "lib Foo\n fun Foo = Bar\nend" + formats "if a\n2\nelse\nend" formats "if a\n2\nelse\nend" + formats "$~.bar" formats "$~.bar" + formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" + formats "def foo( x , & : Int32 )\nend" formats "def foo( x , & : Int32 )\nend" + formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" + formats "def foo ( x : self ) \n end" formats "def foo ( x : self ) \n end" + formats "foo([\n 1, 2,\n 3, 4,\n])" formats "foo([\n 1, 2,\n 3, 4,\n])" + formats "->Foo.foo?" formats "->Foo.foo?" + formats "$1" formats "$1" + formats "self.as(Int32)" formats "self.as(Int32)" + formats "class Foo;end" formats "class Foo;end" + formats "begin\n 0[1] rescue 2 end" formats "begin\n 0[1] rescue 2 end" + formats " {% for x in y %} 2 {% end %}" formats " {% for x in y %} 2 {% end %}" + formats "foo.bar(&.% baz)" formats "foo.bar(&.% baz)" formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" - formats "foo (1)" formats "foo (1)" - formats "-> :: foo!" formats "-> :: foo!" - 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 "begin\n1\nrescue Int32 \n3\nend" formats "begin\n1\nrescue Int32 \n3\nend" - formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" - formats "def foo( @[MyAnn] v ); end" formats "def foo( @[MyAnn] v ); 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 "->( x )\n:\nInt32 { }" formats "->( x )\n:\nInt32 { }" - formats "1 #=>2" formats "1 #=>2" - formats "enum Foo\n A; B; C\nend\n" formats "enum Foo\n A; B; C\nend\n" - formats "def foo : (A, B) ->\n nil\nend" formats "def foo : (A, B) ->\n nil\nend" - formats "a = 1 + # foo\n2" formats "a = 1 + # foo\n2" - 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 "<<-FOO\nbarfoobar\nFOO" formats "<<-FOO\nbarfoobar\nFOO" - formats "->Foo.foo" formats "->Foo.foo" - formats "foo(baz1 do\nend)" formats "foo(baz1 do\nend)" + formats "foo(\"bar\" \\\n\"baz\")" formats "foo(\"bar\" \\\n\"baz\")" + 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 "foo ( )" formats "foo ( )" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" - formats "+ 1" formats "+ 1" - formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" - formats "if a\nif b\n3\nelse\n4\nend\nend" formats "if a\nif b\n3\nelse\n4\nend\nend" - formats "lib Foo\nunion Foo\nend\nend" formats "lib Foo\nunion Foo\nend\nend" - formats "lib Foo\nfun foo () : Int32\nend" formats "lib Foo\nfun foo () : Int32\nend" - formats "call(foo <<-X\nbar\nX\n)" formats "call(foo <<-X\nbar\nX\n)" - formats "module Foo\n# nothing\nend" formats "module Foo\n# nothing\nend" - formats "is_a? Foo" formats "is_a? Foo" - formats "macro foo( x = 1, y = 2, &block)\nend" formats "macro foo( x = 1, y = 2, &block)\nend" - formats "foo(->do\n 1 + 2\nend)" formats "foo(->do\n 1 + 2\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 "foo 1" formats "foo 1" - formats "foo.as? ( Int32* )" formats "foo.as? ( Int32* )" - formats "foo ((1) ? 2 : 3)" formats "foo ((1) ? 2 : 3)" - formats "foo \"bar\": 1, \"baz qux\": 2" formats "foo \"bar\": 1, \"baz qux\": 2" - formats "foo &.responds_to?(:foo).bar" formats "foo &.responds_to?(:foo).bar" - formats "foo.bar. as Int32" formats "foo.bar. as Int32" - formats "unless a\n2\n3\nelse\n4\n5\nend" formats "unless a\n2\n3\nelse\n4\n5\nend" - formats "" formats "" - formats "[\n# foo\n] of String" formats "[\n# foo\n] of String" - formats "def foo(x : X) forall X , Y; end" formats "def foo(x : X) forall X , Y; end" - formats "module Foo;end" formats "module Foo;end" - formats "foo(bar(baz3 do\nend))" formats "foo(bar(baz3 do\nend))" - formats "foo(\n 1,\n) do\n 2\nend" formats "foo(\n 1,\n) do\n 2\nend" - formats "foo do;\n1; end" formats "foo do;\n1; end" - 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 "macro foo\n {% unless 1 %} 2 {% end %}\nend" formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" - formats "[] of (Array(T))" formats "[] of (Array(T))" - formats "def foo(x : (A | B)) \n end" formats "def foo(x : (A | B)) \n end" - formats "foo 1,\na: 1,\nb: 2,\nc: 3" formats "foo 1,\na: 1,\nb: 2,\nc: 3" - formats "page= <<-HTML\n \#{1}foo\nHTML" formats "page= <<-HTML\n \#{1}foo\nHTML" - formats "case 1\nend" formats "case 1\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 &.bar do\n 1 + 2\nend" formats "foo &.bar do\n 1 + 2\nend" - formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y : Int32\nend\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 "x : (A | B)" formats "x : (A | B)" + formats "class Foo ( *T, U )\nend" formats "class Foo ( *T, U )\nend" + formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" + formats "[1, 2, 3, ]" formats "[1, 2, 3, ]" + formats "foo do # hello\nend" formats "foo do # hello\nend" + formats "break 1, {2, 3}" formats "break 1, {2, 3}" + formats "String?" formats "String?" + formats "foo &.nil?" formats "foo &.nil?" + formats "inner &.color=(@color)\n1" formats "inner &.color=(@color)\n1" + formats "bla.select(&.all?{ |x| x } )" formats "bla.select(&.all?{ |x| x } )" + formats " {{\n1 + 2 }}" formats " {{\n1 + 2 }}" + formats "1 + \\\n2 + \\\n3" formats "1 + \\\n2 + \\\n3" + formats "lib Foo\nfun foo\nend" formats "lib Foo\nfun foo\nend" + formats "/foo \#{ bar }/" formats "/foo \#{ bar }/" + formats "macro foo\n {{1 + 2}}\nend" formats "macro foo\n {{1 + 2}}\nend" + formats "alias A = ({A, (B)})" formats "alias A = ({A, (B)})" + 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 "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" formats "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" + formats "select \n when foo \n 2 \n end" formats "select \n when foo \n 2 \n end" + formats "x : {A, B, }" formats "x : {A, B, }" + formats "NamedTuple(\n a: Int32,\n)" formats "NamedTuple(\n a: Int32,\n)" + formats "asm(\"a\" : :: : \"volatile\")" formats "asm(\"a\" : :: : \"volatile\")" + formats "def foo : A(B)\n nil\nend" formats "def foo : A(B)\n nil\nend" + formats "x = a do\n 1 ||\n 2\nend" formats "x = a do\n 1 ||\n 2\nend" + formats "a(&.b.c.as C)" formats "a(&.b.c.as C)" + 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 "nil?" formats "nil?" + formats "foo(\n 1,\n a: 1,\n b: 2,\n)" formats "foo(\n 1,\n a: 1,\n b: 2,\n)" + formats "a || b" formats "a || b" + formats "foo(1, ) do\nend" formats "foo(1, ) do\nend" + formats "~ 1" formats "~ 1" + formats "a = if 1\n2\nelse\n3\nend" formats "a = if 1\n2\nelse\n3\nend" + formats "if 1\n2\nelsif\n3\n4\nend" formats "if 1\n2\nelsif\n3\n4\nend" + formats "foo[a, b: 2]" formats "foo[a, b: 2]" + formats "def foo( & \n )\nend" formats "def foo( & \n )\nend" + formats "->foo" formats "->foo" + formats "foo(\n 1,\n 2\n) do\n 1\nend" formats "foo(\n 1,\n 2\n) do\n 1\nend" + formats "foo.[] =1" formats "foo.[] =1" + formats "asm(\"nop\" :: )" formats "asm(\"nop\" :: )" + formats "a &.b[c]?" formats "a &.b[c]?" + formats "[1, 2,\n 3, 4]\n" formats "[1, 2,\n 3, 4]\n" formats "getter foo : Int32 # comment\n\ndef foo\nend" formats "getter foo : Int32 # comment\n\ndef foo\nend" - formats "10**a" formats "10**a" + formats " {{\n1 + 2\n }}" formats " {{\n1 + 2\n }}" + 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 "macro foo()\n {% if 1 %} 2 {% end %}\nend" formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" + formats "x = uninitialized Int32" formats "x = uninitialized Int32" + formats "->Foo.foo=" formats "->Foo.foo=" + formats "{% if z %}\n class Foo\n end\n{% end %}" formats "{% if z %}\n class Foo\n end\n{% end %}" + formats "foo[x: 1, &.bar] = 1" formats "foo[x: 1, &.bar] = 1" + formats "class Foo\n# nothing\nend" formats "class Foo\n# nothing\nend" + formats "asm(\"a\" :: : : \"volatile\")" formats "asm(\"a\" :: : : \"volatile\")" + 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 "macro foo\n {{ 1 + 2 }}\\\nend" formats "macro foo\n {{ 1 + 2 }}\\\nend" + formats "1.as? Int32" formats "1.as? Int32" + formats "@[Foo( 1, 2 )]" formats "@[Foo( 1, 2 )]" + formats "begin\n 1 + \\\n 2\n 3\nend" formats "begin\n 1 + \\\n 2\n 3\nend" + formats "x.is_a? T\n3\n" formats "x.is_a? T\n3\n" + formats "if 1\n[ 1 , 2 , 3 ]\nend" formats "if 1\n[ 1 , 2 , 3 ]\nend" + formats "\"\\a\\c\#{foo}\\b\\d\"" formats "\"\\a\\c\#{foo}\\b\\d\"" + formats "case 1\nwhen a; 2\nelse; ; b\nend" formats "case 1\nwhen a; 2\nelse; ; b\nend" + formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" + formats "@[Foo( 1, 2, foo: 3 )]" formats "@[Foo( 1, 2, foo: 3 )]" + formats "\"hel\\nlo\"" formats "\"hel\\nlo\"" + formats "alias Foo::Bar= Baz" formats "alias Foo::Bar= Baz" + formats "def foo( x , & block : Int32 )\nend" formats "def foo( x , & block : Int32 )\nend" + formats "class Foo; 1; end" formats "class Foo; 1; end" + formats "foo.as(T).bar" formats "foo.as(T).bar" formats "->{\nx\n}" formats "->{\nx\n}" - formats "foo([\n 1, 2,\n 3, 4,\n])" formats "foo([\n 1, 2,\n 3, 4,\n])" - formats "macro foo( x , y )\nend" formats "macro foo( x , y )\nend" - formats "\"foo \#{ 1 } \#{ __DIR__ }\"" formats "\"foo \#{ 1 } \#{ __DIR__ }\"" - formats " <<-HTML\n hello \n world \n HTML" formats " <<-HTML\n hello \n world \n HTML" - 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 "case nil\nelse nil; nil # comment\nend" formats "case nil\nelse nil; nil # comment\nend" - formats "foo[] =1" formats "foo[] =1" - formats "case\nend" formats "case\nend" - formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" - formats "-> : Array(Int32) {}" formats "-> : Array(Int32) {}" - formats "&+ 1" formats "&+ 1" - formats "next *1 , *2" formats "next *1 , *2" - formats "next { {1, 2}, {3, 4} }, 5" formats "next { {1, 2}, {3, 4} }, 5" - formats "foo do \n x \n end" formats "foo do \n x \n end" - formats "foo[bar.baz]\n .qux" formats "foo[bar.baz]\n .qux" - formats "if 1;\n2; end" formats "if 1;\n2; end" - 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 "def foo(@[MyAnn] &block); end" formats "def foo(@[MyAnn] &block); end" - formats "def foo(x y)\nend" formats "def foo(x y)\nend" - formats "class Actor\n macro inherited\nend\nend\n" formats "class Actor\n macro inherited\nend\nend\n" - formats "{ 1 => 2 ,\n 3 => 4 }" formats "{ 1 => 2 ,\n 3 => 4 }" - formats "alias A = (B) -> C" formats "alias A = (B) -> C" - formats "def foo : Int32\n 1\nend" formats "def foo : Int32\n 1\nend" - formats "foo(1,\n2,\n)" formats "foo(1,\n2,\n)" - formats "<<-FOO\nfoo\n1\nFOO" formats "<<-FOO\nfoo\n1\nFOO" - formats "foo[&.bar]" formats "foo[&.bar]" - formats "case 1 \n when 2 \n 3 \n end" formats "case 1 \n when 2 \n 3 \n end" - formats "def foo\n 1\n #\n\n\nrescue\nend" formats "def foo\n 1\n #\n\n\nrescue\nend" - formats "def foo(x : A(B), y)\nend" formats "def foo(x : A(B), y)\nend" - formats "def foo(x, **z)\nend" formats "def foo(x, **z)\nend" - formats "1 #=> 2" formats "1 #=> 2" - formats "Foo( x: Int32 , y: Float64 )" formats "Foo( x: Int32 , y: Float64 )" - formats "foo(1, 2,\n)" formats "foo(1, 2,\n)" - formats "1 + \n2" formats "1 + \n2" - formats "foo.\nbar" formats "foo.\nbar" - formats "@[Foo]\ndef foo\nend" formats "@[Foo]\ndef foo\nend" - formats ":\"foo bar\"" formats ":\"foo bar\"" + formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" formats "foo(//, //)" formats "foo(//, //)" - formats "macro foo(x, *, z)\nend" formats "macro foo(x, *, z)\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 "if 1\n foo(\n bar\n # comment\n )\nend" formats "if 1\n foo(\n bar\n # comment\n )\nend" - formats "asm(\"a\" :: \"d\"(e)\n)" formats "asm(\"a\" :: \"d\"(e)\n)" - formats "asm(\"nop\")" formats "asm(\"nop\")" - formats "lib Foo\n fun foo(Int32) : Int32\nend" formats "lib Foo\n fun foo(Int32) : Int32\nend" - formats "return 1\n# end" formats "return 1\n# end" - formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" - formats "a = foo &.bar do\n 1 + 2\nend" formats "a = foo &.bar do\n 1 + 2\nend" - formats "/foo/imx" formats "/foo/imx" - formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" - formats "foo(1, &.bar)" formats "foo(1, &.bar)" - 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 "{%\n unless true\n 1\n end\n%}" formats "{%\n unless true\n 1\n end\n%}" - formats "(a).b { }\nc" formats "(a).b { }\nc" - formats "x[ y ] += 1" formats "x[ y ] += 1" - 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 "foo . bar()" formats "foo . bar()" + formats "{\n a: 1,\n foo: bar,\n}" formats "{\n a: 1,\n foo: bar,\n}" + formats "def foo(**z, &block)\nend" formats "def foo(**z, &block)\nend" + formats "1 + 2" formats "1 + 2" formats "if a\nif b\nelse\n4\nend\nend" formats "if a\nif b\nelse\n4\nend\nend" - formats "$?.bar" formats "$?.bar" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar\n); end" - 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 "def x(@y = ->(z) {})\nend" formats "def x(@y = ->(z) {})\nend" - assert assert - formats "foo bar:baz, qux:other" formats "foo bar:baz, qux:other" - formats "1\nyield\n2" formats "1\nyield\n2" - formats "alias X = (A, B) ->\nbar : C" formats "alias X = (A, B) ->\nbar : C" - formats "return { 1 , 2 }" formats "return { 1 , 2 }" - formats "if 1\n[\n a() # b\n]\nend" formats "if 1\n[\n a() # b\n]\nend" - formats "foo : Foo * * * * *" formats "foo : Foo * * * * *" + formats "1 .. 2" formats "1 .. 2" + formats "[] of Foo" formats "[] of Foo" + 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 "{ 1 => 2 }" formats "{ 1 => 2 }" + formats "return 1 , *2" formats "return 1 , *2" + formats "macro foo(\n a,\n *b,\n)\nend" formats "macro foo(\n a,\n *b,\n)\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 "def foo()\n1\nend" formats "def foo()\n1\nend" + formats "foo(baz(x, y) do\n 1 + 2\nend)" formats "foo(baz(x, y) do\n 1 + 2\nend)" + formats "return 1\n# end" formats "return 1\n# end" + formats ":*" formats ":*" + formats "a = foo(baz1 do\nend)" formats "a = foo(baz1 do\nend)" formats "1" formats "1" - formats "break 1" formats "break 1" - formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" - formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" - formats "x : Int32" formats "x : Int32" - formats "FOO = 2 + 3\nA = 1 - 10" formats "FOO = 2 + 3\nA = 1 - 10" - 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 "case 1\nwhen a; 2\nelse; ; b\nend" formats "case 1\nwhen a; 2\nelse; ; b\nend" - formats "foo.as? Int32*" formats "foo.as? Int32*" - formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" - formats "1.!= { 3 }" formats "1.!= { 3 }" - formats "yield( 1 , 2 )" formats "yield( 1 , 2 )" - formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" - formats "{%\n if 1\n 2\n end\n%}" formats "{%\n if 1\n 2\n end\n%}" - formats "foo(\"bar\" \\\n\"baz\")" formats "foo(\"bar\" \\\n\"baz\")" - formats "foo.bar(&.% baz)" formats "foo.bar(&.% baz)" + formats "lib Foo\n fun foo(Int32) : Int32\nend" formats "lib Foo\n fun foo(Int32) : Int32\nend" + formats "1 ensure 2" formats "1 ensure 2" + formats "10**a" formats "10**a" + formats "foo a: 1\nb" formats "foo a: 1\nb" + formats "->(x : Int32) { }" formats "->(x : Int32) { }" + formats "def foo=(x)\nend" formats "def foo=(x)\nend" + formats "foo.[]" formats "foo.[]" + formats "foo(\n1,\n\n 2 \n)" formats "foo(\n1,\n\n 2 \n)" + formats "foo.bar += \n1" formats "foo.bar += \n1" + formats "foo a , *b" formats "foo a , *b" + formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" + formats "-> : Int32 {}" formats "-> : Int32 {}" + formats "foo = 1\n->foo.[]=(Int32)" formats "foo = 1\n->foo.[]=(Int32)" + formats "1.==(2) { 3 }" formats "1.==(2) { 3 }" + formats "def foo\n1\nrescue\n2\nend" formats "def foo\n1\nrescue\n2\nend" + formats "foo . bar = 1" formats "foo . bar = 1" + formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" + formats "a = 1\na ||= begin\n 1\nend" formats "a = 1\na ||= begin\n 1\nend" + formats "foo { |x| (x).a }" formats "foo { |x| (x).a }" + formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" + formats "+ 1" formats "+ 1" + formats "def foo(a : T) forall T \n #\nend" formats "def foo(a : T) forall T \n #\nend" + formats "foo(\n 1,\n # 2,\n # 3,\n)" formats "foo(\n 1,\n # 2,\n # 3,\n)" + 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 = [1, [2,\n 3],\n 4]" formats "foo = [1, [2,\n 3],\n 4]" + formats "asm(\"a\" :: \"d\"(e)\n)" formats "asm(\"a\" :: \"d\"(e)\n)" + formats "macro foo\n %foo\nend" formats "macro foo\n %foo\nend" + formats ":foo" formats ":foo" + formats "foo \"bar\": 1, \"baz qux\": 2" formats "foo \"bar\": 1, \"baz qux\": 2" + formats "macro []=(x, y)\nend" formats "macro []=(x, y)\nend" + formats "while 1\n2 # foo\nend" formats "while 1\n2 # foo\nend" + formats "args.any? &.name.baz" formats "args.any? &.name.baz" formats "(1 .. )" formats "(1 .. )" - formats "x : Int32*" formats "x : Int32*" - formats "a &.b.as C" formats "a &.b.as C" - formats "x : A?" formats "x : A?" - formats " <<-HTML\n \#{1}\n HTML" formats " <<-HTML\n \#{1}\n HTML" + formats "foo[x: 1, &.bar]?" formats "foo[x: 1, &.bar]?" + formats "-> : Int32 | String { 1 }" formats "-> : Int32 | String { 1 }" + formats "as Foo" formats "as Foo" + formats "def foo(x) : Int32 # bar\n # baz\nend" formats "def foo(x) : Int32 # bar\n # baz\nend" + formats "foo &.[]" formats "foo &.[]" + formats "foo &.responds_to?(:foo).bar" formats "foo &.responds_to?(:foo).bar" + formats "foo(1, &.bar)" formats "foo(1, &.bar)" + formats "class Actor\n macro inherited\n\nend\nend\n" formats "class Actor\n macro inherited\n\nend\nend\n" + formats "def foo ( @x, @y) \n end" formats "def foo ( @x, @y) \n end" + formats " <<-HTML\n hello \n world \n HTML" formats " <<-HTML\n hello \n world \n HTML" + formats "foo.bar=(2)\n1" formats "foo.bar=(2)\n1" + formats "[1,\n2,\n3\n]" formats "[1,\n2,\n3\n]" + 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 "while 1\n2\nend" formats "while 1\n2\nend" + 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 "\"\#{foo = 1\n}\"" formats "\"\#{foo = 1\n}\"" + 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 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" + formats "$1?" formats "$1?" + formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" + formats "foo 1,\n2" formats "foo 1,\n2" + formats "1 ? 2 : 3" formats "1 ? 2 : 3" + formats "def foo \n end" formats "def foo \n end" + formats "1 #foo \n2 #bar" formats "1 #foo \n2 #bar" + formats "macro foo\n {%1 + 2%}\\\nend" formats "macro foo\n {%1 + 2%}\\\nend" + formats "def foo(&: Int32)\nend" formats "def foo(&: Int32)\nend" + formats "a-1" formats "a-1" + formats "begin\n 1 \\\n + 2\n 3\nend" formats "begin\n 1 \\\n + 2\n 3\nend" + formats "Foo::Bar(T, U?)?" formats "Foo::Bar(T, U?)?" + formats "\"foo \#{ 1 + 2 }\"" formats "\"foo \#{ 1 + 2 }\"" + formats "private def foo\nend\nprivate def bar\nend" formats "private def foo\nend\nprivate def bar\nend" + formats "%{hello}" formats "%{hello}" + formats "macro foo\nend" formats "macro foo\nend" + formats "def foo ( x ) \n end" formats "def foo ( x ) \n end" + formats "if 1\n {% for x in y %} {% end %}\nend" formats "if 1\n {% for x in y %} {% end %}\nend" + assert assert + formats "unless a\n2\nelse\n3\nend" formats "unless a\n2\nelse\n3\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 "begin\nend\n\n# a\n" formats "begin\nend\n\n# a\n" + formats "x : A | B" formats "x : A | B" + 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 "is_a? Foo" formats "is_a? Foo" + formats "macro foo\n \\{\nend" formats "macro foo\n \\{\nend" formats "foo \\\n 1,\n 2" formats "foo \\\n 1,\n 2" - 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 "lib Foo\nend" formats "lib Foo\nend" - formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" - formats "def foo ( x ,\n y ) \n end" formats "def foo ( x ,\n y ) \n end" - 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 "\" \" * 2" formats "\" \" * 2" - formats "::foo(1, 2)" formats "::foo(1, 2)" - formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" - formats "lib Bar\n enum Foo\n A\n end\nend" formats "lib Bar\n enum Foo\n A\n end\nend" - formats "responds_to? :foo" formats "responds_to? :foo" - formats "def foo\n# hello\n1\nend" formats "def foo\n# hello\n1\nend" - formats "def foo(@[AnnOne] @[AnnTwo] & ); end" formats "def foo(@[AnnOne] @[AnnTwo] & ); end" - 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 "self.as(Int32)" formats "self.as(Int32)" - formats "1.== { 3 }" formats "1.== { 3 }" - 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\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 "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" formats "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" - formats "module M\n @[MyAnn(\n 1\n\n )]\nend" formats "module M\n @[MyAnn(\n 1\n\n )]\nend" - formats "foo = 1\n->foo.foo!" formats "foo = 1\n->foo.foo!" + formats "def foo : Int32\n 1\nend" formats "def foo : Int32\n 1\nend" + formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" + formats "Foo( )" formats "Foo( )" + formats "macro foo\n {{ 1 + 2 }}\nend" formats "macro foo\n {{ 1 + 2 }}\nend" + formats "a&-1" formats "a&-1" + formats "@[ Foo(foo: 1) ]\ndef foo\nend" formats "@[ Foo(foo: 1) ]\ndef foo\nend" + formats "foo[ 1 , 2 ]" formats "foo[ 1 , 2 ]" + formats "instance_sizeof( Int32 )" formats "instance_sizeof( Int32 )" + formats "if 1\n[\n a() # b\n]\nend" formats "if 1\n[\n a() # b\n]\nend" + formats "a = foo &.bar do\n 1 + 2\nend" formats "a = foo &.bar do\n 1 + 2\nend" adds trailing comma to def multi-line normal, splat, and double splat parameters - formats "def foo(\n a,\n *b\n)\nend" formats "def foo(\n a,\n *b\n)\nend" - formats "def foo(a, &block)\nend" formats "def foo(a, &block)\nend" + formats "def foo(a, b)\nend" formats "def foo(a, b)\nend" formats "def foo(\n a, b\n)\nend" formats "def foo(\n a, b\n)\nend" - formats "macro foo(\n a,\n *b\n)\nend" formats "macro foo(\n a,\n *b\n)\nend" - formats "def foo(a)\nend" formats "def foo(a)\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 &block\n)\nend" formats "def foo(\n a,\n &block\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,\n b c\n)\nend" formats "def foo(\n a,\n b c\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 "macro foo(\n a,\n b\n)\nend" formats "macro 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, # Foo\n b # Bar\n)\nend" formats "def foo(\n a, # Foo\n b # Bar\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(a, *args, &block)\nend" formats "def foo(a, *args, &block)\nend" formats "def foo(a, *args)\nend" formats "def foo(a, *args)\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 "def foo(a, &block)\nend" formats "def foo(a, &block)\nend" formats "def foo(a, **kwargs)\nend" formats "def foo(a, **kwargs)\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,\n @[Ann] b\n)\nend" formats "def foo(\n a,\n @[Ann] b\n)\nend" + formats "def foo(a)\nend" formats "def foo(a)\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,\n)\nend" formats "def foo(\n a,\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 "def foo(\n a, # Foo\n b # Bar\n)\nend" formats "def foo(\n a, # Foo\n b # Bar\n)\nend" formats "def foo(\n a,\n b\n)\nend" formats "def foo(\n a,\n b\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(\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 "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(a, b)\nend" formats "def foo(a, b)\nend" - formats "def foo(a, *args, &block)\nend" formats "def foo(a, *args, &block)\nend" - formats "case 1\nwhen 2 # a\n # b\nend" formats "case 1\nwhen 2 # a\n # b\nend" - formats "def foo\n@x = uninitialized Int32\nend" formats "def foo\n@x = uninitialized Int32\nend" - formats "foo.@bar" formats "foo.@bar" - formats "pointerof( @a )" formats "pointerof( @a )" - formats "foo &.[]?(1, 2)" formats "foo &.[]?(1, 2)" - formats "0u64" formats "0u64" - formats "[\n a(),\n]" formats "[\n a(),\n]" - formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" - formats "def foo(@[MyAnn] & : String -> Nil); end" formats "def foo(@[MyAnn] & : String -> Nil); end" - formats "def foo( x , & : Int32 )\nend" formats "def foo( x , & : Int32 )\nend" - formats "&- 1" formats "&- 1" - formats "<<-HTML\n \#{1}x\n y\n HTML" formats "<<-HTML\n \#{1}x\n y\n HTML" - formats "foo.[ 1, 2 ]?" formats "foo.[ 1, 2 ]?" - formats "if 1\n2\nelsif\n3\n4\nend" formats "if 1\n2\nelsif\n3\n4\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 "abstract class Foo\nend" formats "abstract class Foo\nend" + formats "def foo(\n a,\n b c\n)\nend" formats "def foo(\n a,\n b c\n)\nend" + formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" + formats "fun foo(\n a : Int32,\n ...\n)\nend" formats "fun foo(\n a : Int32,\n ...\n)\nend" + formats "x.try &.[]= 123, 456" formats "x.try &.[]= 123, 456" + formats "::NamedTuple()" formats "::NamedTuple()" + formats "foo . bar" formats "foo . bar" + formats "%[hello]" formats "%[hello]" + formats "lib Foo\nend" formats "lib Foo\nend" + formats "foo = 1\n->foo.bar(Int32)" formats "foo = 1\n->foo.bar(Int32)" + 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 "def foo(a : T, b : U) forall T, U #\n #\nend" formats "def foo(a : T, b : U) forall T, U #\n #\nend" + 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 &.baz( 1 , 2 )" formats "foo.bar &.baz( 1 , 2 )" + formats "begin\n ()\nend" formats "begin\n ()\nend" + formats "foo(\n 1, 2)" formats "foo(\n 1, 2)" + formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" + formats "foo(->do\n 1 + 2\nend)" formats "foo(->do\n 1 + 2\nend)" + formats "%w{one( two( three)}" formats "%w{one( two( three)}" + formats "include Foo" formats "include Foo" + formats "def foo\n 1\n # Comment\n\n\nend" formats "def foo\n 1\n # Comment\n\n\nend" + formats "foo {;;1}" formats "foo {;;1}" + formats "->@foo.foo" formats "->@foo.foo" + formats "if 1\n {{1 + 2}}\nend" formats "if 1\n {{1 + 2}}\nend" + formats "class Foo\nx = 1\nend" formats "class Foo\nx = 1\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 "begin\n1\n2\n3\nend" formats "begin\n1\n2\n3\nend" + formats "SomeLib.UppercasedFunCall 1, 2" formats "SomeLib.UppercasedFunCall 1, 2" + formats "foo (1), 2" formats "foo (1), 2" + 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 "if 1\n node.is_a?(T)\nend" formats "if 1\n node.is_a?(T)\nend" + formats ":\"foo\"" formats ":\"foo\"" + formats "a=1" formats "a=1" + formats "class Foo ( T )\nend" formats "class Foo ( T )\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 "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 "あ.い, う.え.お = 1, 2" formats "あ.い, う.え.お = 1, 2" + formats "x : Int32 = 1" formats "x : Int32 = 1" + 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 "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 "class X\n annotation FooAnnotation \n end \n end" formats "class X\n annotation FooAnnotation \n end \n end" + formats "Foo::Bar?" formats "Foo::Bar?" + formats "offsetof( String, @length )" formats "offsetof( String, @length )" + formats "1\nyield\n2" formats "1\nyield\n2" + 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 "@x[ 1 ] += 2" formats "@x[ 1 ] += 2" + formats "foo.foo1(\n bar\n .bar1\n .bar2)" formats "foo.foo1(\n bar\n .bar1\n .bar2)" + formats "class Foo\n # ```\n # 1\n # ```\nend\n" formats "class Foo\n # ```\n # 1\n # ```\nend\n" + formats "foo \\\nbar" formats "foo \\\nbar" + formats "1.!= do\nend" formats "1.!= do\nend" + formats "asm(\"a\" ::: \"f\"\n)" formats "asm(\"a\" ::: \"f\"\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 "while true\n1\n\n# foo\nend" formats "while true\n1\n\n# foo\nend" + formats "if 1\n {% if 2 %} {% end %}\nend" formats "if 1\n {% if 2 %} {% end %}\nend" + formats "foo(a: //)" formats "foo(a: //)" + formats "[\n] of \n Foo " formats "[\n] of \n Foo " + formats "break {1, 2}, 3" formats "break {1, 2}, 3" + formats "def foo\n1\nend" formats "def foo\n1\nend" + formats "<<-HTML\n \#{__FILE__}\n HTML" formats "<<-HTML\n \#{__FILE__}\n HTML" + formats ":-" formats ":-" + formats "1.=== { 3 }" formats "1.=== { 3 }" + formats "@x &&= 1" formats "@x &&= 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 "1 if 2\n# foo" formats "1 if 2\n# foo" - formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" - 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 "def foo(*y, **z)\nend" formats "def foo(*y, **z)\nend" - formats "1 ensure 2" formats "1 ensure 2" + formats "alias A = (B) -> C" formats "alias A = (B) -> C" + formats "1\n..2" formats "1\n..2" + formats "module Foo\n1\n\n# foo\nend" formats "module Foo\n1\n\n# foo\nend" + formats "\"hel\nlo\"" formats "\"hel\nlo\"" + formats "foo.[ 1 , 2 ] =3" formats "foo.[ 1 , 2 ] =3" + formats "foo 1 , &bar" formats "foo 1 , &bar" + formats "def foo(x, *, z)\nend" formats "def foo(x, *, z)\nend" + formats "foo : A(B)\nbar : C" formats "foo : A(B)\nbar : C" + formats "\"\" + <<-END\n bar\n END" formats "\"\" + <<-END\n bar\n END" + formats "-> :: Foo . foo=" formats "-> :: Foo . foo=" + formats "-> : Int32 {}" formats "-> : Int32 {}" + formats "def foo\nend\n\n\n\ndef bar\nend" formats "def foo\nend\n\n\n\ndef bar\nend" formats "a = case 1\nwhen 2\n3\nelse\n4\nend" formats "a = case 1\nwhen 2\n3\nelse\n4\nend" - 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 "a = \\\n # foo\n nil" formats "a = \\\n # foo\n nil" - formats "foo . responds_to?( :bar )" formats "foo . responds_to?( :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, *, y, **z)\nend" formats "def foo(x, *, y, **z)\nend" - formats "foo : self? | A" formats "foo : self? | A" - formats "foo (1; 2)" formats "foo (1; 2)" - formats "a = if 1\n2\n3\nend" formats "a = if 1\n2\n3\nend" - formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" - formats "b &.[c].d" formats "b &.[c].d" - formats "foo.as?(T).bar" formats "foo.as?(T).bar" - formats "::NamedTuple(T)" formats "::NamedTuple(T)" - formats "foo &.bar" formats "foo &.bar" - formats "def foo(**z : Foo)\nend" formats "def foo(**z : Foo)\nend" - formats "foo(1, ) { }" formats "foo(1, ) { }" - formats "def foo(x) : Int32 # bar\n # baz\nend" formats "def foo(x) : Int32 # bar\n # baz\nend" - formats "String?" formats "String?" - 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 "if 1\nelse\n# nothing\nend" formats "if 1\nelse\n# nothing\nend" - formats " * a = 1 " formats " * a = 1 " - formats "1 #foo \n2 #bar" formats "1 #foo \n2 #bar" - formats "foo &.bar.as(T)" formats "foo &.bar.as(T)" - formats "x : { {A, B}, {C, D} }" formats "x : { {A, B}, {C, D} }" - formats "def foo ( x ) \n end" formats "def foo ( x ) \n end" - formats ":|" formats ":|" - 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 "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" - formats "alias X = ((Y, Z) ->)" formats "alias X = ((Y, Z) ->)" - formats "Foo:: Bar" formats "Foo:: Bar" - formats "macro foo\n {{ 1 + 2 }}\\\n 1\n end" formats "macro foo\n {{ 1 + 2 }}\\\n 1\n end" - formats "1\n2\n# foo" formats "1\n2\n# foo" - formats "foo &.[](1, 2)" formats "foo &.[](1, 2)" - 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{|x| x}" formats "foo{|x| x}" - formats "->{1}" formats "->{1}" + formats "a = # foo\n bar(1)" formats "a = # foo\n bar(1)" + formats "{% if true %}\n # x\n{% end %}" formats "{% if true %}\n # x\n{% end %}" + formats "foo { | a, ( b , (c, d) ) | a + b + c }" formats "foo { | a, ( b , (c, d) ) | a + b + c }" + formats "- 1" formats "- 1" + formats "def foo(a,\n &block)\nend" formats "def foo(a,\n &block)\nend" + formats "def +(x)\nend" formats "def +(x)\nend" formats "break { 1 , 2 }" formats "break { 1 , 2 }" - formats "a+1" formats "a+1" - formats "macro foo(\n a,\n *b,\n)\nend" formats "macro foo(\n a,\n *b,\n)\nend" - formats "@x &&= 1" formats "@x &&= 1" - formats "a&+1" formats "a&+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 "alias A = ( A | B )" formats "alias A = ( A | B )" - formats "foo = 1\n->foo.bar(Int32*)" formats "foo = 1\n->foo.bar(Int32*)" - formats "a = foo(bar(baz3 do\nend))" formats "a = foo(bar(baz3 do\nend))" - formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" - formats "{ # foo\n 1 => 2,\n}" formats "{ # foo\n 1 => 2,\n}" - formats "def foo(\nx, #foo\nz #bar\n)\nend" formats "def foo(\nx, #foo\nz #bar\n)\nend" + formats "next {1, 2}, 3" formats "next {1, 2}, 3" + formats "def foo(x) forall T # bar\n # baz\nend" formats "def foo(x) forall T # bar\n # baz\nend" + formats "a = b = 1\na, b =\n b, a" formats "a = b = 1\na, b =\n b, a" + formats "#### ###" formats "#### ###" + formats ":&-" formats ":&-" + formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" + formats "def foo : self | Nil\n nil\nend" formats "def foo : self | Nil\n nil\nend" + formats "page= <<-HTML\n foo\nHTML" formats "page= <<-HTML\n foo\nHTML" + formats "def foo(x) # bar\n # baz\nend" formats "def foo(x) # bar\n # baz\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 "<<-HTML\n foo\n \#{\"foo\"}\n HTML" formats "<<-HTML\n foo\n \#{\"foo\"}\n HTML" - formats "\n\n1" formats "\n\n1" - formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" - formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" - formats "foo . is_a? Bar" formats "foo . is_a? Bar" - formats "()" formats "()" - formats "{ * 1 * 2,\n*\n3, 4 }" formats "{ * 1 * 2,\n*\n3, 4 }" - formats "def foo\n # Comment\n\n\nend" formats "def foo\n # Comment\n\n\nend" - formats "foo &bar" formats "foo &bar" - formats "->@foo.foo=" formats "->@foo.foo=" - formats "[1, 2, 3] of Foo" formats "[1, 2, 3] of Foo" + formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" + formats "1.===() { 3 }" formats "1.===() { 3 }" + formats "1 \\\n+ 2" formats "1 \\\n+ 2" + formats "def foo : Int32 \n end" formats "def foo : Int32 \n end" + formats "break( *1 , *2 )" formats "break( *1 , *2 )" + 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 "1 ... 2" formats "1 ... 2" + formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" + formats "(1)" formats "(1)" + formats "foo[1, &.bar] ||= 1" formats "foo[1, &.bar] ||= 1" + formats "macro foo=(x)\nend" formats "macro foo=(x)\nend" + formats "->foo?" formats "->foo?" + formats "asm(\"a\" : : :: \"volatile\")" formats "asm(\"a\" : : :: \"volatile\")" + formats "foo(a: 1 // 2)" formats "foo(a: 1 // 2)" + formats "-> : Int32? {}" formats "-> : Int32? {}" + formats "foo(1, ) { }" formats "foo(1, ) { }" + formats "b &.[c]?.d" formats "b &.[c]?.d" formats "x : Int32 |\nString" formats "x : Int32 |\nString" - formats "foo = 1\n->foo.foo=" formats "foo = 1\n->foo.foo=" - formats "foo.bar += \n1" formats "foo.bar += \n1" - formats "{ %w() }" formats "{ %w() }" - formats "foo\n .bar(\n 1\n )" formats "foo\n .bar(\n 1\n )" - formats "def foo(**a,)\n 1\nend" formats "def foo(**a,)\n 1\nend" - formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" - formats "while 1;\n2; end" formats "while 1;\n2; 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.bar = \n1" formats "foo.bar = \n1" - formats "x : A | B" formats "x : A | B" - formats "-> : Int32* {}" formats "-> : Int32* {}" - formats "if a\n # hello\n 2\nend" formats "if a\n # hello\n 2\nend" + formats "foo 1 , 2" formats "foo 1 , 2" + formats "%r(foo \#{ bar })" formats "%r(foo \#{ bar })" + formats "a , b = 1 , 2" formats "a , b = 1 , 2" + formats "def foo(x y)\nend" formats "def foo(x y)\nend" + formats "1#foo" formats "1#foo" + formats "__FILE__" formats "__FILE__" + formats "case 1 \n in Int32 \n 3 \n end" formats "case 1 \n in Int32 \n 3 \n end" + formats "def foo(@[MyAnn] & : String -> Nil); end" formats "def foo(@[MyAnn] & : String -> Nil); end" + 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 "a = [\n1,\n2]" formats "a = [\n1,\n2]" + 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 "@x ||= 1" formats "@x ||= 1" + formats "1 && # foo\n 2 &&\n 3" formats "1 && # foo\n 2 &&\n 3" + formats "a.b &.[c]?\n1" formats "a.b &.[c]?\n1" + formats "foo" formats "foo" + formats "next *1 ,2" formats "next *1 ,2" + formats "foo { |x, *y| }" formats "foo { |x, *y| }" + formats "def foo ( x ,\n y ) \n end" formats "def foo ( x ,\n y ) \n end" + formats "foo.bar # comment\n .baz" formats "foo.bar # comment\n .baz" + formats "foo do # a\n # b\n bar\nend" formats "foo do # a\n # b\n bar\nend" + formats "1\n.as?(Int32)" formats "1\n.as?(Int32)" + formats "break { {1, 2}, {3, 4} }, 5" formats "break { {1, 2}, {3, 4} }, 5" + formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" + formats "next 1 , 2" formats "next 1 , 2" + formats "case 1 \n when 2 then 3 \n end" formats "case 1 \n when 2 then 3 \n end" + formats "macro [](x)\nend" formats "macro [](x)\nend" + formats "def foo(a, &@b)\nend" formats "def foo(a, &@b)\nend" + formats "$0" formats "$0" + formats "def foo ( @select) \n end" formats "def foo ( @select) \n end" formats "lib Foo\ntype Foo = Bar\nend" formats "lib Foo\ntype Foo = Bar\nend" - formats "asm(\"a\" : : :: \"volatile\")" formats "asm(\"a\" : : :: \"volatile\")" - formats "1\n..\n2" formats "1\n..\n2" - formats "return {1, 2}, 3" formats "return {1, 2}, 3" - formats "break 1 , 2" formats "break 1 , 2" - formats "{ {1}.foo, 2 }" formats "{ {1}.foo, 2 }" - formats "`foo`" formats "`foo`" - formats "a[b] ||= c" formats "a[b] ||= c" - formats "foo {;;1}" formats "foo {;;1}" - formats "foo(\"b\#{1}\" \\\n\"baz\")" formats "foo(\"b\#{1}\" \\\n\"baz\")" - formats "def foo\n1\nensure\n2\nend" formats "def foo\n1\nensure\n2\nend" - formats "1.[]= do\nend" formats "1.[]= do\nend" - formats "break {1, 2}, 3" formats "break {1, 2}, 3" - formats "return *1 ,2" formats "return *1 ,2" - formats "def foo(x : self ?) \n end" formats "def foo(x : self ?) \n end" - formats "case 1\nwhen 2\n\n#comment\nend" formats "case 1\nwhen 2\n\n#comment\nend" - formats "@[Foo::Bar]" formats "@[Foo::Bar]" - formats "Foo( * T, { * A ,*\n B } )" formats "Foo( * T, { * A ,*\n B } )" - formats "lib Bar\n enum Foo\n end\nend" formats "lib Bar\n enum Foo\n end\nend" - 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 "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" - formats "case 1 \n when 2 ; 3 \n end" formats "case 1 \n when 2 ; 3 \n end" - formats "case 1 # foo\nwhen 2\nend" formats "case 1 # foo\nwhen 2\nend" - formats "foo(1 + \n2)" formats "foo(1 + \n2)" - formats "Foo::Bar(T, U?)?" formats "Foo::Bar(T, U?)?" - formats "if 1 # foo\nend" formats "if 1 # foo\nend" - formats "\"\#{\"\#{foo}\"}\"" formats "\"\#{\"\#{foo}\"}\"" - formats "{ \"foo\": 1 }" formats "{ \"foo\": 1 }" - 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 "(\n a = 1\n a\n)" formats "(\n a = 1\n a\n)" - formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" + formats "break( 1 , 2 )" formats "break( 1 , 2 )" + formats "foo.as Int32*" formats "foo.as Int32*" + formats "Union(Int32, String)?" formats "Union(Int32, String)?" + formats "{% verbatim do %}{{1}} + {{2}}{% end %}" formats "{% verbatim do %}{{1}} + {{2}}{% end %}" + formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" + formats "return *1" formats "return *1" + formats "asm(\"nop\" :: \"r\"(0))" formats "asm(\"nop\" :: \"r\"(0))" + formats "-> :: foo=" formats "-> :: foo=" + formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" + 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 "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" + formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" + formats "<<-FOO\nbarfoo\nFOO" formats "<<-FOO\nbarfoo\nFOO" + formats "NamedTuple(\n a: Int32,)" formats "NamedTuple(\n a: Int32,)" + 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 "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 a , **b" formats "foo a , **b" + formats "def foo(@[MyAnn] &); end" formats "def foo(@[MyAnn] &); end" + 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 "foo.[]" formats "foo.[]" + formats "return { {1, 2}, {3, 4} }" formats "return { {1, 2}, {3, 4} }" + formats "def foo(a, # comment\n *b)\nend" formats "def foo(a, # comment\n *b)\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(\n 1,\n) {\n 2\n}" formats "foo(\n 1,\n) {\n 2\n}" - formats "0i64" formats "0i64" - formats "[1, 2,\n 3, 4]\n" formats "[1, 2,\n 3, 4]\n" - formats "def func # comment\n (1 + 2) / 3\nend" formats "def func # comment\n (1 + 2) / 3\nend" - formats "- 1" formats "- 1" - formats "foo do | x , y | \n x \n end" formats "foo do | x , y | \n x \n end" - formats "x : (A -> B)" formats "x : (A -> B)" - formats "foo &.bar.nil?" formats "foo &.bar.nil?" - formats "[\n a() # b\n]" formats "[\n a() # b\n]" - formats "foo(1, ) do\nend" formats "foo(1, ) do\nend" - formats "unless a\n2\nend" formats "unless a\n2\nend" - formats "alias A = ((B(C | D) | E) | F)" formats "alias A = ((B(C | D) | E) | F)" - formats "foo = 1\n->foo.foo?" formats "foo = 1\n->foo.foo?" - formats "{ {1, 2, 3} }" formats "{ {1, 2, 3} }" - formats "a = if 1\n2\nelsif 3\n4\nend" formats "a = if 1\n2\nelsif 3\n4\nend" 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 "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" formats "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" - formats "unless a\n # hello\n 2\nend" formats "unless a\n # hello\n 2\nend" - formats "1 # foo\n1234 # bar" formats "1 # foo\n1234 # bar" - formats "class Foo ( *T, U )\nend" formats "class Foo ( *T, U )\nend" - formats "case 1 \n when 2 , 3 \n 4 \n end" formats "case 1 \n when 2 , 3 \n 4 \n end" - formats "@x[ 1 ] &&= 2" formats "@x[ 1 ] &&= 2" - 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 "foo . is_a? ( Bar )" formats "foo . is_a? ( Bar )" - formats "$~" formats "$~" - 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 "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" - formats "def foo: Int32\nend" formats "def foo: Int32\nend" - 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 "1 + \\\n2 + \\\n3" formats "1 + \\\n2 + \\\n3" - formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" - formats "next 1 , *2" formats "next 1 , *2" - formats ":foo" formats ":foo" - formats "def foo ( x : Int32 = 1 ) \n end" formats "def foo ( x : Int32 = 1 ) \n end" - formats "->Foo.foo=" formats "->Foo.foo=" - formats "1.>=(2) { 3 }" formats "1.>=(2) { 3 }" - formats "if 0\n1 &&\n2 &&\n3\nend" formats "if 0\n1 &&\n2 &&\n3\nend" - formats "def foo( & )\nend" formats "def foo( & )\nend" - formats "foo do\n # bar\nend" formats "foo do\n # bar\nend" - formats "nil" formats "nil" - formats "break" formats "break" - formats "begin\n begin\n a\n # b\n end\nend" formats "begin\n begin\n a\n # b\n end\nend" - formats "def foo(&: Int32)\nend" formats "def foo(&: Int32)\nend" - formats "@[Foo( 1, 2, foo: 3 )]" formats "@[Foo( 1, 2, foo: 3 )]" - formats "1.!= do\nend" formats "1.!= do\nend" - formats "def foo(a : T) forall T\n #\n\n\nend" formats "def foo(a : T) forall T\n #\n\n\nend" - formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" - formats "class Actor\n macro inherited\n\nend\nend\n" formats "class Actor\n macro inherited\n\nend\nend\n" - formats "foo &.is_a?(T).bar" formats "foo &.is_a?(T).bar" - formats "def foo : Int32 \n end" formats "def foo : Int32 \n end" + 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 "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 "b &.[c].d" formats "b &.[c].d" + formats "1.!=() { 3 }" formats "1.!=() { 3 }" + formats "call(foo <<-X\nbar\nX\n)" formats "call(foo <<-X\nbar\nX\n)" + formats "def run\n\nrescue\n 2\n 3\nend" formats "def run\n\nrescue\n 2\n 3\nend" + formats "foo &.bar.is_a?(Baz)" formats "foo &.bar.is_a?(Baz)" + formats "def foo\n 1\n #\nrescue\nend" formats "def foo\n 1\n #\nrescue\nend" + formats "foo bar # comment\n\n# doc\ndef baz; end" formats "foo bar # comment\n\n# doc\ndef baz; end" + formats "yield 1 , 2" formats "yield 1 , 2" + formats "def foo(x : (self)?)\nend" formats "def foo(x : (self)?)\nend" + formats "::NamedTuple(T)" formats "::NamedTuple(T)" + formats "yield 1\n2" formats "yield 1\n2" + formats "FOO = 2 + 3\nA = 1 - 10" formats "FOO = 2 + 3\nA = 1 - 10" formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" - 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 "if a\nelse\n2\nend" formats "if a\nelse\n2\nend" - formats "[\n 1, 2, # foo\n 3, 4,\n]" formats "[\n 1, 2, # foo\n 3, 4,\n]" - formats "foo &.is_a?(T)" formats "foo &.is_a?(T)" - formats ":-" formats ":-" - 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 "foo 1,\n2" formats "foo 1,\n2" - formats "foo(\n 1, 2, &block)" formats "foo(\n 1, 2, &block)" - formats "asm(\"nop\" :::: \"volatile\" )" formats "asm(\"nop\" :::: \"volatile\" )" - formats "begin\n 1\n # Comment\n\n\nend" formats "begin\n 1\n # Comment\n\n\nend" - formats "begin\nend\n\n# a\n" formats "begin\nend\n\n# a\n" - formats "a = \"\n\"\n1 # 1\n12 # 2\n" formats "a = \"\n\"\n1 # 1\n12 # 2\n" - formats "def foo(**z, &block)\nend" formats "def foo(**z, &block)\nend" - formats "next { {1, 2}, {3, 4} }" formats "next { {1, 2}, {3, 4} }" - formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" - formats "asm(\"nop\" :: )" formats "asm(\"nop\" :: )" - formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" - formats "foo : (A) | D" formats "foo : (A) | D" - formats "bar = foo(->do\n 1 + 2\nend)" formats "bar = foo(->do\n 1 + 2\nend)" - formats "foo.bar\n .baz(\n 1\n )" formats "foo.bar\n .baz(\n 1\n )" - formats "as Foo" formats "as Foo" - formats "あ.い = 1" formats "あ.い = 1" - formats "\"hel\nlo\"" formats "\"hel\nlo\"" - formats "next( *1 , *2 )" formats "next( *1 , *2 )" - formats "a = 1 if 1 == 2 ||\n 3 == 4\n" formats "a = 1 if 1 == 2 ||\n 3 == 4\n" - formats "foo.responds_to? :bar\n1" formats "foo.responds_to? :bar\n1" - formats "foo = 1\n->foo.[]=(Int32)" formats "foo = 1\n->foo.[]=(Int32)" - formats "macro foo\n {{\n1 + 2 }}\nend" formats "macro foo\n {{\n1 + 2 }}\nend" - formats "+ a + d" formats "+ a + d" - formats "_ = 1" formats "_ = 1" - formats "a &.b.c.as(C)" formats "a &.b.c.as(C)" - formats "->() do x end" formats "->() do x end" - formats "#!shebang\n1 + 2" formats "#!shebang\n1 + 2" - formats "x : Int32 = 1" formats "x : Int32 = 1" - formats "x : {A, B}" formats "x : {A, B}" - 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 = 1\n->foo.[](Int32)" formats "foo = 1\n->foo.[](Int32)" - formats "foo . bar( x , y )" formats "foo . bar( x , y )" - formats "module Foo ( U, *T ); 1; end" formats "module Foo ( U, *T ); 1; end" - formats "foo(\n1,\n\n 2 \n)" formats "foo(\n1,\n\n 2 \n)" - formats "foo\n \nbar" formats "foo\n \nbar" - formats "def foo ( &@block) \n end" formats "def foo ( &@block) \n end" - formats "$1?" formats "$1?" - formats ":&+" formats ":&+" - formats ":>>" formats ":>>" - formats "alias Foo=\nBar" formats "alias Foo=\nBar" - 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 "foo({% verbatim do %}{{1}} + {{2}}{% end %})" formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" - formats "if 1\nelse\n2 # foo\nend" formats "if 1\nelse\n2 # foo\nend" - formats "foo &.as(T)" formats "foo &.as(T)" - formats "-> do\nend" formats "-> do\nend" - formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" - formats "1 # foo\n1234 # bar\n\n10 # bar" formats "1 # foo\n1234 # bar\n\n10 # bar" - formats "1 ?\n 2 : \n 3" formats "1 ?\n 2 : \n 3" - formats "macro foo\n {{ 1 + 2 }}\\\nend" formats "macro foo\n {{ 1 + 2 }}\\\nend" - formats "<<-HTML\n \#{\"foo\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n HTML" - formats "getter foo # comment\n\ndef foo\nend" formats "getter foo # comment\n\ndef foo\nend" - 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 "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" + formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" + formats "$~" formats "$~" + formats ":<<" formats ":<<" 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 "macro foo\nend" formats "macro foo\nend" - formats "1\n..2" formats "1\n..2" - formats "foo(1,\n &.bar)" formats "foo(1,\n &.bar)" - formats " .. 2" formats " .. 2" - formats "foo(1 ||\n # foo\n 2)" formats "foo(1 ||\n # foo\n 2)" - formats "\"hello\"" formats "\"hello\"" - formats "a = foo(baz1 do\nend)" formats "a = foo(baz1 do\nend)" + formats " <<-HTML\n \#{1}\n HTML" formats " <<-HTML\n \#{1}\n HTML" + 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\na = bar do\n1\nend\nend" formats "def foo\na = bar do\n1\nend\nend" + formats "<<-FOO\nfoobar\nFOO" formats "<<-FOO\nfoobar\nFOO" + formats "foo.[] = 1" formats "foo.[] = 1" + formats "def foo(x @y)\nend" formats "def foo(x @y)\nend" + formats "begin\n / /\nend" formats "begin\n / /\nend" + formats "begin 0[1] rescue 2 end" formats "begin 0[1] rescue 2 end" + formats " <<-HTML\n foo\n HTML" formats " <<-HTML\n foo\n HTML" + formats "begin\n begin\n a\n # b\n end\nend" formats "begin\n begin\n a\n # b\n end\nend" + formats "foo = 1\n->foo.foo=" formats "foo = 1\n->foo.foo=" + formats "alias Foo=Bar" formats "alias Foo=Bar" + formats "\"foo \#{ 1 } \#{ __DIR__ }\"" formats "\"foo \#{ 1 } \#{ __DIR__ }\"" + formats "1.>= { 3 }" formats "1.>= { 3 }" + formats "foo &.bar" formats "foo &.bar" + formats "1 + \n2" formats "1 + \n2" + formats "foo &.>=(2)" formats "foo &.>=(2)" + formats "def foo\n1\nensure\n2\nend" formats "def foo\n1\nensure\n2\nend" + formats "foo { | a, ( b , c ) | a + b + c }" formats "foo { | a, ( b , c ) | a + b + c }" + formats "foo = 1\n->foo.foo!" formats "foo = 1\n->foo.foo!" + formats "foo {;1}" formats "foo {;1}" + formats "{ \"foo\" => 1 }" formats "{ \"foo\" => 1 }" + formats "-> : {x: Int32, y: String} {}" formats "-> : {x: Int32, y: String} {}" + formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" + formats "macro foo( x , y )\nend" formats "macro foo( x , y )\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 //(x)\n 1\nend" formats "def //(x)\n 1\nend" + formats ":|" formats ":|" + formats "lib Bar\n enum Foo\n A\n end\nend" formats "lib Bar\n enum Foo\n A\n end\nend" + formats "module Moo \n\n 1 \n\nend" formats "module Moo \n\n 1 \n\nend" + formats "1&+2&*3" formats "1&+2&*3" + formats "a &.!.!" formats "a &.!.!" + 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 "<<-FOO\nFOO" formats "<<-FOO\nFOO" - formats "\"foo \#{bar}\" \\\n \"baz\"" formats "\"foo \#{bar}\" \\\n \"baz\"" - 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 "yield(\n1 , \n2)" formats "yield(\n1 , \n2)" - formats "foo.as(T).bar" formats "foo.as(T).bar" - formats "class Foo\n macro foo\n 1\n end\nend" formats "class Foo\n macro foo\n 1\n end\nend" - formats "macro [](x)\nend" formats "macro [](x)\nend" - formats ":&-" formats ":&-" - formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" - 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 ":<<" formats ":<<" - formats "foo . bar = 1" formats "foo . bar = 1" - formats "macro foo()\nend" formats "macro foo()\nend" - formats "foo.bar(&.baz)" formats "foo.bar(&.baz)" - 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 "1 &&\n2" formats "1 &&\n2" + formats "begin\n1\nrescue\n3\nensure\n2\nend" formats "begin\n1\nrescue\n3\nensure\n2\nend" + formats "case 1\nwhen 2 # a\n # b\nend" formats "case 1\nwhen 2 # a\n # b\nend" + formats "Foo( Bar( ) )" formats "Foo( Bar( ) )" formats ":/" formats ":/" - 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 "1 if 2\n# foo\n3" formats "1 if 2\n# foo\n3" - formats "next 1 , 2" formats "next 1 , 2" - formats "foo.bar / 2\n" formats "foo.bar / 2\n" - formats "def foo\n 1\n #\nrescue\nend" formats "def foo\n 1\n #\nrescue\nend" - formats "class X; annotation FooAnnotation ; end ; end" formats "class X; annotation FooAnnotation ; end ; end" - formats "def foo=(x)\nend" formats "def foo=(x)\nend" - formats "a &.!" formats "a &.!" - formats "def foo( x , & block : Int32 )\nend" formats "def foo( x , & block : Int32 )\nend" - formats "$?" formats "$?" - formats "0_u64" formats "0_u64" - formats "1.<= { 3 }" formats "1.<= { 3 }" - formats "1234 # foo\n1 # bar" formats "1234 # foo\n1 # bar" - formats "lib Foo\n $foo : Int32 \nend" formats "lib Foo\n $foo : Int32 \nend" - formats "begin\n 1\nend\n\n1\n" formats "begin\n 1\nend\n\n1\n" - formats "-> { 1 }" formats "-> { 1 }" - formats "begin\n 0[1] rescue 2 end" formats "begin\n 0[1] rescue 2 end" - formats "unless a\n2\nelse\n3\nend" formats "unless a\n2\nelse\n3\nend" - formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" - formats "break *1 , *2" formats "break *1 , *2" - formats "foo{}" formats "foo{}" - formats "macro foo(\n a,\n **b,\n)\nend" formats "macro foo(\n a,\n **b,\n)\nend" - formats "def foo(\n **a\n)\n 1\nend" formats "def foo(\n **a\n)\n 1\nend" - formats "def foo(@x)\n\nrescue\nend" formats "def foo(@x)\n\nrescue\nend" + formats "bar = foo(->do\n 1 + 2\nend)" formats "bar = foo(->do\n 1 + 2\nend)" + formats "foo.as? Int32*" formats "foo.as? Int32*" formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" - formats "if a\n2\nelse\n3\nend" formats "if a\n2\nelse\n3\nend" - formats "@[Foo( 1, 2 )]" formats "@[Foo( 1, 2 )]" - formats "foo = [1, [2,\n 3],\n 4]" formats "foo = [1, [2,\n 3],\n 4]" + formats "1 && (\n 2 || 3\n)" formats "1 && (\n 2 || 3\n)" + formats "10 ** a" formats "10 ** a" + formats "10//a" formats "10//a" + formats "-> { }" formats "-> { }" + formats "def foo(@[AnnOne] @[AnnTwo] & ); end" formats "def foo(@[AnnOne] @[AnnTwo] & ); end" + formats "if 1\nif 2\n3 # foo\nend\nend" formats "if 1\nif 2\n3 # foo\nend\nend" + formats "/\#{1}/imx" formats "/\#{1}/imx" + formats "break" formats "break" + 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 : Foo.class ) \n end" formats "def foo ( x : Foo.class ) \n end" + formats "->Foo.foo!" formats "->Foo.foo!" + formats "def foo\n 1\n #\n\n\nrescue\nend" formats "def foo\n 1\n #\n\n\nrescue\nend" + formats "alias A = ((B(C | D) | E) | F)" formats "alias A = ((B(C | D) | E) | F)" + 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 "[\n1,\n2,\n3]" formats "[\n1,\n2,\n3]" + formats "foo(1 + \n2)" formats "foo(1 + \n2)" + formats "macro foo\n {% 1 + 2 %}\nend" formats "macro foo\n {% 1 + 2 %}\nend" + formats "if 1\n foo(\n bar\n # comment\n )\nend" formats "if 1\n foo(\n bar\n # comment\n )\nend" + formats "unless a\nunless b\nelse\n4\nend\nend" formats "unless a\nunless b\nelse\n4\nend\nend" + formats "[] of (Array(T))" formats "[] of (Array(T))" + formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" + formats "lib Foo\nstruct Foo\nend\nend" formats "lib Foo\nstruct Foo\nend\nend" + formats "1 if nil?\na.b + c" formats "1 if nil?\na.b + c" + formats "%i{one( two( three)}" formats "%i{one( two( three)}" + formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" + formats "-> : Int32* {}" formats "-> : Int32* {}" + formats "-> : {Int32, String} {}" formats "-> : {Int32, String} {}" + formats "[\n a(),\n]" formats "[\n a(),\n]" + formats "{% if true %}\n # x\n # y\n{% end %}" formats "{% if true %}\n # x\n # y\n{% end %}" + formats "foo x, self // 1" formats "foo x, self // 1" + formats "until 1\n2\nend" formats "until 1\n2\nend" + formats "if 1\ncase 1\nwhen 2\n3\nend\nend" formats "if 1\ncase 1\nwhen 2\n3\nend\nend" + formats "def foo ( &@block) \n end" formats "def foo ( &@block) \n end" + formats "a = foo(bar(\n 1,\n 2,\n))" formats "a = foo(bar(\n 1,\n 2,\n))" + formats "begin\n1\nrescue ex\n3\nelse\n4\nend" formats "begin\n1\nrescue ex\n3\nelse\n4\nend" + formats "foo(bar(\n 1,\n 2,\n))" formats "foo(bar(\n 1,\n 2,\n))" + formats "def foo\n\n1\n\nend" formats "def foo\n\n1\n\nend" + formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" + formats "{ A: 1 }\n" formats "{ A: 1 }\n" + formats "foo \\\n foo: 1,\n bar: 2" formats "foo \\\n foo: 1,\n bar: 2" + formats "if a\n2\nend" formats "if a\n2\nend" + 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 "a = if 1\n2\nelsif 3\n4\nend" formats "a = if 1\n2\nelsif 3\n4\nend" + formats "`foo \#{ bar }`" formats "`foo \#{ bar }`" + formats "foo(A |\nB |\nC)" formats "foo(A |\nB |\nC)" + formats "Foo( x: Int32 )" formats "Foo( x: Int32 )" + formats "macro foo\n <<-FOO\n hello \n FOO\nend" formats "macro foo\n <<-FOO\n hello \n FOO\nend" + formats "if 1\n2\nend\nif 3\nend" formats "if 1\n2\nend\nif 3\nend" + formats "foo = 1\n->foo.[](Int32)" formats "foo = 1\n->foo.[](Int32)" + formats "Foo:: Bar" formats "Foo:: Bar" + formats "-> { 1 }" formats "-> { 1 }" + formats "foo : self? | A" formats "foo : self? | A" + formats "1234 # foo\n1 # bar" formats "1234 # foo\n1 # bar" + formats "foo &.as?(T)" formats "foo &.as?(T)" + formats "def foo(x, **z)\nend" formats "def foo(x, **z)\nend" + formats "if 1\n2 && 3\nend" formats "if 1\n2 && 3\nend" + formats "foo{|x| x}" formats "foo{|x| x}" + formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" + formats "->foo=" formats "->foo=" + formats "->@@foo.foo=" formats "->@@foo.foo=" + formats "def /(x)\n 1\nend" formats "def /(x)\n 1\nend" + formats "->{1}" formats "->{1}" + formats "x : {\"foo bar\": Int32}" formats "x : {\"foo bar\": Int32}" formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" - formats "1 \\\nensure 2" formats "1 \\\nensure 2" - formats "case 1\nend" formats "case 1\nend" - formats "1.=== { 3 }" formats "1.=== { 3 }" - formats "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" - formats "\"\\a\\c\\b\\d\"" formats "\"\\a\\c\\b\\d\"" - formats "struct Foo\n # bar\n # baz\n1\nend" formats "struct Foo\n # bar\n # baz\n1\nend" - formats "1 + \\\n2" formats "1 + \\\n2" - formats "return *1 , *2" formats "return *1 , *2" - formats "def foo\nend\ndef bar\nend" formats "def foo\nend\ndef bar\nend" - formats "-> : Int32? {}" formats "-> : Int32? {}" - formats "def foo ( bar @select) \n end" formats "def foo ( bar @select) \n end" - formats "next {1, 2}, {3, 4}" formats "next {1, 2}, {3, 4}" - formats "foo : (Array(String)?) | String" formats "foo : (Array(String)?) | String" - formats "->@@foo.foo!" formats "->@@foo.foo!" - formats "case 1 \n when 2 then 3 \n end" formats "case 1 \n when 2 then 3 \n end" + formats "1.== do\nend" formats "1.== do\nend" + formats "asm(\"a\" : \"b\"(c)\n)" formats "asm(\"a\" : \"b\"(c)\n)" + formats "1 #=> 2" formats "1 #=> 2" + formats "def foo : (A | B(C))\n nil\nend" formats "def foo : (A | B(C))\n nil\nend" + formats " ((1) + 2)" formats " ((1) + 2)" formats "lib Foo\n fun Bar\nend" formats "lib Foo\n fun Bar\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 "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 "return( *1 , *2 )" formats "return( *1 , *2 )" - 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 "->@foo.foo!" formats "->@foo.foo!" - formats "asm(\n# foo\n\"nop\"\n# bar\n)" formats "asm(\n# foo\n\"nop\"\n# bar\n)" - 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 "class Foo < \n Bar \n\n 1 \n\nend" formats "class Foo < \n Bar \n\n 1 \n\nend" - formats "alias Foo= Bar" formats "alias Foo= Bar" - formats "foo &.bar" formats "foo &.bar" - 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 "def foo \n end" formats "def foo \n end" - formats "foo(a: //)" formats "foo(a: //)" - formats "foo(\n 1,\n # 2,\n # 3,\n)" formats "foo(\n 1,\n # 2,\n # 3,\n)" - formats "NamedTuple()" formats "NamedTuple()" - formats "def foo : A(B)\n nil\nend" formats "def foo : A(B)\n nil\nend" - 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 "def foo(x @@y)\nend" formats "def foo(x @@y)\nend" - formats "<<-HTML\n \#{__FILE__}\n HTML" formats "<<-HTML\n \#{__FILE__}\n HTML" - formats "->@@foo.foo?" formats "->@@foo.foo?" - 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 "yield" formats "yield" - formats "def //(x)\n 1\nend" formats "def //(x)\n 1\nend" - formats "foo\n.bar\n.baz" formats "foo\n.bar\n.baz" - formats "def foo ( @select) \n end" formats "def foo ( @select) \n end" - formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" formats "A = 10\nFOO = 123\nBARBAZ = 1234\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 "yield 1" formats "yield 1" - 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 "alias A = ({A, (B)})" formats "alias A = ({A, (B)})" - formats "1 \\\nrescue 2" formats "1 \\\nrescue 2" - formats "-> : Int32 { }" formats "-> : Int32 { }" - formats "# ```text\n# 1 + 2\n# ```" formats "# ```text\n# 1 + 2\n# ```" - formats "def foo(**b, # comment\n &block)\nend" formats "def foo(**b, # comment\n &block)\nend" - formats "1.=== do\nend" formats "1.=== do\nend" - formats "def foo\nend\n\n\n\ndef bar\nend" formats "def foo\nend\n\n\n\ndef bar\nend" - formats "@[ Foo(foo: 1) ]\ndef foo\nend" formats "@[ Foo(foo: 1) ]\ndef foo\nend" - formats "foo.bar\n.baz" formats "foo.bar\n.baz" - formats "a = if 1\n2\nelse\n3\nend" formats "a = if 1\n2\nelse\n3\nend" - formats "def foo( x , & block : Int32 ->)\nend" formats "def foo( x , & block : Int32 ->)\nend" - formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" - formats "->foo!" formats "->foo!" - formats "1.[]=(2) { 3 }" formats "1.[]=(2) { 3 }" - formats "begin\n1\nensure\n2\nend" formats "begin\n1\nensure\n2\nend" + formats "next" formats "next" + formats " ( 1; 2; 3 ) " formats " ( 1; 2; 3 ) " + formats " Array( {x: Int32, y: String } )" formats " Array( {x: Int32, y: String } )" + formats "foo &.[]( 1, 2 )" formats "foo &.[]( 1, 2 )" + 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\n2 \n # foo" formats "1\n2 \n # foo" + formats "if 1 # foo\nend" formats "if 1 # foo\nend" + formats "extend Foo" formats "extend Foo" + formats "lib Foo\nfun foo() : Int32\nend" formats "lib Foo\nfun foo() : Int32\nend" + formats "def foo ( x , y ,\n) \n end" formats "def foo ( x , y ,\n) \n end" + formats "module Foo\n# nothing\nend" formats "module Foo\n# nothing\nend" + formats "break {1, 2}, {3, 4}" formats "break {1, 2}, {3, 4}" + formats "@[Foo()]" formats "@[Foo()]" + formats "1 / 2" formats "1 / 2" + formats "begin\n begin\n\n end\nend" formats "begin\n begin\n\n end\nend" + formats "(a).b { }\nc" formats "(a).b { }\nc" + formats "lib Foo\nfun foo : Int32\nend" formats "lib Foo\nfun foo : Int32\nend" + formats "break 1 , 2" formats "break 1 , 2" + formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" + formats "def foo(**a,)\n 1\nend" formats "def foo(**a,)\n 1\nend" + formats "def foo ( x : Int32 ) \n end" formats "def foo ( x : Int32 ) \n end" + formats "foo do\n # bar\nend" formats "foo do\n # bar\nend" + formats "<<-FOO\nfoo\nfoo\nFOO" formats "<<-FOO\nfoo\nfoo\nFOO" + formats "abstract def foo\nabstract def bar" formats "abstract def foo\nabstract def bar" + formats "foo : StaticArray(Foo, 12)[34]" formats "foo : StaticArray(Foo, 12)[34]" + formats "10 / a" formats "10 / a" + formats "foo . is_a? ( Bar )" formats "foo . is_a? ( Bar )" + formats "yield 1 , *2" formats "yield 1 , *2" + 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 "0i64" formats "0i64" + formats "if 1;\n2;\nelsif 3;\n4;\nend" formats "if 1;\n2;\nelsif 3;\n4;\nend" + formats "1.>=() { 3 }" formats "1.>=() { 3 }" + 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\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(&block: Int32)\nend" formats "def foo(&block: Int32)\nend" + formats "x : Int32**" formats "x : Int32**" + formats "<<-HTML\n \#{1}x\n HTML" formats "<<-HTML\n \#{1}x\n HTML" + formats " [ 1, \n 2 , \n 3 ] " formats " [ 1, \n 2 , \n 3 ] " + formats "def foo(x : X) forall X , Y; end" formats "def foo(x : X) forall X , Y; end" + formats "if a\n2\n3\nend" formats "if a\n2\n3\nend" + formats "{% begin %}\n \"\n foo\"\n{% end %}" formats "{% begin %}\n \"\n foo\"\n{% end %}" + formats "enum Foo\nA = 1\nend" formats "enum Foo\nA = 1\nend" + formats "foo { | a, ( _ , c ) | a + c }" formats "foo { | a, ( _ , c ) | a + c }" + formats "def foo( x , * y )\nend" formats "def foo( x , * y )\nend" + formats "foo &.bar.nil?()" formats "foo &.bar.nil?()" + formats "loop do\n 1\nrescue\n 2\nend" formats "loop do\n 1\nrescue\n 2\nend" + formats "macro foo\n %foo{x,y}\nend" formats "macro foo\n %foo{x,y}\nend" + formats " {%\na = 1 %}" formats " {%\na = 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.foo" formats "->@@foo.foo" + formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" + formats "yield( 1 )" formats "yield( 1 )" + formats "foo &.responds_to?(:foo)" formats "foo &.responds_to?(:foo)" + formats "%" formats "%" + formats "foo[x: 1, &.bar] ||= 1" formats "foo[x: 1, &.bar] ||= 1" + formats "foo : Pointer(Foo)*" formats "foo : Pointer(Foo)*" + formats "foo (1; 2)" formats "foo (1; 2)" + formats "\"\#{\"\#{foo}\"}\"" formats "\"\#{\"\#{foo}\"}\"" + formats "[1, 2, 3] of Foo" formats "[1, 2, 3] of Foo" + formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" + formats "next( 1 , 2 )" formats "next( 1 , 2 )" + formats "class Foo\n1\n\n# foo\nend" formats "class Foo\n1\n\n# foo\nend" + formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" + formats "macro foo\n 1 + 2 \n end" formats "macro foo\n 1 + 2 \n end" + formats "foo bar, \\\nbaz" formats "foo bar, \\\nbaz" + formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" + formats "def foo\n2 # foo\nend" formats "def foo\n2 # foo\nend" + formats "'\\n'" formats "'\\n'" + formats "::Pointer(T)" formats "::Pointer(T)" + formats "1 > 2" formats "1 > 2" + formats "case nil\nelse nil; nil # comment\nend" formats "case nil\nelse nil; nil # comment\nend" formats "a = / /" formats "a = / /" - formats "break( *1 , *2 )" formats "break( *1 , *2 )" -Code gen: lib - 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 - can use enum as fun return can use enum 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 can use tuple as fun return - allows invoking out with underscore allows invoking out with underscore - doesn't crash when casting -1 to UInt32 (#3594) doesn't crash when casting -1 to UInt32 (#3594) - 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) - refers to lib type (#960) refers to lib type (#960) - 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 (bug) allows passing type to LibC if it has a converter with to_unsafe (bug) - allows setting/getting external variable as function pointer allows setting/getting external variable as function pointer - call to void function call to void function - passes int as another float type in literal passes int as another float type in literal - passes nil to varargs (#1570) passes nil to varargs (#1570) - codegens lib var set and get codegens lib var set and get - 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) - casts C fun to Crystal proc when accessing instance var (#2515) casts C fun to Crystal proc when accessing instance var (#2515) - doesn't crash with nil and varargs (#4414) doesn't crash with nil and varargs (#4414) - can use enum as fun argument can use enum as fun argument -Semantic: recursive struct check - errors on recursive struct through named tuple errors on recursive struct through named tuple - 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 generic struct inside module errors on recursive generic struct inside module - detects recursive struct through inheritance (#3071) detects recursive struct through inheritance (#3071) - detects recursive struct through module detects recursive struct through module - errors on recursive struct inside module errors on recursive struct inside module - errors on recursive struct errors on recursive struct - errors on private recursive type errors on private recursive type - errors on recursive struct through tuple errors on recursive struct through tuple - errors on recursive struct through recursive alias (#4454) (#4455) errors on recursive struct through recursive alias (#4454) (#4455) - detects recursive generic struct through generic module (#4720) detects recursive generic struct through generic module (#4720) - errors on mutually recursive struct errors on mutually recursive struct -Crystal::Playground::Session - assert assert + formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" + formats "__LINE__" formats "__LINE__" + formats "foo : ( A | B )" formats "foo : ( A | B )" + 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 "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" + formats "<<-HTML\n hello \n HTML" formats "<<-HTML\n hello \n HTML" + formats "lib Foo\n fun foo =\n bar : Void\nend" formats "lib Foo\n fun foo =\n bar : Void\nend" + formats " <<-HTML\n foo\nHTML" formats " <<-HTML\n foo\nHTML" + formats "def foo ( x = 1 ) \n end" formats "def foo ( x = 1 ) \n end" + formats "abstract class Foo\nend" formats "abstract class Foo\nend" + 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 "macro foo\n {{ 1 + 2 }}\\\n 1\n end" formats "macro foo\n {{ 1 + 2 }}\\\n 1\n end" + 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 "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" formats "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" + formats "if 1\n [\n 1,\n ].none?\nend" formats "if 1\n [\n 1,\n ].none?\nend" + formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" + formats "%w(one two three)" formats "%w(one two three)" + formats "->{ x }" formats "->{ x }" + formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" + formats "alias X = ((Y, Z) ->)" formats "alias X = ((Y, Z) ->)" Crystal::Repl::Interpreter - types - interprets class for virtual_type type (struct) interprets class for virtual_type type (struct) - discards class for non-union type discards class for non-union type - discards .class discards .class - interprets crystal_type_id for virtual metaclass type (#12228) interprets crystal_type_id for virtual metaclass type (#12228) - discards generic discards generic - does class method on virtual metaclass casted to generic metaclass (#12302) does class method on virtual metaclass casted to generic metaclass (#12302) - interprets crystal_type_id for non-nil interprets crystal_type_id for non-nil - interprets class for module type (#12203) interprets class for module type (#12203) - discards crystal_type_id discards crystal_type_id - discards typeof discards typeof - interprets class_crystal_instance_type_id interprets class_crystal_instance_type_id - interprets crystal_type_id for nil interprets crystal_type_id for nil - interprets class for virtual_type type interprets class for virtual_type type - interprets class for non-union type interprets class for non-union type - discards Path discards Path - discards class for virtual_type type discards class for virtual_type type - interprets path to type interprets path to type + is_a? + does is_a? from VirtualType to NonGenericClassType (true) does is_a? from VirtualType to NonGenericClassType (true) + does is_a? from NilableProcType to Nil does is_a? from NilableProcType to Nil + does is_a? from NilableReferenceUnionType to NonGenericClassType (true) does is_a? from NilableReferenceUnionType to NonGenericClassType (true) + does is_a? from NilableType to GenericClassInstanceType (true) does is_a? from NilableType to GenericClassInstanceType (true) + does is_a? from NilableProcType to non-Nil does is_a? from NilableProcType to non-Nil + does is_a? from VirtualType to NonGenericClassType (false) does is_a? from VirtualType to NonGenericClassType (false) + does is_a? from NilableType to NonGenericClassType (false) does is_a? from NilableType to NonGenericClassType (false) + does is_a? from NilableType to NonGenericClassType (true) does is_a? from NilableType to NonGenericClassType (true) + does is_a? from NilableReferenceUnionType to NonGenericClassType (false) does is_a? from NilableReferenceUnionType to NonGenericClassType (false) + does is_a? from NilableType to GenericClassInstanceType (false) does is_a? from NilableType to GenericClassInstanceType (false) +Lexer: location + parses var/call right after loc (#491) parses var/call right after loc (#491) + Location.parse + raises ArgumentError if column number is invalid raises ArgumentError if column number is invalid + raises ArgumentError if missing part raises ArgumentError if missing part + raises ArgumentError if missing colon raises ArgumentError if missing colon + parses location from string parses location from string + raises ArgumentError if line number is invalid raises ArgumentError if line number is invalid + locations in different files have no order locations in different files have no order + stores line numbers stores line numbers + assigns correct loc location to node assigns correct loc location to node + pushes and pops its location pushes and pops its location + overrides location with pragma overrides location with pragma + locations in same files are comparable based on line locations in same files are comparable based on line + uses two consecutive loc pragma uses two consecutive loc pragma + stores column numbers stores column numbers + locations with virtual files should be comparable locations with virtual files should be comparable +Crystal::Repl::Interpreter + typeof + interprets typeof instance type interprets typeof instance type + interprets typeof virtual type interprets typeof virtual type + interprets typeof metaclass type interprets typeof metaclass type +Semantic: class var + allows self.class as type var in class body (#537) allows self.class as type var in class body (#537) + errors on undefined constant (2) errors on undefined constant (2) + types class var types class var + types as nilable if doesn't have initializer types as nilable if doesn't have initializer + 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) + errors if class variable not nilable without initializer errors if class variable not nilable without initializer + declares uninitialized (#2935) declares uninitialized (#2935) + errors if using local variable in initializer errors if using local variable in initializer + redefines class variable type redefines class variable type + declares class variable (2) declares class variable (2) + can find class var in subclass can find class var in subclass + doesn't error if accessing class variable before defined (#2941) doesn't error if accessing class variable before defined (#2941) + types class var inside proc literal inside class types class var inside proc literal inside class + 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 + declares class var in generic class declares class var in generic class + declares class var in generic module declares class var in generic module + errors if using class variable at the top level errors if using class variable at the top level + infers type from number literal infers type from number literal + types class var inside instance method types class var inside instance method + errors if redefining class var type in subclass errors if redefining class var type in subclass + errors if redefining class var type in included module errors if redefining class var type in included module + doesn't error on recursive dependency if var is nilable (#2943) doesn't error on recursive dependency if var is nilable (#2943) + types class var as nil if not assigned at the top level types class var as nil if not assigned at the top level + errors on undefined constant (1) errors on undefined constant (1) + infers in multiple assign for tuple type (1) infers in multiple assign for tuple type (1) + infers type from T.new infers type from T.new + can find class var through included module can find class var through included module + 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) + errors when typing a class variable inside a method errors when typing a class variable inside a method + says undefined class variable says undefined class variable + errors if redefining class var type in subclass, with guess errors if redefining class var type in subclass, with guess + allows class var in primitive types (#612) allows class var in primitive types (#612) + errors if using self as type var but there's no self errors if using self as type var but there's no self + errors when using Class (#2605) errors when using Class (#2605) + can access constant from generic metaclass (#3719) can access constant from generic metaclass (#3719) +Normalize: multi assign + normalizes 1 to n, with *_ on left-hand side (3) normalizes 1 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 splat on left-hand side normalizes 1 to splat on left-hand side + 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 + without 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 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 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 with [] normalizes n to n with [] + normalizes m to n, with *_ on left-hand side (3) normalizes m to n, with *_ on left-hand side (3) + normalizes n to n normalizes n to n + 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 (2) normalizes m to n, with *_ on left-hand side (2) + normalizes n to n with call normalizes n to n with call + 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 m to n, with *_ on left-hand side (1) normalizes m to n, with *_ on left-hand side (1) + normalizes n to *_ on left-hand side normalizes n to *_ on left-hand side + normalizes 1 to n, with *_ on left-hand side (1) normalizes 1 to n, with *_ on left-hand side (1) + strict_multi_assign + 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 normalizes 1 to n + normalizes 1 to n, with *_ on left-hand side (2) normalizes 1 to n, with *_ on left-hand side (2) +Code gen: multi assign + 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 (2) supports 1 to n assignment, with splat on left-hand side (2) + supports 1 to n assignment, splat is empty (3) supports 1 to n assignment, splat is empty (3) + 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, splat is empty tuple (3) supports m to n assignment, splat is empty tuple (3) + 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 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 + without strict_multi_assign + 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 supports 1 to n assignment + 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 1 to n assignment, splat is empty (2) supports 1 to n assignment, splat is empty (2) + supports n to n assignment supports n to n assignment + 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, splat is empty tuple (1) supports m to n assignment, splat is empty tuple (1) + supports m to n assignment, splat is empty tuple (2) supports m to n assignment, splat is empty tuple (2) + 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 m to n assignment, with splat on left-hand side (2) supports m to n assignment, with splat on left-hand side (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, raises if out of bounds (2) + 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) +Normalize: block + normalizes unpacking with single expression body normalizes unpacking with single expression body + normalizes multiple nested unpackings normalizes multiple nested unpackings + normalizes unpacking with multiple body expressions normalizes unpacking with multiple body expressions + normalizes unpacking with splat normalizes unpacking with splat + normalizes unpacking with underscore normalizes unpacking with underscore + normalizes unpacking with empty body normalizes unpacking with empty body + normalizes nested unpacking normalizes nested unpacking +Code gen: not + doesn't crash doesn't crash + codegens not false codegens not false + codegens not nilable type (false) codegens not nilable type (false) + codegens not true codegens not true + codegens not with inlinable value (#6451) codegens not with inlinable value (#6451) + codegens not pointer (false) codegens not pointer (false) + codegens not number codegens not number + codegens not nilable type (true) codegens not nilable type (true) + codegens not nil codegens not nil + codegens not pointer (true) codegens not pointer (true) +Semantic: multi assign + without strict_multi_assign + errors if assigning non-Indexable to splat (#11414) errors if assigning non-Indexable to splat (#11414) + doesn't error if assigning non-Indexable (#11414) doesn't error if assigning non-Indexable (#11414) + doesn't error if assigning tuple to fewer targets doesn't error if assigning tuple to fewer targets + can pass splat variable at top-level to macros (#11596) can pass splat variable at top-level to macros (#11596) + strict_multi_assign + errors if assigning tuple to fewer targets errors if assigning tuple to fewer targets + doesn't error if some type in union has no constant size doesn't error if some type in union has no constant size + errors if assigning union of tuples to fewer targets errors if assigning union of tuples to fewer targets + errors if assigning tuple to more targets errors if assigning tuple to more targets + doesn't error if some type in union matches target count doesn't error if some type in union matches target count + errors if assigning non-Indexable (#11414) errors if assigning non-Indexable (#11414) + errors if assigning non-Indexable to splat (#11414) errors if assigning non-Indexable to splat (#11414) +Code gen: c enum + codegens enum value 3 codegens enum value 3 + codegens enum with 3 - 2 codegens enum with 3 - 2 + codegens enum with 10 & 3 codegens enum with 10 & 3 + codegens enum that refers to another constant codegens enum that refers to another constant + codegens enum with 1 &+ 2 codegens enum with 1 &+ 2 + codegens enum with 3 * 2 codegens enum with 3 * 2 + codegens enum with +1 codegens enum with +1 + codegens enum with -1 codegens enum with -1 + codegens enum with 3 &- 2 codegens enum with 3 &- 2 + codegens enum with ~1 codegens enum with ~1 + codegens enum with 1 + 2 codegens enum with 1 + 2 + codegens enum with 10 | 3 codegens enum with 10 | 3 + codegens enum with 1 << 3 codegens enum with 1 << 3 + codegens enum with 100 >> 3 codegens enum with 100 >> 3 + codegens enum with 10 % 3 codegens enum with 10 % 3 + codegens enum value 4 codegens enum value 4 + codegens enum that refers to another enum constant codegens enum that refers to another enum constant + codegens enum value 2 codegens enum value 2 + codegens enum with 3 &* 2 codegens enum with 3 &* 2 + codegens enum with 10 ^ 3 codegens enum with 10 ^ 3 + codegens enum with (1 + 2) * 3 codegens enum with (1 + 2) * 3 + codegens enum with 10 // 2 codegens enum with 10 // 2 + codegens enum value codegens enum value +implementations + find open class implementation find open class implementation + find implementation inside contained file private class' class method find implementation inside contained file private class' class method + find module implementation find module implementation + find implementors of classes that are only used find implementors of classes that are only used + find implementation inside contained class' class method find implementation inside contained class' class method + find implementors of different classes find implementors of different classes + find implementation inside contained file private method find implementation inside contained file private method + find method calls inside trailing if find method calls inside trailing if + find top level method calls find top level method calls + find struct implementation find struct implementation + find class inside method find class inside method + find alias implementation find alias implementation + find method calls inside if find method calls inside if + find class implementation find class implementation + find implementation from macro expansions find implementation from macro expansions + find implementation in class methods find implementation in class methods + can display json output can display json output + find method calls inside while find method calls inside while + find method calls inside rescue find method calls inside rescue + find method calls inside while cond find method calls inside while cond + find implementation in generic class find implementation in generic class + find enum implementation find enum implementation + find implementation inside a module class find implementation inside a module class + find class defined by macro find class defined by macro + find enum value implementation find enum value implementation + find implementation in generic class methods find implementation in generic class methods + find const implementation find const implementation + can display text output can display text output + find full trace for macro expansions find full trace for macro expansions +Code gen: module + codegens cast to module with class and struct to nilable module codegens cast to module with class and struct to nilable module + can use generic module as instance variable type can use generic module as instance variable type + codegens proc of a module that was never included codegens proc of a module that was never included + expands modules to its including types (3) (#1916) expands modules to its including types (3) (#1916) + codegens proc of module when generic type includes it codegens proc of module when generic type includes it + codegens dispatch of union with module (#3647) codegens dispatch of union with module (#3647) + codegens pointer of module with method with two including types with one struct codegens pointer of module with method with two including types with one struct + can instantiate generic module can instantiate generic module + codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block codegens pointer of module with block + declares proc with module type declares proc with module type + expands modules to its including types (2) (#1916) expands modules to its including types (2) (#1916) + invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) invokes method on yielded module that has no instances (#1079) + codegens module with virtual type codegens module with virtual type + casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) casts to union of generic module that is included in other module (#3323) + expands modules to its including types (#1916) expands modules to its including types (#1916) + codegens pointer of module with method with two including types with one struct (2) codegens pointer of module with method with two including types with one struct (2) + codegens pointer of module with method codegens pointer of module with method + codegens pointer of module with method with two including types codegens pointer of module with method with two including types + codegens pointer of module and pass value to method codegens pointer of module and pass value to method + declares proc with module type and invoke it with two different types that return themselves declares proc with module type and invoke it with two different types that return themselves + codegens cast to module that includes bool codegens cast to module that includes bool + declares and includes generic module, in macros T is a tuple literal declares and includes generic module, in macros T is a tuple literal + casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) casts to union of module that is included in other module (#3323) + can use generic module as instance variable type (2) can use generic module as instance variable type (2) +Code gen: struct + codegens virtual struct with pointer codegens virtual struct with pointer + creates structs with instance var creates structs with instance var + 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 + codegens struct assigned to underscore (#1842) codegens struct assigned to underscore (#1842) + codegens virtual structs union (2) codegens virtual structs union (2) + creates struct in def creates struct in def + creates structs creates structs + returns self returns self + codegens virtual struct metaclass (#2551) (2) codegens virtual struct metaclass (#2551) (2) + codegens virtual struct codegens virtual struct + passes a struct as a parameter makes a copy passes a struct as a parameter makes a copy + 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) (3) codegens virtual struct metaclass (#2551) (3) + allows assigning to struct argument (bug) allows assigning to struct argument (bug) + 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) + returns struct as a copy returns struct as a copy + returns self with block returns self with block + mutates a virtual struct mutates a virtual 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 declares const struct + can call new on abstract struct with single child (#7309) can call new on abstract struct with single child (#7309) + assigning a struct makes a copy (2) assigning a struct makes a copy (2) + does phi of struct does phi of struct + uses nilable struct uses nilable 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 + casts virtual struct to base type, only one subclass (#2885) casts virtual struct to base type, only one subclass (#2885) + assigning a struct makes a copy (1) assigning a struct makes a copy (1) + codegens virtual struct metaclass (#2551) (1) codegens virtual struct metaclass (#2551) (1) + codegens virtual structs union (1) codegens virtual structs union (1) +Code gen: C ABI + 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) + 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) + 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 + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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 (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) +Semantic: c union + errors if using void via typedef in union field type errors if using void via typedef in union field type + errors if using void in union field type errors if using void in union field type + types c union types c union + types union setter types union setter + errors if setting closure errors if setting closure + types Union#new types Union#new + types union getter types union getter + types union getter via pointer types union getter via pointer + errors on empty c union (#633) errors on empty c union (#633) + types union setter via pointer types union setter via pointer +Crystal::Loader + dynlib + #load_library? + full path full path + does not implicitly find dependencies does not implicitly find dependencies + lookup in order lookup in order + library name library name + validate that lib handles are properly closed validate that lib handles are properly closed + does not find global symbols does not find global symbols + #load_file? + finds function symbol finds function symbol + .default_search_paths + LD_LIBRARY_PATH LD_LIBRARY_PATH + DYLD_LIBRARY_PATH DYLD_LIBRARY_PATH + .parse + parses static parses static + parses directory paths parses directory paths + prepends directory paths before default search paths prepends directory paths before default search paths + parses library names parses library names + parses file paths parses file paths + .read_ld_conf + with include with include + basic basic +Code gen: C ABI x86_64 + returns struct between 64 and 128 bits as { i64, i64 } returns struct between 64 and 128 bits as { i64, i64 } + passes struct between 64 and 128 bits as { i64, i64 } passes struct between 64 and 128 bits as { i64, i64 } + passes struct less than 64 bits as { i64 } in varargs passes struct less than 64 bits as { i64 } in varargs + passes struct between 64 and 128 bits as { i64, i64 } (with multiple modules/contexts) passes struct between 64 and 128 bits as { i64, i64 } (with multiple modules/contexts) + passes struct bigger than128 bits with byval passes struct bigger than128 bits with byval + passes struct less than 64 bits as { i64 } passes struct less than 64 bits as { i64 } + returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret + returns struct less than 64 bits as { i64 } returns struct less than 64 bits as { i64 } +cleanup + errors if assigning instance var to itself errors if assigning instance var to itself + errors if assigning var to itself errors if assigning var to itself + strip tuple elements after unreachable element strip tuple elements after unreachable element + strip named-tuple elements after unreachable element strip named-tuple elements after unreachable element +Semantic: while + reports next cannot be used outside a while reports next cannot be used outside a while + types while with assignment types while with assignment + restricts type after `while` with `not` and `and` (#4242) restricts type after `while` with `not` and `and` (#4242) + 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) + restricts type after while (#4242) restricts type after while (#4242) + types while (true) as NoReturn types while (true) as NoReturn + finds all while cond assign targets in expressions (#10350) finds all while cond assign targets in expressions (#10350) + types while ((true)) as NoReturn types while ((true)) as NoReturn + finds all while cond assign targets in expressions (2) finds all while cond assign targets in expressions (2) + types endless while with break without value types endless while with break without value + doesn't fail on nested conditionals inside typeof condition doesn't fail on nested conditionals inside typeof condition + uses var type inside while if endless loop uses var type inside while if endless loop + finds while cond assign target in Not (#10345) finds while cond assign target in Not (#10345) + 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 variable as nilable if raise before assign types variable as nilable if raise before assign + types while types while + types endless while with multiple breaks with value types endless while with multiple breaks with value + 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) + 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 (4) finds all while cond assign targets in expressions (4) + 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 new variables inside typeof condition doesn't fail on new variables inside typeof condition + types while true as NoReturn types while true as NoReturn + types while with && (#1425) types while with && (#1425) + types while with assignment and call types while with assignment and call + doesn't modify var's type before while doesn't modify var's type before while + restricts type after while with not (#4242) restricts type after while with not (#4242) + types while with break with value types while with break with value + finds all while cond assign targets in expressions (3) finds all while cond assign targets in expressions (3) + 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 + doesn't type var as nilable after break inside rescue doesn't type var as nilable after break inside rescue + rebinds condition variable after while body (#6158) rebinds condition variable after while body (#6158) + 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 + reports break cannot be used outside a while reports break cannot be used outside a while + 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 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 endless while with break with value types endless while with break with value + uses var type inside while if endless loop (2) uses var type inside while if endless loop (2) + finds all while cond assign targets in expressions (6) finds all while cond assign targets in expressions (6) + types while with multiple breaks with value types while with multiple breaks with value + finds all while cond assign targets in expressions (5) finds all while cond assign targets in expressions (5) + types while with break without value types while with break without value +Normalize: unless + normalizes unless normalizes unless +Lexer + lexes "+@foo" lexes "+@foo" + lexes "|" lexes "|" + lexes "+1.0" lexes "+1.0" + lexes "protected" lexes "protected" + lexes "0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111" lexes "0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111" + lexes "while!" lexes "while!" + lexes "$FOO" lexes "$FOO" + says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000u64" says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000u64" + lexes '\t' lexes '\t' + lexes "0b1000000000000000000000000000000000000000000000000000000000000000" lexes "0b1000000000000000000000000000000000000000000000000000000000000000" + says syntax error on "/foo" says syntax error on "/foo" + lexes "0b1111111111111111111111111111111" lexes "0b1111111111111111111111111111111" + lexes "1e23f64" lexes "1e23f64" + lexes "fun" lexes "fun" + lexes "yield?" lexes "yield?" + lexes "type" lexes "type" + lexes __DIR__ lexes __DIR__ + lexes ":<" lexes ":<" + lexes "9223372036854775807" lexes "9223372036854775807" + says syntax error on "2ef32" says syntax error on "2ef32" + lexes "include" lexes "include" + lexes "%=" lexes "%=" + lexes "fooBar" lexes "fooBar" + lexes "1.2e+23_f64" lexes "1.2e+23_f64" + lexes "0o123" lexes "0o123" + lexes "1.0f32" lexes "1.0f32" + says syntax error on "2e+@foo" says syntax error on "2e+@foo" + says syntax error on "2e+f32" says syntax error on "2e+f32" + lexes "-0xFFFF" lexes "-0xFFFF" + says syntax error on "4.0_u32" says syntax error on "4.0_u32" + lexes "0b1_i64" lexes "0b1_i64" + lexes "nil?" lexes "nil?" + lexes "def?" lexes "def?" + lexes "!~" lexes "!~" + lexes ";" lexes ";" + lexes "-9223372036854775808" lexes "-9223372036854775808" + lexes "if" lexes "if" + says syntax error on "4f65" says syntax error on "4f65" + lexes "end?" lexes "end?" + lexes "require" lexes "require" + lexes ":&+" lexes ":&+" + lexes "false" lexes "false" + lexes "elsif?" lexes "elsif?" + lexes "|" lexes "|" + lexes "yield" lexes "yield" + lexes ":foo?" lexes ":foo?" + lexes "1E40" lexes "1E40" + lexes "1i64" lexes "1i64" + lexes "pointerof" lexes "pointerof" + lexes "0i32" lexes "0i32" + says syntax error on "0x100000000i32" says syntax error on "0x100000000i32" + lexes "0xffffffff" lexes "0xffffffff" + says syntax error on "\"\\x1z\"" says syntax error on "\"\\x1z\"" + lexes "2147483648" lexes "2147483648" + lexes "[]" lexes "[]" + lexes "10000000000000000000_u64" lexes "10000000000000000000_u64" + says syntax error on "-11111111111111111111" says syntax error on "-11111111111111111111" + says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + lexes "0o1000000000000000000000" lexes "0o1000000000000000000000" + says syntax error on "10e_10" says syntax error on "10e_10" + lexes "return!" lexes "return!" + says syntax error on "-.42" says syntax error on "-.42" + lexes not instance var lexes not instance var + lexes "1_234.567_890_f32" lexes "1_234.567_890_f32" + lexes ":[]=" lexes ":[]=" + lexes "0🔮" lexes "0🔮" + lexes "170141183460469231731687303715884105727_i128" lexes "170141183460469231731687303715884105727_i128" + lexes "do!" lexes "do!" + lexes ":\"foo\"" lexes ":\"foo\"" + lexes "1_i64" lexes "1_i64" + lexes "-0o123" lexes "-0o123" + lexes "," lexes "," + says syntax error on "-0_u64" says syntax error on "-0_u64" + lexes '\v' lexes '\v' + says syntax error on "0o73_f64" says syntax error on "0o73_f64" + says syntax error on "2e+" says syntax error on "2e+" + lexes "end!" lexes "end!" + lexes "nil!" lexes "nil!" + says syntax error on "4u3" says syntax error on "4u3" + lexes "0x3🔮" lexes "0x3🔮" + lexes "else?" lexes "else?" + lexes "_" lexes "_" + lexes '\a' lexes '\a' + lexes "responds_to?" lexes "responds_to?" + says syntax error on "2e+e" says syntax error on "2e+e" + lexes "0x1_i64" lexes "0x1_i64" + lexes "break!" lexes "break!" + lexes "<<" lexes "<<" + says syntax error on "128_i8" says syntax error on "128_i8" + lexes "+=" lexes "+=" + says syntax error on "18446744073709551616" says syntax error on "18446744073709551616" + lexes "+1.0f32" lexes "+1.0f32" + lexes "while" lexes "while" + says syntax error on "'\\u{110000}'" says syntax error on "'\\u{110000}'" + lexes "*=" lexes "*=" + lexes "&+@foo" lexes "&+@foo" + lexes "1_i8" lexes "1_i8" + lexes "12341234🔮" lexes "12341234🔮" + says syntax error on "0o1000000000000000000000i64" says syntax error on "0o1000000000000000000000i64" + says syntax error on "65536_u16" says syntax error on "65536_u16" + lexes "1_234.567_890" lexes "1_234.567_890" + lexes ":~" lexes ":~" + lexes "class?" lexes "class?" + lexes ":foo!" lexes ":foo!" + lexes "next?" lexes "next?" + lexes "&*" lexes "&*" + lexes "." lexes "." + lexes ":&*" lexes ":&*" + lexes "0f32" lexes "0f32" + lexes "0x7fffffffffffffff" lexes "0x7fffffffffffffff" + says syntax error on "0x1afafafafafafafafafafafu64" says syntax error on "0x1afafafafafafafafafafafu64" + lexes "0o777777777777777777777" lexes "0o777777777777777777777" + lexes "*" lexes "*" + lexes "=>" lexes "=>" + lexes "+1" lexes "+1" + says syntax error on "'" says syntax error on "'" + lexes "abstract" lexes "abstract" + lexes ":==" lexes ":==" + says syntax error on "$01" says syntax error on "$01" + says syntax error on ":\"foo" says syntax error on ":\"foo" + lexes "!=" lexes "!=" + says syntax error on "-32769_i16" says syntax error on "-32769_i16" + lexes "18446744073709551616_u128" lexes "18446744073709551616_u128" + lexes '\0' lexes '\0' + lexes ":!~" lexes ":!~" + lexes "0b11111111111111111111111111111111" lexes "0b11111111111111111111111111111111" + lexes "}" lexes "}" + lexes "for" lexes "for" + lexes "-1_i64" lexes "-1_i64" + lexes "0.5" lexes "0.5" + lexes "class!" lexes "class!" + lexes "{" lexes "{" + lexes "ident" lexes "ident" + lexes "1hello" lexes "1hello" + lexes ":!" lexes ":!" + lexes "annotation" lexes "annotation" + says syntax error on "-170141183460469231731687303715884105729" says syntax error on "-170141183460469231731687303715884105729" + lexes ":[]" lexes ":[]" + lexes "+1234" lexes "+1234" + lexes "true!" lexes "true!" + lexes symbol followed by == lexes symbol followed by == + says syntax error on "4i22" says syntax error on "4i22" + lexes "-1.0" lexes "-1.0" + lexes "@foo" lexes "@foo" + lexes "1_i128" lexes "1_i128" + lexes "1e23" lexes "1e23" + says syntax error on "0x10000_0000_0000_0000_u64" says syntax error on "0x10000_0000_0000_0000_u64" + lexes "def" lexes "def" + lexes symbol followed by === lexes symbol followed by === + lexes "typeof" lexes "typeof" + lexes "0o700000000000000000000" lexes "0o700000000000000000000" + 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 "-" lexes "-" + lexes "unless" lexes "unless" + lexes '\b' lexes '\b' + lexes "1_u16" lexes "1_u16" + lexes "]" lexes "]" + lexes "340282366920938463463374607431768211455_u128" lexes "340282366920938463463374607431768211455_u128" + lexes "14146167139683460000" lexes "14146167139683460000" + says syntax error on "00" says syntax error on "00" + says syntax error on "-1_u32" says syntax error on "-1_u32" + lexes "def!" lexes "def!" + lexes ":" lexes ":" + says syntax error on "4u65" says syntax error on "4u65" + lexes "0_f32" lexes "0_f32" + lexes "<<=" lexes "<<=" + lexes "0x3fffffffffffffff" lexes "0x3fffffffffffffff" + lexes "$~" lexes "$~" + lexes utf-8 char lexes utf-8 char + lexes "0b001111111111111111111111111111111111111111111111111111111111111111" lexes "0b001111111111111111111111111111111111111111111111111111111111111111" + says syntax error on "9223372036854775808_i64" says syntax error on "9223372036854775808_i64" + lexes ":[]?" lexes ":[]?" + doesn't raise if slash r with slash n doesn't raise if slash r with slash n + lexes "0o17777777777" lexes "0o17777777777" + lexes "+0o123" lexes "+0o123" + lexes ":===" lexes ":===" + lexes "0o40000000000" lexes "0o40000000000" + lexes space after char lexes space after char + says syntax error on "4u22" says syntax error on "4u22" + lexes char with unicode codepoint and curly with six hex digits lexes char with unicode codepoint and curly with six hex digits + lexes "module" lexes "module" + lexes "~" lexes "~" + says syntax error on "'\\uD800'" says syntax error on "'\\uD800'" + lexes comment and token lexes comment and token + says syntax error on "\"hi\\" says syntax error on "\"hi\\" + lexes ">=" lexes ">=" + says syntax error on "-0u64" says syntax error on "-0u64" + lexes "%" lexes "%" + lexes "^=" lexes "^=" + says syntax error on "4u33" says syntax error on "4u33" + lexes "<" lexes "<" + lexes "-1.0f32" lexes "-1.0f32" + lexes "-0x8000000000000000_i64" lexes "-0x8000000000000000_i64" + says syntax error on "-9999999999999999999" says syntax error on "-9999999999999999999" + lexes __FILE__ lexes __FILE__ + lexes "0x10000_0000_0000_0000_i128" lexes "0x10000_0000_0000_0000_i128" + lexes "+1_i128" lexes "+1_i128" + lexes "-2147483649" lexes "-2147483649" + lexes "?" lexes "?" + lexes "//" lexes "//" + says syntax error on "18446744073709551616_u64" says syntax error on "18446744073709551616_u64" + says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + says syntax error on "01_i64" says syntax error on "01_i64" + lexes "select" lexes "select" + lexes "with_1" lexes "with_1" + lexes "1i128hello" lexes "1i128hello" + lexes "/=" lexes "/=" + lexes "1.2e+23_f32" lexes "1.2e+23_f32" + lexes "0e40" lexes "0e40" + lexes "://" lexes "://" + says syntax error on "$0?" says syntax error on "$0?" + lexes "..." lexes "..." + lexes ":>" lexes ":>" + lexes "0o001777777777777777777777" lexes "0o001777777777777777777777" + says syntax error on "0o200_i8" says syntax error on "0o200_i8" + lexes "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128" lexes "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128" + lexes regex after \r\n lexes regex after \r\n + lexes ":!=" lexes ":!=" + says syntax error on "4294967296_u32" says syntax error on "4294967296_u32" + lexes char with unicode codepoint and curly lexes char with unicode codepoint and curly + says syntax error on "0x10000_0000_0000_0000" says syntax error on "0x10000_0000_0000_0000" + says syntax error on ".42" says syntax error on ".42" + lexes "18446744073709551615" lexes "18446744073709551615" + lexes "of" lexes "of" + lexes "begin" lexes "begin" + lexes "**=" lexes "**=" + lexes "^" lexes "^" + lexes "0xFFFFFFFF" lexes "0xFFFFFFFF" + lexes "2e01" lexes "2e01" + lexes "\t" lexes "\t" + lexes "break?" lexes "break?" + lexes "if!" lexes "if!" + lexes "1f64" lexes "1f64" + lexes "return?" lexes "return?" + lexes "in" lexes "in" + lexes "when" lexes "when" + says syntax error on "-9223372036854775809_i64" says syntax error on "-9223372036854775809_i64" + lexes ":+" lexes ":+" + lexes "0o123_i64" lexes "0o123_i64" + says syntax error on "0F32" says syntax error on "0F32" + lexes "/" lexes "/" + says syntax error on "-1_u16" says syntax error on "-1_u16" + lexes "offsetof" lexes "offsetof" + lexes "\n\n\n" lexes "\n\n\n" + says syntax error on "0o200000_00000000_00000000_u64" says syntax error on "0o200000_00000000_00000000_u64" + says syntax error on "0x8000000000000000i64" says syntax error on "0x8000000000000000i64" + lexes "verbatim" lexes "verbatim" + says syntax error on "4i3" says syntax error on "4i3" + lexes "instance_sizeof" lexes "instance_sizeof" + lexes float then zero (bug) lexes float then zero (bug) + lexes "+0.5" lexes "+0.5" + lexes "0b111111111111111111111111111111111111111111111111111111111111111" lexes "0b111111111111111111111111111111111111111111111111111111111111111" + lexes "0xffffffffffffffff" lexes "0xffffffffffffffff" + lexes "\1" lexes "\1" + lexes symbol with quote lexes symbol with quote + lexes "out" lexes "out" + lexes "$10" lexes "$10" + lexes "is_a?" lexes "is_a?" + lexes "alias" lexes "alias" + says syntax error on "18446744073709551616_i32" says syntax error on "18446744073709551616_i32" + lexes "1.0" lexes "1.0" + lexes "-=" lexes "-=" + lexes "Foo" lexes "Foo" + lexes "1i32" lexes "1i32" + lexes "=~" lexes "=~" + says syntax error on "-3_" says syntax error on "-3_" + lexes "until" lexes "until" + lexes "foo?" lexes "foo?" + lexes "0o37777777777" lexes "0o37777777777" + lexes ":%" lexes ":%" + lexes "===" lexes "===" + lexes "uninitialized" lexes "uninitialized" + lexes "\8" lexes "\8" + lexes "@@foo" lexes "@@foo" + lexes "::" lexes "::" + says syntax error on "256_u8" says syntax error on "256_u8" + lexes ":<<" lexes ":<<" + lexes "begin?" lexes "begin?" + lexes "1i64" lexes "1i64" + lexes "{%" lexes "{%" + lexes '\'' lexes '\'' + lexes "with_underscores" lexes "with_underscores" + lexes "else!" lexes "else!" + lexes "||=" lexes "||=" + lexes "$?" lexes "$?" + lexes ":かたな" lexes ":かたな" + lexes "0x7fffffff_i32" lexes "0x7fffffff_i32" + says syntax error on "4F32" says syntax error on "4F32" + lexes "!" lexes "!" + says syntax error on "0o12345671234567_12345671234567_i8" says syntax error on "0o12345671234567_12345671234567_i8" + lexes "0o17777777777_i32" lexes "0o17777777777_i32" + lexes "=" lexes "=" + lexes "-0.5" lexes "-0.5" + says syntax error on "2e+_2" says syntax error on "2e+_2" + lexes symbol with backslash (#2187) lexes symbol with backslash (#2187) + lexes "$23?" lexes "$23?" + lexes "as?" lexes "as?" + lexes "unless?" lexes "unless?" + lexes "macro" lexes "macro" + says syntax error on "32768_i16" says syntax error on "32768_i16" + lexes "0xFFFF" lexes "0xFFFF" + lexes ":foo" lexes ":foo" + lexes "0b100000000000000000000000000000000" lexes "0b100000000000000000000000000000000" + says syntax error on "0x1afafafafafafafafafafafi32" says syntax error on "0x1afafafafafafafafafafafi32" + says syntax error on "2147483648_i32" says syntax error on "2147483648_i32" + says syntax error on "0b10000000_i8" says syntax error on "0b10000000_i8" + says syntax error on "4i33" says syntax error on "4i33" + says syntax error on "-9223372036854775809" says syntax error on "-9223372036854775809" + says syntax error on "'\\1'" says syntax error on "'\\1'" + lexes "lib" lexes "lib" + lexes ":>=" lexes ":>=" + lexes "$_foo" lexes "$_foo" + lexes "1u8" lexes "1u8" + lexes "0xabcdef" lexes "0xabcdef" + lexes "1.2e+23" lexes "1.2e+23" + lexes "extend" lexes "extend" + lexes "-@foo" lexes "-@foo" + lexes "!@foo" lexes "!@foo" + says syntax error on "\"\\400\"" says syntax error on "\"\\400\"" + lexes "-0.0f32" lexes "-0.0f32" + lexes "\4" lexes "\4" + lexes "&-=" lexes "&-=" + lexes "118446744073709551616_u128" lexes "118446744073709551616_u128" + lexes "-0x80000001" lexes "-0x80000001" + lexes "0_i32" lexes "0_i32" + says syntax error on "'\\u{DFFF}'" says syntax error on "'\\u{DFFF}'" + lexes "end" lexes "end" + lexes "1f32" lexes "1f32" + lexes "1_u128" lexes "1_u128" + lexes "❨╯°□°❩╯︵┻━┻" lexes "❨╯°□°❩╯︵┻━┻" + lexes '\n' lexes '\n' + lexes "[]?" lexes "[]?" + lexes "&" lexes "&" + says syntax error on "0o1234567123456712345671234567" says syntax error on "0o1234567123456712345671234567" + lexes "<=" lexes "<=" + lexes "-9223372036854775809_i128" lexes "-9223372036854775809_i128" + lexes comment at the end lexes comment at the end + lexes "elsif" lexes "elsif" + says syntax error on "0b_10" says syntax error on "0b_10" + says syntax error on "0_12" says syntax error on "0_12" + says syntax error on "340282366920938463463374607431768211456" says syntax error on "340282366920938463463374607431768211456" + lexes "[]=" lexes "[]=" + lexes "1" lexes "1" + lexes "[" lexes "[" + lexes "100_000" lexes "100_000" + says syntax error on "-0e_12" says syntax error on "-0e_12" + lexes "private" lexes "private" + lexes "1.0hello" lexes "1.0hello" + lexes ">" lexes ">" + lexes "&-@foo" lexes "&-@foo" + lexes ">>" lexes ">>" + lexes "&**" lexes "&**" + lexes "rescue" lexes "rescue" + lexes "false?" lexes "false?" + says syntax error on "0o200000_00000000_00000000" says syntax error on "0o200000_00000000_00000000" + says syntax error on "4i12" says syntax error on "4i12" + lexes "1i8" lexes "1i8" + 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 ":|" lexes ":|" + lexes "1e+23" lexes "1e+23" + lexes "struct" lexes "struct" + says syntax error on "\"\\xz\"" says syntax error on "\"\\xz\"" + lexes "0xffff_ffff_ffff_ffff" lexes "0xffff_ffff_ffff_ffff" + lexes "0x8000000000000000" lexes "0x8000000000000000" + says syntax error on ":+1" says syntax error on ":+1" + says syntax error on "4f33" says syntax error on "4f33" + says syntax error on "\r1" says syntax error on "\r1" + says syntax error on "-0o7777777777777777777777777777777777777777777777777" says syntax error on "-0o7777777777777777777777777777777777777777777777777" + lexes "\10" lexes "\10" + lexes "do?" lexes "do?" + lexes "\n" lexes "\n" + lexes "$foo" lexes "$foo" + lexes "1i64hello" lexes "1i64hello" + says syntax error on "0o1234567123456712345671234567u64" says syntax error on "0o1234567123456712345671234567u64" + says syntax error on "-2147483649_i32" says syntax error on "-2147483649_i32" + lexes "1_i32" lexes "1_i32" + lexes "&&" lexes "&&" + lexes 'a' lexes 'a' + says syntax error on "0x1afafafafafafafafafafaf" says syntax error on "0x1afafafafafafafafafafaf" + says syntax error on "'\\uFEDZ'" says syntax error on "'\\uFEDZ'" + lexes char with unicode codepoint lexes char with unicode codepoint + lexes "union" lexes "union" + lexes "$1?" lexes "$1?" + says syntax error on "-129_i8" says syntax error on "-129_i8" + says syntax error on "0o40000000000i32" says syntax error on "0o40000000000i32" + says syntax error on "/\\" says syntax error on "/\\" + lexes "1i16" lexes "1i16" + lexes "true?" lexes "true?" + lexes "unless!" lexes "unless!" + lexes "\110" lexes "\110" + lexes "+0xFFFF" lexes "+0xFFFF" + lexes "+1_i64" lexes "+1_i64" + lexes "0o177777_77777777_77777777" lexes "0o177777_77777777_77777777" + lexes "-0xFFFFFFFF" lexes "-0xFFFFFFFF" + lexes "+" lexes "+" + lexes "-0b1010" lexes "-0b1010" + says syntax error on "0b1000000000000000000000000000000000000000000000000000000000000000i64" says syntax error on "0b1000000000000000000000000000000000000000000000000000000000000000i64" + lexes "ensure" lexes "ensure" + lexes "yield!" lexes "yield!" + lexes regex after \n lexes regex after \n + lexes ":-" lexes ":-" + lexes "&*=" lexes "&*=" + lexes "sizeof" lexes "sizeof" + lexes ":/" lexes ":/" + lexes "$1" lexes "$1" + lexes "$foo123" lexes "$foo123" + lexes "\x12" lexes "\x12" + lexes "@[" lexes "@[" + lexes "(" lexes "(" + lexes "1_i16" lexes "1_i16" + lexes "bar!" lexes "bar!" + lexes "{{" lexes "{{" + lexes "1_i64" lexes "1_i64" + lexes char with unicode codepoint and curly with zeros lexes char with unicode codepoint and curly with zeros + lexes "1i128" lexes "1i128" + says syntax error on "0xfffffffffffffffff_u64" says syntax error on "0xfffffffffffffffff_u64" + lexes "$10?" lexes "$10?" + lexes "<=>" lexes "<=>" + lexes __LINE__ lexes __LINE__ + lexes "break" lexes "break" + lexes "-0" lexes "-0" + lexes "+0b1010" lexes "+0b1010" + lexes "elsif!" lexes "elsif!" + says syntax error on "'\\uDFFF'" says syntax error on "'\\uDFFF'" + says syntax error on "118446744073709551616" says syntax error on "118446744073709551616" + lexes "then" lexes "then" + says syntax error on "-999999999999999999999999999999999999999" says syntax error on "-999999999999999999999999999999999999999" + lexes "next" lexes "next" + lexes "||" lexes "||" + lexes "%}" lexes "%}" + lexes "1234" lexes "1234" + says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000" says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000" + lexes "1_u64" lexes "1_u64" + lexes "1_u32" lexes "1_u32" + lexes "//=" lexes "//=" + lexes "0x80000001" lexes "0x80000001" + lexes "0x00ffffffffffffffff" lexes "0x00ffffffffffffffff" + lexes "as" lexes "as" + lexes ":&-" lexes ":&-" + says syntax error on "2e8i8" says syntax error on "2e8i8" + lexes '\\' lexes '\\' + lexes space after keyword lexes space after keyword + says syntax error on "-1_u8" says syntax error on "-1_u8" + lexes "0" lexes "0" + lexes ":foo=" lexes ":foo=" + lexes "9223372036854775808" lexes "9223372036854775808" + says syntax error on "4u12" says syntax error on "4u12" + says syntax error on "'\\u{}'" says syntax error on "'\\u{}'" + lexes "-1234" lexes "-1234" + lexes "&&=" lexes "&&=" + lexes "asm" lexes "asm" + says syntax error on "118446744073709551616_u64" says syntax error on "118446744073709551616_u64" + says syntax error on "-99999999999999999999" says syntax error on "-99999999999999999999" + lexes '\f' lexes '\f' + lexes "0i8" lexes "0i8" + lexes utf-8 multibyte char lexes utf-8 multibyte char + lexes "1e+23_f32" lexes "1e+23_f32" + says syntax error on "-1_u64" says syntax error on "-1_u64" + lexes "0xFFFF_u64" lexes "0xFFFF_u64" + says syntax error on "2e" says syntax error on "2e" + lexes "0b0_1" lexes "0b0_1" + lexes "1.0f32" lexes "1.0f32" + lexes ":>>" lexes ":>>" + lexes "1u16" lexes "1u16" + lexes ".." lexes ".." + says syntax error on "-1_u128" says syntax error on "-1_u128" + says syntax error on "1_.1" says syntax error on "1_.1" + doesn't raise if many slash r with slash n doesn't raise if many slash r with slash n + says syntax error on "0b🔮" says syntax error on "0b🔮" + lexes "0b1010" lexes "0b1010" + lexes "\xFF" lexes "\xFF" + lexes heredoc start lexes heredoc start + lexes "-0x80000000000000000000000000000000_i128" lexes "-0x80000000000000000000000000000000_i128" + lexes "1.foo" lexes "1.foo" + lexes '\0' lexes '\0' + lexes "class" lexes "class" + lexes "170141183460469231731687303715884105728_u128" lexes "170141183460469231731687303715884105728_u128" + lexes '\r' lexes '\r' + lexes "something" lexes "something" + lexes ":<=" lexes ":<=" + lexes "1_000" lexes "1_000" + invalid byte sequence invalid byte sequence + lexes "2_e2" lexes "2_e2" + lexes ":<=>" lexes ":<=>" + lexes "self" lexes "self" + lexes "1_u8" lexes "1_u8" + says syntax error on "-0x80000000000000000000000000000001" says syntax error on "-0x80000000000000000000000000000001" + lexes "**" lexes "**" + says syntax error on "0o7777777777777777777777777777777777777777777777777" says syntax error on "0o7777777777777777777777777777777777777777777777777" + lexes " " lexes " " + says syntax error on "0123" says syntax error on "0123" + lexes "1.0f32hello" lexes "1.0f32hello" + says syntax error on "2e+-2" says syntax error on "2e+-2" + lexes ">>=" lexes ">>=" + lexes "9223372036854775808_i128" lexes "9223372036854775808_i128" + lexes "-1_i128" lexes "-1_i128" + lexes symbol followed by != lexes symbol followed by != + lexes ":=~" lexes ":=~" + lexes "0o1000000000000000000000" lexes "0o1000000000000000000000" + says syntax error on "1__1" says syntax error on "1__1" + lexes "0x100000000" lexes "0x100000000" + lexes "while?" lexes "while?" + lexes "2147483648.foo" lexes "2147483648.foo" + lexes "1e-23" lexes "1e-23" + lexes "case" lexes "case" + lexes "&+" lexes "&+" + lexes != after identifier (#4815) lexes != after identifier (#4815) + lexes "1u128" lexes "1u128" + lexes "1u32" lexes "1u32" + lexes "|=" lexes "|=" + lexes "else" lexes "else" + lexes "enum" lexes "enum" + lexes ":*" lexes ":*" + says syntax error on "4F64" says syntax error on "4F64" + lexes "true" lexes "true" + lexes "do" lexes "do" + lexes "false!" lexes "false!" + lexes "" lexes "" + says syntax error on "0xFF_i8" says syntax error on "0xFF_i8" + lexes "0b1111111111111111111111111111111_i32" lexes "0b1111111111111111111111111111111_i32" + lexes "begin!" lexes "begin!" + lexes "+0" lexes "+0" + says syntax error on "-0x80000000000000000000000000000000" says syntax error on "-0x80000000000000000000000000000000" + lexes ":&**" lexes ":&**" + says syntax error on "'\\u{D800}'" says syntax error on "'\\u{D800}'" + lexes ")" lexes ")" + lexes "if?" lexes "if?" + lexes "==" lexes "==" + lexes "1u64" lexes "1u64" + lexes "nil" lexes "nil" + lexes ":**" lexes ":**" + lexes ":&" lexes ":&" + lexes "&-" lexes "&-" + lexes "&+=" lexes "&+=" + lexes "-1" lexes "-1" + lexes "0x7fffffff" lexes "0x7fffffff" + lexes "super" lexes "super" + says syntax error on "0b11_f32" says syntax error on "0b11_f32" + lexes "1.0f64" lexes "1.0f64" + lexes ":^" lexes ":^" + says syntax error on "'\\" says syntax error on "'\\" + lexes "with" lexes "with" + lexes "&=" lexes "&=" + lexes dot and ident lexes dot and ident + lexes "->" lexes "->" + lexes "next!" lexes "next!" + says syntax error on "9999999999999999999_i32" says syntax error on "9999999999999999999_i32" + lexes "return" lexes "return" + says syntax error on "0b100000000000000000000000000000000i32" says syntax error on "0b100000000000000000000000000000000i32" + says syntax error on "4i65" says syntax error on "4i65" + says syntax error on "4f22" says syntax error on "4f22" +Semantic: method_missing + finds method_missing with 'with ... yield' finds method_missing with 'with ... yield' + does method missing for generic type does method missing for generic type + errors if method_missing expands to multiple methods errors if method_missing expands to multiple methods + does error in method_missing macro with virtual type does error in method_missing macro with virtual type + does error in method_missing if wrong number of params does error in method_missing if wrong number of params + errors if method_missing expands to an incorrect method errors if method_missing expands to an incorrect method + doesn't look up method_missing in with_yield_scope if call has a receiver (#12097) doesn't look up method_missing in with_yield_scope if call has a receiver (#12097) +Code gen: next + codegens next with while inside block codegens next with while inside block + codegens next conditionally codegens next conditionally + codegens next with break (3) codegens next with break (3) + codegens next with break (1) codegens next with break (1) + codegens next with break (2) codegens next with break (2) + codegens next codegens next + codegens next without expressions codegens next without expressions + codegens next conditionally with int type (2) codegens next conditionally with int type (2) +Semantic: restrictions augmenter + augments relative private type in same namespace augments relative private type in same namespace + augments Bool augments Bool + augments Int32 augments Int32 + augments virtual metaclass type augments virtual metaclass type + augments Symbol augments Symbol + doesn't crash on macro that yields and defines class (#12142) doesn't crash on macro that yields and defines class (#12142) + augments Array(Int32).class augments Array(Int32).class + doesn't augment if the no_restrictions_augmenter flag is present doesn't augment if the no_restrictions_augmenter flag is present + augments Char | Int32 | String augments Char | Int32 | String + augments Char | Int32 | String augments Char | Int32 | String + augments type splat augments type splat + augments virtual type augments virtual type + augments generic uninstantiated type augments generic uninstantiated type + augments for class var augments for class var + augments Proc(Int32, Nil) augments Proc(Int32, Nil) + augments Pointer(Void) augments Pointer(Void) + augments Proc(Int32, Char) augments Proc(Int32, Char) + augments StaticArray(Int32, 8) augments StaticArray(Int32, 8) + augments Array(String) augments Array(String) + doesn't augment if assigned inside while doesn't augment if assigned inside while + augments relative private type augments relative private type + augments Int32.class augments Int32.class + augments for Union(*T) (#12435) augments for Union(*T) (#12435) + augments Nil augments Nil + augments Enumerable(Int32).class augments Enumerable(Int32).class + augments Tuple(Int32, Char) augments Tuple(Int32, Char) + doesn't augment if assigned inside if doesn't augment if assigned inside if + augments Float32 augments Float32 + augments recursive alias type (#12134) augments recursive alias type (#12134) + augments typedef augments typedef + doesn't augment if assigned inside block doesn't augment if assigned inside block + augments NoReturn augments NoReturn + augments NamedTuple(a: Int32, b: Char) augments NamedTuple(a: Int32, b: Char) + augments String augments String + augments relative public type augments relative public type + augments Char augments Char +Code gen: pointer + codegens pointer as if condition inside union (2) codegens pointer as if condition inside union (2) + codegens nilable pointer type (2) codegens nilable pointer type (2) + generates correct code for Pointer.malloc(0) (#2905) generates correct code for Pointer.malloc(0) (#2905) + codegens malloc codegens malloc + codegens nilable pointer type dispatch (2) codegens nilable pointer type dispatch (2) + codegens pointer as if condition inside union (1) codegens pointer as if condition inside union (1) + changes through var and reads from pointer changes through var and reads from pointer + increments pointer increments pointer + get pointer and value of it get pointer and value of it + codegens nilable pointer type (1) codegens nilable pointer type (1) + uses correct llvm module for typedef metaclass (#2877) uses correct llvm module for typedef metaclass (#2877) + can pass any pointer to something expecting void* in lib call, with to_unsafe can pass any pointer to something expecting void* in lib call, with to_unsafe + codegens nilable pointer type dispatch (1) codegens nilable pointer type dispatch (1) + assigns nil and pointer to nilable pointer type assigns nil and pointer to nilable pointer type + can pass any pointer to something expecting void* in lib call can pass any pointer to something expecting void* in lib call + codegens pointer cast to Nil (#8015) codegens pointer cast to Nil (#8015) + set pointer value set pointer value + gets pointer of argument that is never assigned to gets pointer of argument that is never assigned to + gets pointer of instance variable in virtual type gets pointer of instance variable in virtual type + can dereference pointer to func can dereference pointer to func + compares pointers through typedef compares pointers through typedef + passes arguments correctly for typedef metaclass (#8544) passes arguments correctly for typedef metaclass (#8544) + codegens realloc codegens realloc + takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var takes pointerof lib external var + codegens pointer as if condition codegens pointer as if condition + does pointerof class variable with class does pointerof class variable with class + get pointer of instance var get pointer of instance var + codegens pointer cast codegens pointer cast + calculates pointer diff calculates pointer diff + sets value of pointer to struct sets value of pointer to struct + sets value of pointer to union sets value of pointer to union + passes pointer of pointer to method passes pointer of pointer to method + get value of pointer to union get value of pointer to union + codegens null pointer as if condition codegens null pointer as if condition + creates pointer by address creates pointer by address + can assign nil to void pointer can assign nil to void pointer + does pointerof read variable does pointerof read variable + does pointerof class variable does pointerof class variable + gets pointer to constant gets pointer to constant gets pointer to constant gets pointer to constant gets pointer to constant gets pointer to constant gets pointer to constant gets pointer to constant gets pointer to constant gets pointer to constant + can use typedef pointer value get and set (#630) can use typedef pointer value get and set (#630) +Crystal::Repl::Interpreter + symbol + Symbol#to_s Symbol#to_s + Symbol#to_i Symbol#to_i + symbol equality symbol equality +Codegen: while + conditional break with value conditional break with value + doesn't crash on #2767 (4) doesn't crash on #2767 (4) + break with value break with value + codegens while with false codegens while with false + doesn't crash on #2767 doesn't crash on #2767 + codegens while with declared var 1 codegens while with declared var 1 + doesn't crash on while true begin break rescue (#7786) doesn't crash on while true begin break rescue (#7786) + codegens while with declared var 2 codegens while with declared var 2 + break with value, condition fails break with value, condition fails + endless break with value endless break with value + doesn't crash on #2767 (2) doesn't crash on #2767 (2) + endless conditional break with value endless conditional break with value + codegens while with declared var 3 codegens while with declared var 3 + break without value break without value + skip block with next skip block with next + doesn't crash on #2767 (3) doesn't crash on #2767 (3) + codegens def with while codegens def with while + codegens while with non-false condition codegens while with non-false condition + codegens endless while codegens endless while + doesn't crash on a = NoReturn doesn't crash on a = NoReturn + conditional break without value conditional break without value +Semantic: responds_to? + restricts virtual generic superclass to subtypes restricts virtual generic superclass to subtypes + restricts other types inside if else restricts other types inside if else + restricts virtual generic module to including types (#8334) restricts virtual generic module to including types (#8334) + restricts in assignment restricts in assignment + is bool is bool + restricts type inside if scope 1 restricts type inside if scope 1 +Semantic: pointer + errors with non-matching generic value with value= (#10211) errors with non-matching generic value with value= (#10211) + pointer malloc creates new type pointer malloc creates new type + can assign nil to void pointer can assign nil to void pointer + types pointer of constant types pointer of constant + create pointer by address create pointer by address + can assign pointerof virtual type (#8216) can assign pointerof virtual type (#8216) + errors with non-matching generic value with value=, union of generic types (#10544) errors with non-matching generic value with value=, union of generic types (#10544) + can pass any pointer to something expecting void* in lib call, with to_unsafe can pass any pointer to something expecting void* in lib call, with to_unsafe + can pass any pointer to something expecting void* in lib call can pass any pointer to something expecting void* in lib call + types pointer diff types pointer diff + types realloc types realloc + detects recursive pointerof expansion (2) (#1654) detects recursive pointerof expansion (2) (#1654) + takes pointerof lib external var takes pointerof lib external var + allows using pointer with subclass allows using pointer with subclass + can't do Pointer.malloc without type var can't do Pointer.malloc without type var + detects recursive pointerof expansion (#551) (#553) detects recursive pointerof expansion (#551) (#553) + types pointer value on typedef types pointer value on typedef + detects recursive pointerof expansion (4) detects recursive pointerof expansion (4) + type pointer casting type pointer casting + detects recursive pointerof expansion (3) detects recursive pointerof expansion (3) + types pointer value types pointer value + types Pointer.malloc types Pointer.malloc + types int pointer types int pointer + type pointer casting of object type type pointer casting of object type + errors with non-matching generic value with value=, generic type (#10211) errors with non-matching generic value with value=, generic type (#10211) + pointer of value error pointer of value error + doesn't crash if pointerof expansion type has generic splat parameter (#11808) doesn't crash if pointerof expansion type has generic splat parameter (#11808) + types pointer add types pointer add + errors if doing Pointer.allocate errors if doing Pointer.allocate + pointer of class raises error pointer of class raises error + says undefined variable (#7556) says undefined variable (#7556) +Crystal + normalize_path + assert assert + assert assert + assert assert + assert assert +Normalize: chained comparisons + normalizes two comparisons with literal normalizes two comparisons with literal + normalizes one comparison with var normalizes one comparison with var + normalizes one comparison with call normalizes one comparison with call + normalizes one comparison with literal normalizes one comparison with literal + normalizes two comparisons with calls normalizes two comparisons with calls Crystal::Repl::Interpreter pointers + discards pointer add discards pointer add + interprets pointer realloc wrapper interprets pointer realloc wrapper + interprets pointer set and get (int) interprets pointer set and get (int) + discards pointerof discards pointerof + pointerof read instance var pointerof read instance var discards pointer set discards pointer set + interprets pointer set and get (clear stack) interprets pointer set and get (clear stack) + interprets pointer set and get (union type) interprets pointer set and get (union type) + interprets pointer set and get (union type, setter value) interprets pointer set and get (union type, setter value) interprets pointerof, mutates pointer, read var interprets pointerof, mutates pointer, read var - interprets pointer add interprets pointer add - interprets pointerof and mutates memory (there are more variables) interprets pointerof and mutates memory (there are more variables) - interprets pointer diff interprets pointer diff + interprets nilable pointer truthiness interprets nilable pointer truthiness + discards pointer malloc discards pointer malloc + interprets pointer new and pointer address interprets pointer new and pointer address + discards pointer diff discards pointer diff + discards pointer new discards pointer new pointerof read `StaticArray#@buffer` (1) pointerof read `StaticArray#@buffer` (1) - interprets pointer set and get (int) interprets pointer set and get (int) - pointerof instance var pointerof instance var + discards pointer get discards pointer get interprets pointer set and get (bool) interprets pointer set and get (bool) - interprets pointer new and pointer address interprets pointer new and pointer address discards pointer realloc discards pointer realloc + interprets pointerof and mutates memory (there are more variables) interprets pointerof and mutates memory (there are more variables) interprets pointer realloc interprets pointer realloc - interprets nilable pointer truthiness interprets nilable pointer truthiness - discards pointer add discards pointer add - discards pointer malloc discards pointer malloc - interprets pointerof, mutates var, read pointer interprets pointerof, mutates var, read pointer - pointerof read instance var pointerof read instance var - discards pointer get discards pointer get - pointerof class var pointerof class var + interprets pointer diff interprets pointer diff interprets pointer diff, negative interprets pointer diff, negative - interprets pointer set and get (clear stack) interprets pointer set and get (clear stack) - discards pointerof discards pointerof + interprets pointerof, mutates var, read pointer interprets pointerof, mutates var, read pointer + interprets pointer add interprets pointer add pointerof read `StaticArray#@buffer` (2) pointerof read `StaticArray#@buffer` (2) - interprets pointer set and get (union type, setter value) interprets pointer set and get (union type, setter value) - interprets pointer realloc wrapper interprets pointer realloc wrapper - discards pointer diff discards pointer diff - interprets pointer set and get (union type) interprets pointer set and get (union type) - discards pointer new discards pointer new -Semantic: sizeof - types instance_alignof types instance_alignof - 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 - types instance_alignof NoReturn (missing type) (#5717) types instance_alignof NoReturn (missing type) (#5717) - types instance_sizeof types instance_sizeof - types alignof types alignof - gives error if using instance_sizeof on a struct gives error if using instance_sizeof on a struct - 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) - gives error if using instance_sizeof on a module gives error if using instance_sizeof on a module - errors on sizeof uninstantiated generic type (#6415) errors on sizeof uninstantiated generic type (#6415) - types alignof NoReturn (missing type) (#5717) types alignof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on a metaclass gives error if using instance_sizeof on a metaclass - types sizeof types sizeof - gives error if using instance_sizeof on a union type (#8349) gives error if using instance_sizeof on a union type (#8349) - types sizeof NoReturn (missing type) (#5717) types sizeof NoReturn (missing type) (#5717) - 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 - types instance_sizeof NoReturn (missing type) (#5717) types instance_sizeof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on an abstract struct (#11855) gives error if using instance_sizeof on an abstract struct (#11855) -Normalize: case - normalizes case with multiple expressions and non-tuple normalizes case with multiple expressions and non-tuple - normalizes case with assignment normalizes case with assignment - normalizes case without value with many expressions in when normalizes case without value with many expressions in when - normalizes case with assignment wrapped by paren normalizes case with assignment wrapped by paren - normalizes case with Generic.class to is_a? normalizes case with Generic.class to is_a? - normalizes case with multiple expressions with all underscores normalizes case with multiple expressions with all underscores - normalizes case with multiple expressions with all underscores twice normalizes case with multiple expressions with all underscores twice - normalizes case without cond, when but else normalizes case without cond, when but else - normalizes case with multiple expressions and types normalizes case with multiple expressions and types - normalizes case with multiple expressions and comma normalizes case with multiple expressions and comma - normalizes case with many expressions in when normalizes case with many expressions in when - normalizes case with implicit as (#3040) normalizes case with implicit as (#3040) - normalizes case without when but else normalizes case without when but else - normalizes case with nil to is_a? normalizes case with nil to is_a? - normalizes case with call normalizes case with call - normalizes case with implicit ! normalizes case with implicit ! - normalizes case with implicit is_a? (#3040) normalizes case with implicit is_a? (#3040) - normalizes case without cond, when and else normalizes case without cond, when and else - normalizes case without when and else normalizes case without when and else - normalizes case without value normalizes case without value - normalizes case with Path to is_a? normalizes case with Path to is_a? - normalizes case with multiple expressions normalizes case with multiple expressions - normalizes case with generic to is_a? normalizes case with generic to is_a? - normalizes case with Path.class to is_a? normalizes case with Path.class to is_a? - normalizes case with implicit call normalizes case with implicit call - normalizes case with implicit as? (#3040) normalizes case with implicit as? (#3040) - normalizes case with var in cond normalizes case with var in cond - normalizes case with multiple expressions with underscore normalizes case with multiple expressions with underscore - normalizes case with Path.class to is_a? (in) normalizes case with Path.class to is_a? (in) - normalizes case with implicit responds_to? (#3040) normalizes case with implicit responds_to? (#3040) - normalizes case with multiple expressions and implicit obj normalizes case with multiple expressions and implicit obj -context - can get context in file private module can get context in file private module - can get context inside a module can get context inside a module - can get context of empty def can get context of empty def - does includes args, instance vars, local variables and expressions on instance methods does includes args, instance vars, local variables and expressions on instance methods - can get context inside initialize can get context inside initialize - includes block args includes block args - can get context of nested yielded block can get context of nested yielded block - includes args includes args - can get context inside class methods can get context inside class methods - can display json output can display json output - includes assignments includes assignments - can get context in contained class' class method can get context in contained class' class method - can get context in file private method can get context in file private method - can handle union types can handle union types - can't get context from uncalled method can't get context from uncalled method - use type filters from is_a? use type filters from is_a? - does includes self on classes does includes self on classes - use type filters from if var use type filters from if var - includes last call includes last call - does not includes temp variables does not includes temp variables - can get context of yielded block can get context of yielded block - includes top level vars includes top level vars - can display text output can display text output - can get context in generic class can get context in generic class - consider different instances of def consider different instances of def - does includes regex special variables does includes regex special variables - can get context of empty yielded block can get context of empty yielded block + pointerof instance var pointerof instance var + pointerof class var pointerof class var +Codegen: class var + doesn't use nilable type for initializer doesn't use nilable type for initializer + inline initialization of simple class var inline initialization of simple class var + initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal + reads class var before initializing it (hoisting) reads class var before initializing it (hoisting) + catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer + declares var as uninitialized and initializes it unsafely declares var as uninitialized and initializes it unsafely + reads class var from virtual type reads class var from virtual type + codegens class var inside instance method codegens class var inside instance method + writes class var from virtual type writes class var from virtual type + accesses class var from proc literal accesses class var from proc literal + doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) + reads class var from virtual type metaclass reads class var from virtual type metaclass + codegens class var with begin and vars codegens class var with begin and vars + codegens class var inside module codegens class var inside module + codegens generic class with class var codegens generic class with class var + codegens class var as nil codegens class var as nil + gets pointerof class var gets pointerof class var + codegens class var with type declaration begin and vars codegens class var with type declaration begin and vars + uses var in class var initializer uses var in class var initializer + codegens second class var initializer codegens second class var initializer + initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var + codegens class var with nilable reference type codegens class var with nilable reference type + doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module + codegens class var as nil if assigned for the first time inside method codegens class var as nil if assigned for the first time inside method + declares and initializes declares and initializes + runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) + reads simple class var before another complex one reads simple class var before another complex one + codegens class var codegens class var + doesn't inherit class var value in module doesn't inherit class var value in module + gets pointerof class var complex constant gets pointerof class var complex constant + initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it + initializes class var of union with single type initializes class var of union with single type + doesn't inherit class var value in subclass doesn't inherit class var value in subclass +Init invocation + prints error if a file is already present prints error if a file is already present + doesn't error when asked to skip existing files doesn't error when asked to skip existing files + produces valid yaml file produces valid yaml file + errors if files will be overwritten by a generated file errors if files will be overwritten by a generated file + doesn't error if files will be overwritten by a generated file and --force is used doesn't error if files will be overwritten by a generated file and --force is used + honors the custom set directory name honors the custom set directory name +Code gen: type declaration + declares and initializes var declares and initializes var + codegens initialize instance var of superclass codegens initialize instance var of superclass + codegens initialize instance var with var declaration codegens initialize instance var with var declaration + codegens initialize instance var codegens initialize instance var + declares and initializes declares and initializes Crystal::Repl::Interpreter - named tuple - interprets named tuple metaclass indexer interprets named tuple metaclass indexer - discards named tuple (#12383) discards named tuple (#12383) - interprets named tuple literal and access by known index interprets named tuple literal and access by known index -Code gen: tuple - codegens union of tuple of float with tuple of tuple of float codegens union of tuple of float with tuple of tuple of float - codegens tuple [2..2]? codegens tuple [2..2]? - codegens tuple [2]? codegens tuple [2]? - codegens tuple [3..2]? codegens tuple [3..2]? - codegens tuple metaclass [2]? codegens tuple metaclass [2]? - passes empty tuple and empty named tuple to a method (#2852) passes empty tuple and empty named tuple to a method (#2852) - codegens tuple metaclass [1..0] codegens tuple metaclass [1..0] - merges two tuple types of same size (1) merges two tuple types of same size (1) - codegens tuple metaclass [3..2]? codegens tuple metaclass [3..2]? - passed tuple to def passed tuple to def - downcasts union inside tuple to value (#3907) downcasts union inside tuple to value (#3907) - codegens tuple [1..0]? codegens tuple [1..0]? - upcasts tuple inside union to union with compatible tuple upcasts tuple inside union to union with compatible tuple - codegens tuple [0..2]? codegens tuple [0..2]? - codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) - codegens tuple metaclass [1] codegens tuple metaclass [1] - codegens tuple metaclass [0] codegens tuple metaclass [0] - codegens tuple [2..2] codegens tuple [2..2] - assigns tuple inside union to union with compatible tuple assigns tuple inside union to union with compatible tuple - merges two tuple types of same size (2) merges two tuple types of same size (2) - accesses T and creates instance from it accesses T and creates instance from it - provides T as a tuple literal provides T as a tuple literal - codegens tuple [0..1]? codegens tuple [0..1]? + autocast + autocasts symbol to enum autocasts symbol to enum + autocasts integer var to integer (#12560) autocasts integer var to integer (#12560) + autocasts integer var to float (#12560) autocasts integer var to float (#12560) + autocasts number literal to integer autocasts number literal to integer + autocasts symbol to enum in multidispatch (#11782) autocasts symbol to enum in multidispatch (#11782) + autocasts symbol to enum in ivar initializer (#12216) autocasts symbol to enum in ivar initializer (#12216) + autocasts number literal to float autocasts number literal to float + autocasts int in multidispatch autocasts int in multidispatch + autocasts float32 var to float64 (#12560) autocasts float32 var to float64 (#12560) +Semantic: enum + disallows All value for @[Flags] enum disallows All value for @[Flags] enum + 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) + errors if reopen but not enum errors if reopen but not 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 + errors if reopen and tries to define constant errors if reopen and tries to define constant + types enum types enum + can redefine Enum.new can redefine Enum.new + errors if using a name twice errors if using a name twice + gives error on flags enum overflow gives error on flags enum overflow + finds class method in enum type finds class method in enum type + attaches annotation to enum method (#6690) attaches annotation to enum method (#6690) + errors if reopening enum with different base type (2) errors if reopening enum with different base type (2) + disallows implicit conversion of int to enum disallows implicit conversion of int to enum + errors if defining initialize in Enum (#7238) errors if defining initialize in Enum (#7238) + errors if inheriting Enum (#3592) errors if inheriting Enum (#3592) + has All value when defined as @[Flags] has All value when defined as @[Flags] + gives error on unsigned flags enum overflow after a member with value gives error on unsigned flags enum overflow after a member with value + errors if invoking private enum method errors if invoking private enum method + errors if declaring type inside enum, nested (#3127) errors if declaring type inside enum, nested (#3127) + defines method on enum defines method on enum + reopens enum with same base type (2) reopens enum with same base type (2) + errors if declaring type inside enum (#3127) errors if declaring type inside enum (#3127) + errors if using instance var inside enum (#991) errors if using instance var inside enum (#991) + errors on enum without members (#3447) errors on enum without members (#3447) + marks as flags with base type (#2185) marks as flags with base type (#2185) + gives error on enum overflow after a member with value gives error on enum overflow after a member with value + disallows redefining None to non-0 for @[Flags] enum disallows redefining None to non-0 for @[Flags] enum + reopens enum without base type (1) reopens enum without base type (1) + reopens enum without base type (2) reopens enum without base type (2) + doesn't overflow when going from negative to zero (#7874) doesn't overflow when going from negative to zero (#7874) + types enum value types enum value + reopens enum with same base type (1) reopens enum with same base type (1) + gives error on enum overflow gives error on enum overflow + doesn't visit enum members generated by macros twice (#10104) doesn't visit enum members generated by macros twice (#10104) + doesn't overflow on flags member (#7877) doesn't overflow on flags member (#7877) + finds method in enum type finds method in enum type + has None value when defined as @[Flags] has None value when defined as @[Flags] + reopens an enum reopens an enum + allows redefining None to 0 for @[Flags] enum allows redefining None to 0 for @[Flags] enum + errors if enum value is too big for type (#678) errors if enum value is too big for type (#678) + doesn't error when defining a method for an enum with flags doesn't error when defining a method for an enum with flags + can use macro for inside enum can use macro for inside enum + errors if reopening enum with different base type (1) errors if reopening enum with different base type (1) + 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 + creates enum from value creates enum from value + defines class method on enum defines class method on 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 + allows class vars in enum allows class vars in enum + can use macro expression inside enum can use macro expression inside enum +Code gen: alias + doesn't crash on cast to as recursive alias (#639) doesn't crash on cast to as recursive alias (#639) + doesn't break with alias for link attributes doesn't break with alias for link attributes + lazily solves aliases (#1346) lazily solves aliases (#1346) + 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) + overloads alias against generic (2) (#3261) overloads alias against generic (2) (#3261) + casts to recursive alias casts to recursive alias + 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) + 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 + 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) +Semantic: automatic cast + errors when autocast default value doesn't match enum member errors when autocast default value doesn't match enum member + casts integer variable to larger type (#9565) casts integer variable to larger type (#9565) + says ambiguous call for integer on alias (#6620) says ambiguous call for integer on alias (#6620) + casts literal integer (Int32 -> Float64) casts literal integer (Int32 -> Float64) + casts literal integer through alias with union casts literal integer through alias with union + casts literal integer through alias with union casts literal integer through alias with union + matches correct overload matches correct overload + can match multiple times with the same argument type (#7578) can match multiple times with the same argument type (#7578) + can autocast to union in default value can autocast to union in default value + casts Symbol to Enum in cvar type declaration casts Symbol to Enum in cvar type declaration + casts literal integer (Int32 -> Int64) casts literal integer (Int32 -> Int64) + casts Int32 to Int64 in cvar assignment casts Int32 to Int64 in cvar assignment + can autocast to union in default value (multiple enums) can autocast to union in default value (multiple enums) + doesn't say 'ambiguous call' when there's an exact match for symbol (#6601) doesn't say 'ambiguous call' when there's an exact match for symbol (#6601) + casts literal integer in private top-level method (#7016) casts literal integer in private top-level method (#7016) + can autocast to alias in default value can autocast to alias in default value + casts literal float (Float32 -> Float64) casts literal float (Float32 -> Float64) + autocasts nested type from non-nested type (#10315) autocasts nested type from non-nested type (#10315) + says ambiguous call for integer says ambiguous call for integer + casts Symbol to Enum in ivar assignment casts Symbol to Enum in ivar assignment + casts Int32 -> Int64 in arg restriction casts Int32 -> Int64 in arg restriction + autocasts first argument and second matches without autocast autocasts first argument and second matches without autocast + says ambiguous call for integer var to larger type (#9565) says ambiguous call for integer var to larger type (#9565) + casts literal integer (Int32 -> no restriction) casts literal integer (Int32 -> no restriction) + can't cast integer to another type when it doesn't fit (#9565) can't cast integer to another type when it doesn't fit (#9565) + doesn't autocast number on union (#8655) doesn't autocast number on union (#8655) + can autocast to union in default value (symbol and int) can autocast to union in default value (symbol and int) + doesn't do multidispatch if an overload matches exactly (#8217) doesn't do multidispatch if an overload matches exactly (#8217) + casts Int32 to Int64 in ivar assignment casts Int32 to Int64 in ivar assignment + says ambiguous call on union (#8655) says ambiguous call on union (#8655) + doesn't do multidispatch if an overload matches exactly (#8217) doesn't do multidispatch if an overload matches exactly (#8217) + casts Int32 to Int64 in ivar type declaration in generic casts Int32 to Int64 in ivar type declaration in generic + casts integer variable to larger type (Int64 to Int128) (#9565) casts integer variable to larger type (Int64 to Int128) (#9565) + doesn't cast integer variable to larger type (not #9565) doesn't cast integer variable to larger type (not #9565) + casts symbol literal to enum casts symbol literal to enum + casts Int32 to Int64 in lvar assignment casts Int32 to Int64 in lvar assignment + errors if symbol name doesn't match enum member errors if symbol name doesn't match enum member + says ambiguous call for symbol says ambiguous call for symbol + doesn't say 'ambiguous call' when there's an exact match for integer (#6601) doesn't say 'ambiguous call' when there's an exact match for integer (#6601) + says ambiguous call for integer (2) says ambiguous call for integer (2) + casts literal integer (Int64 -> Int32, ok) casts literal integer (Int64 -> Int32, ok) + autocasts integer variable to float type (#9565) autocasts integer variable to float type (#9565) + casts Int32 to Int64 in cvar type declaration casts Int32 to Int64 in cvar type declaration + casts Symbol to Enum in ivar type declaration casts Symbol to Enum in ivar type declaration + casts literal integer (Int64 -> Int32, too big) casts literal integer (Int64 -> Int32, too big) + casts literal float (Float64 -> Float32) casts literal float (Float64 -> Float32) + casts integer expression to larger type (#9565) casts integer expression to larger type (#9565) + casts literal integer (Int32 -> Float32) casts literal integer (Int32 -> Float32) + says ambiguous call for integer var to union type (#9565) says ambiguous call for integer var to union type (#9565) + casts Int32 to Int64 in ivar type declaration casts Int32 to Int64 in ivar type declaration + can use automatic cast with `with ... yield` (#7736) can use automatic cast with `with ... yield` (#7736) + autocasts float32 variable to float64 type (#9565) autocasts float32 variable to float64 type (#9565) +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) +Semantic: nil + can call a fun with nil for pointer can call a fun with nil for pointer + restricts type of 'while foo' restricts type of 'while foo' + restricts type of 'if foo' on assign restricts type of 'if foo' on assign + marks instance variables as nil when not in initialize marks instance variables as nil when not in initialize + doesn't check return type for void doesn't check return type for void + restricts type of 'while foo' on assign restricts type of 'while foo' on assign + types nil types nil + can call a fun with nil for typedef pointer can call a fun with nil for typedef pointer + restricts type of 'if foo' restricts type of 'if foo' + marks instance variables as nil when not in initialize 2 marks instance variables as nil when not in initialize 2 + types empty types empty + marks instance variables as nil but doesn't explode on macros marks instance variables as nil but doesn't explode on macros + doesn't check return type for nil doesn't check return type for nil +Semantic: doc + stores doc for enum with @[Flags] stores doc for enum with @[Flags] + stores doc for abstract def stores doc for abstract def + overwrites doc for enum when reopening overwrites doc for enum when reopening + stores doc for def with annotation stores doc for def with annotation + :ditto: + amend previous doc amend previous doc + stores doc for macro stores doc for macro + amend previous doc (without empty line) amend previous doc (without empty line) + stores doc for const stores doc for const + :ditto: references last non-ditto doc :ditto: references last non-ditto doc + stores doc for def stores doc for def + overwrites doc for struct when reopening overwrites doc for struct when reopening + stores doc for struct when reopening stores doc for struct when reopening + stores doc for abstract class stores doc for abstract class + stores doc for def with visibility stores doc for def with visibility + stores locations for auto-generated module stores locations for auto-generated module + stores doc for enum stores doc for enum + stores location for implicit flag enum members stores location for implicit flag enum members + overwrites doc for module when reopening overwrites doc for module when reopening + stores doc for def stores doc for def + doc before annotation + attached to macro call that produces multiple types attached to macro call that produces multiple types + attached to def attached to def + attached to struct/class attached to struct/class + attached to macro call attached to macro call + attached to alias attached to alias + attached to module attached to module + attached to macro attached to macro + attached to enum attached to enum + attached to constant attached to constant + stores doc for nodes defined in macro call stores doc for nodes defined in macro call + stores doc for macro stores doc for macro + overwrites doc for macro when redefining overwrites doc for macro when redefining + overwrites doc for def when redefining overwrites doc for def when redefining + overwrites doc for class when reopening overwrites doc for class when reopening + attaches doc to annotation in macro expansion (#9628) attaches doc to annotation in macro expansion (#9628) + stores doc for module stores doc for module + stores doc for constant stores doc for constant + attaches doc in double macro expansion (#8463) attaches doc in double macro expansion (#8463) + stores doc for enum when reopening stores doc for enum when reopening + stores doc for flags enum with base type stores doc for flags enum with base type + stores doc for module when reopening stores doc for module when reopening + stores doc for enum and doesn't mix with value stores doc for enum and doesn't mix with value + stores doc for macro defined in macro call stores doc for macro defined in macro call + stores doc for nodes defined in macro call (2) stores doc for nodes defined in macro call (2) + stores doc for class when reopening stores doc for class when reopening + stores doc for struct stores doc for struct + stores doc for class stores doc for class + stores doc for alias stores doc for alias + stores doc for fun def stores doc for fun def + stores doc for def with annotation stores doc for def with annotation + stores doc for enum member stores doc for enum member +Semantic: tuples + #[](NumberLiteral) + types, inbound index types, inbound index + gives error when indexing out of range on empty tuple gives error when indexing out of range on empty tuple + types, out of bound, nilable types, out of bound, nilable + gives error when indexing out of range gives error when indexing out of range + types, metaclass index types, metaclass index + types, inbound index, nilable types, inbound index, nilable + matches tuple with splat (2) (#2932) matches tuple with splat (2) (#2932) + 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 + accepts tuple covariance in array accepts tuple covariance in array + can call [] on T can call [] on T + errors on named tuple too big errors on named tuple too big + #[](Path) + works for tuple indexer works for tuple indexer + works for named tuple indexer works for named tuple indexer + accept tuple in type restriction accept tuple in type restriction + errors on recursive splat expansion (#218) errors on recursive splat expansion (#218) + errors on recursive splat expansion (2) (#361) errors on recursive splat expansion (2) (#361) + types tuple of three elements types tuple of three elements + doesn't unify tuple metaclasses (#5384) doesn't unify tuple metaclasses (#5384) + merges two tuple types of same size merges two tuple types of same size + types tuple of one element and then two elements types tuple of one element and then two elements + can iterate T can iterate T + doesn't trigger recursive splat expansion error (#7164) doesn't trigger recursive splat expansion error (#7164) allows tuple covariance allows tuple covariance - upcasts tuple union to compatible tuple upcasts tuple union to compatible tuple - assigns two same-size tuple types to a same var (#3132) assigns two same-size tuple types to a same var (#3132) - gets size at compile time gets size at compile time - codegens tuple [1..1] codegens tuple [1..1] - assigns tuple to compatible tuple assigns tuple to compatible tuple - downcasts union to mixed tuple type downcasts union to mixed tuple type - codegens tuple [1..0] codegens tuple [1..0] - codegens tuple [0..2] codegens tuple [0..2] - codegens tuple [1] (2) codegens tuple [1] (2) - codegens tuple [-3..2]? codegens tuple [-3..2]? - assigns tuple union to compatible tuple assigns tuple union to compatible tuple - codegens tuple [1..1]? codegens tuple [1..1]? - codegens tuple [1]? codegens tuple [1]? - codegens tuple [0]? codegens tuple [0]? - codegens tuple metaclass [0..1] codegens tuple metaclass [0..1] - codegens tuple metaclass [0..0] codegens tuple metaclass [0..0] - codegens tuple [0..0] codegens tuple [0..0] - upcasts tuple inside compatible tuple upcasts tuple inside compatible tuple - codegens tuple [0..1] codegens tuple [0..1] - codegens tuple [1] codegens tuple [1] - allows malloc pointer of tuple allows malloc pointer of tuple - codegens splats inside tuples codegens splats inside tuples - downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types - codegens tuple class codegens tuple class - codegens tuple [0] codegens tuple [0] - codegens tuple [0..0]? codegens tuple [0..0]? -Codegen: special vars - codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) - codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) - codegens $~ two levels codegens $~ two levels - codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) - allows with primitive allows with primitive - codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block - preserves special vars in macro expansion with call with default arguments (#824) preserves special vars in macro expansion with call with default arguments (#824) - codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block - codegens $~ codegens $~ - codegens after block 2 codegens after block 2 - allows with struct allows with struct - codegens $? codegens $? - codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block - preserves special vars if initialized inside block (#2194) preserves special vars if initialized inside block (#2194) - works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily - codegens with default argument codegens with default argument - codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) -Code gen: primitives - 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 - codegens string codegens string - codegens crystal_type_id with union type codegens crystal_type_id with union type - sums two numbers out of an [] of Number sums two numbers out of an [] of Number - codegens int codegens int - codegens pointer of int codegens pointer of int - codegens f64 codegens f64 - codegens long codegens long - codegens bool codegens bool - passes issue #328 passes issue #328 - doesn't treat `(1 == 1) == true` as `1 == 1 == true` (#328) doesn't treat `(1 == 1) == true` as `1 == 1 == true` (#328) - gets crystal class instance type id gets crystal class instance type id - va_arg - uses llvm's va_arg instruction uses llvm's va_arg instruction - 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 - 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) - allows redefining a primitive method allows redefining a primitive method - codegens f32 codegens f32 - codegens char codegens char - allows @[Primitive] on method that has body allows @[Primitive] on method that has body - arithmetic primitives - 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 16.unsafe_shl 2 codegens 16.unsafe_shl 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 + 2 - codegens 1 &+ 2 codegens 1 &+ 2 - codegens 8.unsafe_mod 3 codegens 8.unsafe_mod 3 - skips bounds checking when to_i produces same type skips bounds checking when to_i produces same type - 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 - codegens 16.unsafe_shr 2 codegens 16.unsafe_shr 2 - codegens 2 &* 3 codegens 2 &* 3 - codegens 8.unsafe_div 3 codegens 8.unsafe_div 3 - 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_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_f! codegens 1.to_f! - codegens 1 &- 2 codegens 1 &- 2 - 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 - allows @[Primitive] on fun declarations allows @[Primitive] on fun declarations - codegens crystal_type_id for class codegens crystal_type_id for class - codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 codegens int128 - codegens char ord codegens char ord - codegens __LINE__ codegens __LINE__ - uses built-in llvm function that returns a tuple uses built-in llvm function that returns a tuple - defined method that calls primitive (bug) defined method that calls primitive (bug) - can invoke cast on primitive typedef (#614) can invoke cast on primitive typedef (#614) -Code gen: no return - codegens if with no return and variable used afterwards codegens if with no return and variable used afterwards - codegens untyped typeof (#5105) codegens untyped typeof (#5105) - codegens Pointer(NoReturn).malloc codegens Pointer(NoReturn).malloc - codegen types exception handler as NoReturn if ensure is NoReturn codegen types exception handler as NoReturn if ensure is NoReturn - codegens no return variable declaration (#1508) codegens no return variable declaration (#1508) - codegens if with NoReturn on then and union on else codegens if with NoReturn on then and union on else - codegens no return instance variable declaration (#1508) codegens no return instance variable declaration (#1508) - codegens call with no return because of falsey if (#3661) codegens call with no return because of falsey if (#3661) -Call errors - says argument already specified says argument already specified - 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 type mismatch for symbol against enum (did you mean) says type mismatch for symbol against enum (did you mean) - says type mismatch for positional argument with two options says type mismatch for positional argument with two options - replaces free variables in positional argument replaces free variables in positional argument - says type mismatch for positional argument with three options says type mismatch for positional argument with three options - says no parameter named says no parameter named - 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 - errors on argument if more types are given than expected errors on argument if more types are given than expected - method signatures in error traces - expands double splat argument expands double splat argument - expands positional and single splat argument expands positional and single splat argument - expands positional and single splat argument, more elements expands positional and single splat argument, more elements - expands single splat argument expands single splat argument - includes named arguments includes named arguments - expands positional and single splat argument, empty tuple expands positional and single splat argument, empty tuple - includes named argument includes named argument - includes positional and named argument includes positional and named argument - expands double splat argument, empty named tuple expands double splat argument, empty named tuple - 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, empty tuple expands single splat argument, empty tuple - expands positional and double splat argument expands positional and double splat argument - uses `T.method` instead of `T.class#method` uses `T.method` instead of `T.class#method` - expands positional and double splat argument, more elements expands positional and double splat argument, more elements - 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 - says type mismatch for named argument says type mismatch for 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 - says type mismatch for symbol against enum, named argument case says type mismatch for symbol against enum, named argument case - says missing named argument says missing 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 - replaces generic type var in named argument replaces generic type var in named argument - replaces free variables in named argument replaces free variables in named argument - replaces generic type var in positional argument replaces generic type var in positional argument - says no parameters named says no parameters named - says expected to be invoked with a block says expected to be invoked with a block - says wrong number of arguments (to few arguments) says wrong number of arguments (to few arguments) - says not expected to be invoked with a block says not expected to be invoked with a block - says type mismatch for positional argument says type mismatch for positional 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 + errors on recursive splat expansion (1) (#361) errors on recursive splat expansion (1) (#361) + errors if non-tuple is splatted inside tuple (2) errors if non-tuple is splatted inside tuple (2) + types tuple with splats inside types tuple with splats inside + errors if using two splat indices on restriction errors if using two splat indices on restriction + doesn't error if Tuple has no args doesn't error if Tuple has no args + gives error when using named args on Tuple gives error when using named args on Tuple + types tuple of one element types tuple of one element + #[](RangeLiteral) + types, begin-less, end-less types, begin-less, end-less + types, inbound begin types, inbound begin + types, inbound begin, end-less types, inbound begin, end-less + types, exclusive range types, exclusive range + types, metaclass index types, metaclass index + types, inbound begin, nilable types, inbound begin, nilable + gives error when begin index is out of range gives error when begin index is out of range + types, begin-less types, begin-less + types, out of bound begin, nilable types, out of bound begin, nilable + errors on tuple too big (#3816) errors on tuple too big (#3816) + matches tuple with splat (#2932) matches tuple with splat (#2932) + types T as a tuple of metaclasses types T as a tuple of metaclasses + doesn't crash on tuple in not executed block (#6718) doesn't crash on tuple in not executed block (#6718) +Semantic: struct + marks as packed marks as packed + types struct setter types struct setter + errors if already defined with another type (2) errors if already defined with another type (2) + types Struct#new types Struct#new + types struct getter to struct types struct getter to struct + errors on struct if no field errors on struct if no field + errors if already defined errors if already defined + errors if includes and field already exists, the other way around errors if includes and field already exists, the other way around + errors if setting closure errors if setting closure + errors if includes and field already exists errors if includes and field already exists + types struct getter with keyword name types struct getter with keyword name + types struct getter multiple levels via new types struct getter multiple levels via new + includes another struct includes another struct + errors on struct setter if different type errors on struct setter if different type + supports macro if inside struct supports macro if inside struct + automatically converts numeric type in struct field assignment automatically converts numeric type in struct field assignment + types struct types struct + errors on empty c struct (#633) errors on empty c struct (#633) + errors if invoking to_unsafe and got different type errors if invoking to_unsafe and got different type + errors if invoking to_i32! and got wrong type errors if invoking to_i32! and got wrong type + errors if using void via typedef in struct field type errors if using void via typedef in struct field type + errors if includes unknown type errors if includes unknown type + can access instance var from the outside (#1092) can access instance var from the outside (#1092) + errors if invoking to_unsafe and got error in that call errors if invoking to_unsafe and got error in that call + errors if invoking to_i32! and got error in that call errors if invoking to_i32! and got error in that call + types struct getter types struct getter + errors if already defined with another type errors if already defined with another type + errors on struct setter if different type via new errors on struct setter if different type via new + errors if includes non-cstruct type errors if includes non-cstruct type + types struct getter on pointer type types struct getter on pointer type + allows inline forward declaration allows inline forward declaration + errors if using void in struct field type errors if using void in struct field type +Code gen: class + doesn't crash on #1216 with pointerof doesn't crash on #1216 with pointerof + codegens method call of instance var codegens method call of instance var + codegens singleton (#718) codegens singleton (#718) + notifies superclass recursively on inheritance (#576) notifies superclass recursively on inheritance (#576) + calls method on Class class calls method on Class class + doesn't crash on instance variable assigned a proc, and never instantiated (#923) doesn't crash on instance variable assigned a proc, and never instantiated (#923) + reads a union type instance var (reference union, first type) reads a union type instance var (reference union, first type) + changes instance variable in method (ssa bug) changes instance variable in method (ssa bug) + runs instance variable initializer at the class level, for generic type runs instance variable initializer at the class level, for generic type + uses number type var uses number type var + codegens assignment of generic metaclasses (4) (#10394) codegens assignment of generic metaclasses (4) (#10394) + codegens new which calls initialize codegens new which calls initialize + invokes class method inside instance method (#1119) invokes class method inside instance method (#1119) + runs with nilable instance var runs with nilable instance var + works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) works with array in variable initializer in generic type (#855) + transfers initializer from generic module to non-generic class transfers initializer from generic module to non-generic class + doesn't crash if not using undefined instance variable in superclass doesn't crash if not using undefined instance variable in superclass + does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class does to_s for class + codegens assignment of generic metaclasses (1) (#10394) codegens assignment of generic metaclasses (1) (#10394) + resolves type declaration when accessing instance var (#348) resolves type declaration when accessing instance var (#348) + codegens assignment of generic metaclasses, base is non-generic (1) (#10394) codegens assignment of generic metaclasses, base is non-generic (1) (#10394) + codegens method of class union including Int (#1476) codegens method of class union including Int (#1476) + allows initializing var with constant allows initializing var with constant + codegens instance var codegens instance var + codegens class method codegens class method + doesn't crash on #1216 (reduced) doesn't crash on #1216 (reduced) + makes .class always be a virtual type even if no subclasses makes .class always be a virtual type even if no subclasses + allows using self in class scope allows using self in class scope + codegens bug #168 codegens bug #168 + runs with nil instance var when inheriting runs with nil instance var when inheriting + allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope allows using self in class scope + reads a union type instance var (reference union, second type) reads a union type instance var (reference union, second type) + calls class method without self calls class method without self + does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) does to_s for virtual metaclass type (3) + codegens virtual method of generic class codegens virtual method of generic class + doesn't skip false initializers (#3272) doesn't skip false initializers (#3272) + codegens assignment of generic metaclasses (2) (#10394) codegens assignment of generic metaclasses (2) (#10394) + codegens method from another method without obj and accesses instance vars codegens method from another method without obj and accesses instance vars + transfers initializer from generic module to generic class transfers initializer from generic module to generic class + calls class method without self (2) calls class method without self (2) + codegens initialize with instance var codegens initialize with instance var + can assign virtual metaclass to virtual metaclass (#3007) can assign virtual metaclass to virtual metaclass (#3007) + doesn't crash on abstract class never instantiated (#2840) doesn't crash on abstract class never instantiated (#2840) + codegens virtual call that calls another method codegens virtual call that calls another method + runs instance variable initializer at the class level runs instance variable initializer at the class level + allows fixing an instance variable's type allows fixing an instance variable's type + does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) does to_s for virtual metaclass type (1) + reads a virtual type instance var reads a virtual type instance var + codegens recursive type codegens recursive type + assigns type to reference union type assigns type to reference union type + reads other instance var reads other instance var + codegens class with recursive tuple to class (#4520) codegens class with recursive tuple to class (#4520) + builds generic class bug builds generic class bug + doesn't skip zero initializers (#3272) doesn't skip zero initializers (#3272) + gets class of virtual type gets class of virtual type + never considers read instance var as closure (#12181) never considers read instance var as closure (#12181) + reads a union type instance var (mixed union, second type) reads a union type instance var (mixed union, second type) + works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) works with array in variable initializer in non-generic type (#855) + does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) does to_s for virtual metaclass type (2) + reads a union type instance var (mixed union, first type) reads a union type instance var (mixed union, first type) + codegens virtual metaclass union bug (#2597) codegens virtual metaclass union bug (#2597) + doesn't crash on #1216 doesn't crash on #1216 + transfers initializer from module to generic class transfers initializer from module to generic class + codegens virtual class method codegens virtual class method + codegens assignment of generic metaclasses, base is non-generic (2) (#10394) codegens assignment of generic metaclasses, base is non-generic (2) (#10394) + codegens virtual generic class instance metaclass (#3819) codegens virtual generic class instance metaclass (#3819) + codegens assignment of generic metaclasses (3) (#10394) codegens assignment of generic metaclasses (3) (#10394) + codegens call to same instance codegens call to same instance + does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class does to_s on class + can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) can use a Main class (#1628) +Parser doc + includes doc for struct includes doc for struct + includes doc for enum def includes doc for enum def + includes doc for macro includes doc for macro + includes doc for constant assign includes doc for constant assign + includes doc for module includes doc for module + includes doc for fun def includes doc for fun def + includes doc for def includes doc for def + includes doc for alias includes doc for alias + includes doc for abstract class includes doc for abstract class + includes doc for call without obj includes doc for call without obj + includes doc for class includes doc for class + includes doc for private def includes doc for private def + includes doc for annotation includes doc for annotation + includes doc for abstract def includes doc for abstract def + disables doc parsing inside defs disables doc parsing inside defs Semantic: named args - doesn't fail on named argument with NoReturn type (#7760) doesn't fail on named argument with NoReturn type (#7760) - overloads based on required named args overloads based on required named args - gives correct error message with external names (#3934) gives correct error message with external names (#3934) - errors if named arg already specified but in same position errors if named arg already specified but in same position - allows named arg if there's a splat allows named arg if there's a splat - uses bare splat in new uses bare splat in new - errors if named arg already specified, but multiple overloads (#7281) errors if named arg already specified, but multiple overloads (#7281) - errors if named arg not found in new errors if named arg not found in new - errors if missing one argument errors if missing one argument - gives correct error message for missing args after * gives correct error message for missing args after * - says no overload matches with named arg says no overload matches with named arg - matches specific overload with named arguments (2) (#2753) matches specific overload with named arguments (2) (#2753) sends two regular arguments as named arguments in inverted position (1) sends two regular arguments as named arguments in inverted position (1) - overloads based on required named args, with restrictions overloads based on required named args, with restrictions - sends two regular arguments as named arguments in inverted position (2) sends two regular arguments as named arguments in inverted position (2) - passes #2696 passes #2696 + says correct error when forwarding named args (#7491) says correct error when forwarding named args (#7491) + errors if named arg not found in new errors if named arg not found in new + errors if named arg already specified errors if named arg already specified + errors if doesn't pass named arg restriction errors if doesn't pass named arg restriction errors if missing two arguments errors if missing two arguments - errors if named arg not found errors if named arg not found sends one regular argument as named argument sends one regular argument as named argument - errors if doesn't pass named arg restriction errors if doesn't pass named arg restriction + errors if named arg already specified but in same position errors if named arg already specified but in same position + gives correct error message for missing args after * gives correct error message for missing args after * + errors if named arg already specified, but multiple overloads (#7281) errors if named arg already specified, but multiple overloads (#7281) + overloads based on required named args overloads based on required named args + errors if named arg not found errors if named arg not found + gives correct error message with external names (#3934) gives correct error message with external names (#3934) + overloads based on required named args, with restrictions overloads based on required named args, with restrictions + matches specific overload with named arguments (#2753) matches specific overload with named arguments (#2753) errors if named arg matches single splat argument errors if named arg matches single splat argument - errors if named arg already specified errors if named arg already specified errors if named arg matches splat argument errors if named arg matches splat argument - says correct error when forwarding named args (#7491) says correct error when forwarding named args (#7491) - errors if named arg already specified errors if named arg already specified + uses bare splat in new uses bare splat in new + doesn't fail on named argument with NoReturn type (#7760) doesn't fail on named argument with NoReturn type (#7760) + passes #2696 passes #2696 + says no overload matches with named arg says no overload matches with named arg + sends two regular arguments as named arguments in inverted position (2) sends two regular arguments as named arguments in inverted position (2) + errors if missing one argument errors if missing one argument + allows named arg if there's a splat allows named arg if there's a splat + matches specific overload with named arguments (2) (#2753) matches specific overload with named arguments (2) (#2753) sends two regular arguments as named arguments sends two regular arguments as named arguments - matches specific overload with named arguments (#2753) matches specific overload with named arguments (#2753) doesn't include arguments with default values in missing arguments error doesn't include arguments with default values in missing arguments error + errors if named arg already specified errors if named arg already specified Semantic: special vars infers in block with nested block infers in block with nested block - infers $~ infers $~ - infers in block infers in block + types $? when not defined as no return (2) types $? when not defined as no return (2) infers after block infers after block + infers $~ infers $~ infers $? infers $? - types $~ when not defined as no return (2) types $~ when not defined as no return (2) - types $~ when not defined as no return types $~ when not defined as no return + errors if assigning $~ at top level errors if assigning $~ at top level + infers in block infers in block + infers when assigning inside block infers when assigning inside block errors if assigning $? at top level errors if assigning $? at top level types $? when not defined as no return types $? when not defined as no return - infers when assigning inside block infers when assigning inside block - errors if assigning $~ at top level errors if assigning $~ at top level - types $? when not defined as no return (2) types $? when not defined as no return (2) -cleanup - strip named-tuple elements after unreachable element strip named-tuple elements after unreachable element - strip tuple elements after unreachable element strip tuple elements after unreachable element - errors if assigning var to itself errors if assigning var to itself - errors if assigning instance var to itself errors if assigning instance var to itself -Semantic: virtual - doesn't check cover for abstract classes doesn't check cover for abstract classes - dispatches virtual method dispatches virtual method - restricts with union and doesn't merge to super type restricts with union and doesn't merge to super type - types class and two subclasses types class and two subclasses - types two subclasses types two subclasses - finds overloads of union of virtual, class and nil with abstract class finds overloads of union of virtual, class and nil with abstract class - types instance var as virtual when using type declaration and has subclasses types instance var as virtual when using type declaration and has subclasses - uses virtual type as generic type if class is abstract even in union uses virtual type as generic type if class is abstract even in union - reports no matches for virtual type reports no matches for virtual type - uses virtual type as generic type if class is abstract uses virtual type as generic type if class is abstract - reports missing cover for subclass of abstract class reports missing cover for subclass of abstract class - automatically does virtual for generic type if there are subclasses automatically does virtual for generic type if there are subclasses - types two classes without a shared virtual types two classes without a shared virtual - types inspect types inspect - checks cover in every concrete subclass 2 checks cover in every concrete subclass 2 - works with restriction alpha works with restriction alpha - checks cover in every concrete subclass 3 checks cover in every concrete subclass 3 - types method call of virtual type with override types method call of virtual type with override - doesn't check methods on abstract classes 2 doesn't check methods on abstract classes 2 - reports undefined method in subclass of abstract class reports undefined method in subclass of abstract class - checks cover in every concrete subclass checks cover in every concrete subclass - types method call of virtual type types method call of virtual type - finds overloads of union of virtual, class and nil finds overloads of union of virtual, class and nil - doesn't check cover for subclasses doesn't check cover for subclasses - types class and subclass as one type types class and subclass as one type - removes instance var from subclasses removes instance var from subclasses - checks method in every concrete subclass but method in Object checks method in every concrete subclass but method in Object - doesn't check methods on abstract classes doesn't check methods on abstract classes - dispatches virtual method with overload dispatches virtual method with overload + types $~ when not defined as no return types $~ when not defined as no return + types $~ when not defined as no return (2) types $~ when not defined as no return (2) +Semantic: external/internal + overloads based on external name (#2610) overloads based on external name (#2610) + can call with external name and use with internal, after splat can call with external name and use with internal, after splat + can call positionally can call positionally + macros + can call positionally can call positionally + can call with external name and use with internal can call with external name and use with internal + can call with external name and use with internal, after splat can call with external name and use with internal, after splat + can call with external name and use with internal can call with external name and use with internal +Semantic: macro overload + doesn't overwrite last macro definition if named args differs doesn't overwrite last macro definition if named args differs +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 +Semantic: type + errors if original type doesn't support instance variables errors if original type doesn't support instance variables + can call methods of parent type can call methods of parent type + can call methods of original type can call methods of original type + can access instance variables of original type can access instance variables of original type +Normalize: op assign + normalizes @@var.value += normalizes @@var.value += + normalizes @var.value += normalizes @var.value += + normalizes var.value += normalizes var.value += + normalizes var *= normalizes var *= + normalizes exp.value ||= normalizes exp.value ||= + normalizes var[0] += normalizes var[0] += + normalizes @@var[0] += normalizes @@var[0] += + normalizes var &-= normalizes var &-= + normalizes var ||= normalizes var ||= + normalizes exp.value += normalizes exp.value += + normalizes var &*= normalizes var &*= + normalizes var &&= normalizes var &&= + normalizes exp.value &&= normalizes exp.value &&= + normalizes var &+= normalizes var &+= + normalizes var += normalizes var += + normalizes var -= normalizes var -= + normalizes @var[0] += normalizes @var[0] += + normalizes exp[value] &&= normalizes exp[value] &&= + normalizes exp[value] ||= normalizes exp[value] ||= + normalizes exp[value] += normalizes exp[value] += + normalizes exp[0] += normalizes exp[0] += +Code gen: ssa + 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 redefined var inside method with argument codegens a redefined var inside method with argument + codegens a var that is declared in a block (2) codegens a var that is declared in a block (2) + codegens ssa bug (2) codegens ssa bug (2) + codegens a redefined var inside method codegens a redefined var inside method + codegens a var that is declared in a block (1) codegens a var that is declared in a block (1) + codegens ssa bug (1) codegens ssa bug (1) + codegens declaration of var inside then when true codegens declaration of var inside then when true + 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 (2) codegens a var that is re-assigned in a block (2) + codegens a var that is re-assigned in a block codegens a var that is re-assigned in a block + codegens declaration of var inside then when false codegens declaration of var inside then when false +Normalize: and + normalizes and with ! on var normalizes and with ! on var + normalizes and with is_a? on exp normalizes and with is_a? on exp + normalizes and with assignment normalizes and with assignment + normalizes and with variable on the left normalizes and with variable on the left + normalizes and without variable normalizes and without variable + normalizes and with ! on var.is_a?(...) normalizes and with ! on var.is_a?(...) + normalizes and with is_a? on var normalizes and with is_a? on var +Crystal::Command::FlagsVisitor + only macro only macro + unique flags unique flags + different flags different flags +Normalize: proc pointer + normalizes proc pointer without object normalizes proc pointer without object + normalizes proc pointer with cvar receiver normalizes proc pointer with cvar receiver + normalizes proc pointer with const receiver normalizes proc pointer with const receiver + normalizes proc pointer with parameters, without object normalizes proc pointer with parameters, without object + normalizes proc pointer with variable receiver normalizes proc pointer with variable receiver + normalizes proc pointer with global const receiver normalizes proc pointer with global const receiver + normalizes proc pointer with ivar receiver normalizes proc pointer with ivar receiver + normalizes proc pointer of global call normalizes proc pointer of global call +Crystal::Repl::Interpreter + extern + discards primitive struct_or_union_set because it's a copy discards primitive struct_or_union_set because it's a copy + does automatic C cast does automatic C cast + interprets primitive struct_or_union_set and get (struct) interprets primitive struct_or_union_set and get (struct) + interprets primitive struct_or_union_set and get (union) interprets primitive struct_or_union_set and get (union) + sets struct field through pointer sets struct field through pointer + discards primitive struct_or_union_set and get (struct) discards primitive struct_or_union_set and get (struct) + sets extern struct proc field sets extern struct proc field +Codegen: double splat + double splats twice double splats twice + double splats named argument with positional arguments double splats named argument with positional arguments + matches double splat on method with named args and regular args matches double splat on method with named args and regular args + evaluates double splat argument just once (#2677) evaluates double splat argument just once (#2677) + double splats named argument with named args (1) double splats named argument with named args (1) + matches double splat on method with named args matches double splat on method with named args + double splats named argument into arguments (2) double splats named argument into arguments (2) + double splats named argument into arguments (1) double splats named argument into arguments (1) + double splats named argument with named args (2) double splats named argument with named args (2) + matches double splat with regular splat matches double splat with regular splat + removes literal types in all matches (#6239) removes literal types in all matches (#6239) +Code gen: enum + codegens enum bitflags (4) codegens enum bitflags (4) + codegens enum None redefined codegens enum None redefined + automatically defines question method for each enum member (false case) automatically defines question method for each enum member (false case) + codegens enum codegens enum + codegens enum bitflags (2) codegens enum bitflags (2) + codegens enum All redefined codegens enum All redefined + uses enum value before declaration (hoisting) uses enum value before declaration (hoisting) + automatically defines question method for each enum member (true case) automatically defines question method for each enum member (true case) + automatically defines question method for each enum member (flags, false case) automatically defines question method for each enum member (flags, false case) + adds a none? method to flags enum adds a none? method to flags enum + creates enum from value creates enum from value + can use macro calls inside enum value (#424) can use macro calls inside enum value (#424) + can use macro calls inside enum value, with receiver (#424) can use macro calls inside enum value, with receiver (#424) + does ~ at compile time for enum member does ~ at compile time for enum member + can use macro calls inside enum value, macro defined outside enum (#424) can use macro calls inside enum value, macro defined outside enum (#424) + can define flags enum : UInt128 with 128 values can define flags enum : UInt128 with 128 values + casts All value to base type casts All value to base type + codegens enum bitflags (1) codegens enum bitflags (1) + codegens enum without explicit value codegens enum without explicit value + automatically defines question method for each enum member (flags, true case) automatically defines question method for each enum member (flags, true case) + codegens enum bitflags None codegens enum bitflags None + can define flags enum : UInt64 with more than 32 values (#7268) can define flags enum : UInt64 with more than 32 values (#7268) + allows class vars in enum allows class vars in enum + can define flags enum : UInt128 with compile-time interpreted values can define flags enum : UInt128 with compile-time interpreted values + codegens enum value codegens enum value + can redefine Enum.new and use previous_def can redefine Enum.new and use previous_def + codegens enum bitflags All codegens enum bitflags All +Code gen: op assign + evaluates exps once, [] (#3398) evaluates exps once, [] (#3398) + evaluates exps once (#3398) evaluates exps once (#3398) +Semantic: extern struct + can use extern struct in lib can use extern struct in lib + declares with constructor declares with constructor + declares extern union with no constructor declares extern union with no constructor + can new with named args can new with named args + can include module can include module + overrides getter overrides getter + errors if using non-primitive for field type errors if using non-primitive for field type + can be passed to C fun can be passed to C fun + errors if using non-primitive type in constructor errors if using non-primitive type in constructor + declares extern struct with no constructor declares extern struct with no constructor + errors if using non-primitive for field type via module errors if using non-primitive for field type via module +Compiler + treats all arguments post-filename as program arguments treats all arguments post-filename as program arguments + runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename runs subcommand in preference to a filename + has a valid version has a valid version + compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file compiles a file Code gen: splat - does #2407 does #2407 - evaluates splat argument just once (#2677) evaluates splat argument just once (#2677) + splats on call splats on call splats splats splats in initialize splats in initialize - splats with default value splats with default value splats without args splats without args - splats with another arg splats with another arg - splats on call splats on call + does #2407 does #2407 splats with default value (2) splats with default value (2) + splats with another arg splats with another arg + evaluates splat argument just once (#2677) evaluates splat argument just once (#2677) splats with default value (3) splats with default value (3) -Semantic: union - treats void as nil in union treats void as nil in union - finds method in Object finds method in Object - errors if instantiates union errors if instantiates union - commutativity - module v.s. extending generic module instance metaclass module v.s. extending generic module instance metaclass - uninstantiated generic super-metaclass v.s. uninstantiated generic sub-metaclass uninstantiated generic super-metaclass v.s. uninstantiated generic sub-metaclass - generic module instance v.s. including module generic module instance v.s. including module - module v.s. including module module v.s. including module - module v.s. including generic module instance module v.s. including generic module instance - virtual metaclass v.s. generic subclass instance metaclass virtual metaclass v.s. generic subclass instance metaclass - superclass v.s. uninstantiated generic subclass superclass v.s. uninstantiated generic subclass - generic module instance v.s. including generic module instance generic module instance v.s. including generic module instance - generic module instance v.s. extending generic module instance metaclass generic module instance v.s. extending generic module instance metaclass - finds method in Value finds method in Value - merges types in the same hierarchy with Union merges types in the same hierarchy with Union - can use Union in type restriction (#2988) can use Union in type restriction (#2988) - can iterate T can iterate T - types union types union - can reopen Union can reopen Union - types union when arg is union types union when arg is union - looks up type in union type with free var looks up type in union type with free var - types union of same type types union of same type - doesn't run virtual lookup on unbound unions (#9173) doesn't run virtual lookup on unbound unions (#9173) - doesn't virtualize union elements (#7814) doesn't virtualize union elements (#7814) - doesn't crash with union of no-types (#5805) doesn't crash with union of no-types (#5805) - supports macro if inside union supports macro if inside union - types union when both obj and arg are union types union when both obj and arg are union - can reopen Union and access T can reopen Union and access T - types union when obj is union types union when obj is union - assigns to union and keeps new union type in call assigns to union and keeps new union type in call - types union of classes types union of classes -Semantic: uninitialized - can uninitialize variable outside initialize (#2828) can uninitialize variable outside initialize (#2828) - disallows declaring var of type Value disallows declaring var of type Value - declares as uninitialized and reads it declares as uninitialized and reads it - errors if declares var and then assigns other type errors if declares var and then assigns other type - disallows declaring var of type Reference disallows declaring var of type Reference - disallows declaring var of type Int disallows declaring var of type Int - declares an instance variable in initialize as uninitialized declares an instance variable in initialize as uninitialized - disallows declaring var of type Class disallows declaring var of type Class - disallows declaring var of type Struct disallows declaring var of type Struct - can uninitialize variable outside initialize, generic (#2828) can uninitialize variable outside initialize, generic (#2828) - errors if declaring generic type without type vars (with instance var) errors if declaring generic type without type vars (with instance var) - has type (#3641) has type (#3641) - disallows declaring var of type Number disallows declaring var of type Number - can use uninitialized with class type (#2940) can use uninitialized with class type (#2940) - errors if declaring generic type without type vars (with class var) errors if declaring generic type without type vars (with class var) - declares as uninitialized declares as uninitialized - works with uninitialized NoReturn (#3314) works with uninitialized NoReturn (#3314) - errors if declaring variable multiple times with different types (#917) errors if declaring variable multiple times with different types (#917) - disallows declaring var of type Enum disallows declaring var of type Enum - uses virtual type for uninitialized (#8216) uses virtual type for uninitialized (#8216) - disallows declaring var of type Object disallows declaring var of type Object - disallows declaring var of type Float disallows declaring var of type Float -Code gen: type declaration - codegens initialize instance var with var declaration codegens initialize instance var with var declaration - declares and initializes var declares and initializes var - codegens initialize instance var of superclass codegens initialize instance var of superclass - declares and initializes declares and initializes - codegens initialize instance var codegens initialize instance var -implementations - find implementors of classes that are only used find implementors of classes that are only used - find method calls inside while find method calls inside while - can display json output can display json output - find const implementation find const implementation - find method calls inside while cond find method calls inside while cond - find implementation inside a module class find implementation inside a module class - find class implementation find class implementation - find enum value implementation find enum value implementation - find method calls inside if find method calls inside if - find open class implementation find open class implementation - find class inside method find class inside method - find method calls inside trailing if find method calls inside trailing if - find implementation in class methods find implementation in class methods - find top level method calls find top level method calls - find implementation inside contained class' class method find implementation inside contained class' class method - find implementation in generic class methods find implementation in generic class methods - find alias implementation find alias implementation - find enum implementation find enum implementation - find implementation in generic class find implementation in generic class - find implementation inside contained file private class' class method find implementation inside contained file private class' class method - find full trace for macro expansions find full trace for macro expansions - find struct implementation find struct implementation - find implementation inside contained file private method find implementation inside contained file private method - can display text output can display text output - find module implementation find module implementation - find implementors of different classes find implementors of different classes - find method calls inside rescue find method calls inside rescue - find implementation from macro expansions find implementation from macro expansions - find class defined by macro find class defined by macro -Semantic: pointer - types Pointer.malloc types Pointer.malloc - type pointer casting type pointer casting - errors with non-matching generic value with value=, union of generic types (#10544) errors with non-matching generic value with value=, union of generic types (#10544) - says undefined variable (#7556) says undefined variable (#7556) - doesn't crash if pointerof expansion type has generic splat parameter (#11808) doesn't crash if pointerof expansion type has generic splat parameter (#11808) - type pointer casting of object type type pointer casting of object type - types realloc types realloc - errors with non-matching generic value with value=, generic type (#10211) errors with non-matching generic value with value=, generic type (#10211) - pointer malloc creates new type pointer malloc creates new type - detects recursive pointerof expansion (4) detects recursive pointerof expansion (4) - types pointer value on typedef types pointer value on typedef - types pointer value types pointer value - types pointer diff types pointer diff - can assign nil to void pointer can assign nil to void pointer - detects recursive pointerof expansion (2) (#1654) detects recursive pointerof expansion (2) (#1654) - can pass any pointer to something expecting void* in lib call, with to_unsafe can pass any pointer to something expecting void* in lib call, with to_unsafe - errors with non-matching generic value with value= (#10211) errors with non-matching generic value with value= (#10211) - detects recursive pointerof expansion (#551) (#553) detects recursive pointerof expansion (#551) (#553) - pointer of class raises error pointer of class raises error - can pass any pointer to something expecting void* in lib call can pass any pointer to something expecting void* in lib call - types pointer add types pointer add - types int pointer types int pointer - takes pointerof lib external var takes pointerof lib external var - detects recursive pointerof expansion (3) detects recursive pointerof expansion (3) - create pointer by address create pointer by address - can't do Pointer.malloc without type var can't do Pointer.malloc without type var - types pointer of constant types pointer of constant - pointer of value error pointer of value error - errors if doing Pointer.allocate errors if doing Pointer.allocate - allows using pointer with subclass allows using pointer with subclass - can assign pointerof virtual type (#8216) can assign pointerof virtual type (#8216) -Semantic: initialize - marks instance variable as nilable in initialize if using self in method marks instance variable as nilable in initialize if using self in method - types instance var as non-nilable if calls super and super defines it types instance var as non-nilable if calls super and super defines it - types instance var as nilable if used after method call that reads var (2) types instance var as nilable if used after method call that reads var (2) - doesn't type instance var as nilable if assigned before method call doesn't type instance var as nilable if assigned before method call - types instance vars as nilable if doesn't invoke super with default arguments types instance vars as nilable if doesn't invoke super with default arguments - marks instance variable as nilable when using self in super marks instance variable as nilable when using self in super - errors on default new when using named arguments (#2245) errors on default new when using named arguments (#2245) - types instance var as nilable if assigned in block types instance var as nilable if assigned in block - marks instance variable as nilable in initialize if assigning self marks instance variable as nilable in initialize if assigning self - doesn't mark instance variable as nilable when using self.class doesn't mark instance variable as nilable when using self.class - doesn't type instance var as nilable if used after method call that assigns var doesn't type instance var as nilable if used after method call that assigns var - doesn't type instance var as nilable if not used in method call doesn't type instance var as nilable if not used in method call - types instance var as nilable if not always assigned types instance var as nilable if not always assigned - types instance var as nilable if used before assignment types instance var as nilable if used before assignment - types instance var as not-nilable if assigned in block but previously assigned types instance var as not-nilable if assigned in block but previously assigned - doesn't type instance var as nilable if used after global method call doesn't type instance var as nilable if used after global method call - types instance var as non-nilable if calls super and super defines it, with one level of indirection types instance var as non-nilable if calls super and super defines it, with one level of indirection - checks instance vars of included modules checks instance vars of included modules - errors if found matches for initialize but doesn't cover all (bug #204) errors if found matches for initialize but doesn't cover all (bug #204) - types initializer of recursive generic type types initializer of recursive generic type - finishes when analyzing recursive calls finishes when analyzing recursive calls - types instance vars as nilable if doesn't invoke super in initialize with deep subclass types instance vars as nilable if doesn't invoke super in initialize with deep subclass - types instance var as nilable if used in first of two method calls types instance var as nilable if used in first of two method calls - doesn't type instance var as nilable if used after method call that doesn't read var doesn't type instance var as nilable if used after method call that doesn't read var - types instance var as nilable if used after method call that reads var through other calls types instance var as nilable if used after method call that reads var through other calls - types instance var as nilable if used after method call that reads var types instance var as nilable if used after method call that reads var - doesn't type ivar having initializer as nilable even if it is used before assigned inside initialize (#5112) doesn't type ivar having initializer as nilable even if it is used before assigned inside initialize (#5112) - doesn't type instance var as nilable if out doesn't type instance var as nilable if out - types initializer of generic type after instantiated types initializer of generic type after instantiated - doesn't type ivar as nilable if super call present and parent has already typed ivar (#4764) doesn't type ivar as nilable if super call present and parent has already typed ivar (#4764) - doesn't mark instance variable as nilable when using self.class in method doesn't mark instance variable as nilable when using self.class in method - doesn't type instance var as nilable if used after method call inside typeof doesn't type instance var as nilable if used after method call inside typeof - types instance vars as nilable if doesn't invoke super in initialize types instance vars as nilable if doesn't invoke super in initialize - marks instance variable as nilable in initialize if using self marks instance variable as nilable in initialize if using self -Code gen: case - codegens value-less case codegens value-less case - does case when with metaclass does case when with metaclass - 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 class codegens case with class - codegens case when constant bug (#1028) codegens case when constant bug (#1028) - 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 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 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 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 + splats with default value splats with default value Semantic: hooks + errors if wrong inherited params size errors if wrong inherited params size + does added method macro does added method macro + does included macro does included macro types macro finished hook bug regarding initialize (#3964) types macro finished hook bug regarding initialize (#3964) - includes error message in included hook (#889) includes error message in included hook (#889) + does inherited macro through generic instance type (#9693) does inherited macro through generic instance type (#9693) + does extended macro does extended macro does inherited macro for generic class does inherited macro for generic class - errors if wrong finished params length errors if wrong finished params length errors if wrong included params size errors if wrong included params size - does added method macro does added method macro errors if wrong extended params length errors if wrong extended params length - types initializer in inherited types initializer in inherited does inherited macro does inherited macro + errors if wrong extended params size errors if wrong extended params size + types initializer in inherited types initializer in inherited + errors if wrong finished params length errors if wrong finished params length does included macro for generic module does included macro for generic module - does included macro does included macro - does extended macro does extended macro - errors if wrong inherited params size errors if wrong inherited params size does not invoke 'method_added' hook recursively does not invoke 'method_added' hook recursively - errors if wrong extended params size errors if wrong extended params size - does inherited macro through generic instance type (#9693) does inherited macro through generic instance type (#9693) -Code gen: hash literal spec - creates custom generic hash via alias (2) creates custom generic hash via alias (2) - creates custom non-generic hash in module creates custom non-generic hash in module - assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works assignment in hash-like literal works - creates custom generic hash via alias (1) creates custom generic hash via alias (1) - doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) doesn't crash on hash literal with proc pointer (#646) - creates custom generic hash in module (#5684) creates custom generic hash in module (#5684) - assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works assignment in hash literal works - creates custom non-generic hash creates custom non-generic hash - creates custom generic hash with type vars creates custom generic hash with type vars - creates custom generic hash creates custom generic hash -Semantic: var - 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 - errors if reads from underscore errors if reads from underscore - errors if declaring var that is already declared errors if declaring var that is already declared - declares local variable and assigns wrong type declares local variable and assigns wrong type - declares local variable with value declares local variable with value - declares local variable and then assigns it declares local variable and then assigns it - reports there's no self reports there's no self - reports variable always nil reports variable always nil - types an assign with type declaration types an assign with type declaration - types an assign types an assign - declares local variable but doesn't assign it in all branches declares local variable but doesn't assign it in all branches - errors if variable already exists errors if variable already exists - types a variable types a variable - reports undefined local variable or method reports undefined local variable or method - errors if declaring generic type without type vars (with local var) errors if declaring generic type without type vars (with local var) - declares local variable and assigns it with if declares local variable and assigns it with if - 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 immediately reads it declares local variable and immediately reads it -Codegen: private - codegens overloaded private def in same file codegens overloaded private def in same file - doesn't include filename for private types doesn't include filename for private types - codegens class vars of private types with same name (#11620) codegens class vars of private types with same name (#11620) - codegens class var of private type with same name as public type (#11620) codegens class var of private type with same name as public type (#11620) - codegens private def in same file codegens private def in same file -Semantic: closure - errors if forwarding block param doesn't match input type errors if forwarding block param doesn't match input type - marks method as self closured if instance var is read marks method as self closured if instance var is read - errors if sending closured proc pointer to C (3) errors if sending closured proc pointer to C (3) - doesn't closure typeof local var doesn't closure typeof local var - transforms block to proc literal with free var transforms block to proc literal with free var - 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 - allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize - transforms block to proc literal with void type transforms block to proc literal with void type - marks variable as closured in program marks variable as closured in program - errors if forwarding block param doesn't match input type size errors if forwarding block param doesn't match input type size - marks variable as closured inside block in fun marks variable as closured inside block in fun - marks method as self closured if implicit self call is made marks method as self closured if implicit self call is made - 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 - unifies types of closured var (1) unifies types of closured var (1) - errors if sending closured proc pointer to C (1) errors if sending closured proc pointer to C (1) - can use fun typedef as block type can use fun typedef as block type - marks method as self closured if instance var is written marks method as self closured if instance var is written - errors if sending closured proc pointer to C (2) errors if sending closured proc pointer to C (2) - 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 - 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 method as self closured if used inside a block marks method as self closured if used inside a block - marks variable as closured in def marks variable as closured in def - passes #227 passes #227 - transforms block to proc literal transforms block to proc literal - errors if sending closured proc pointer to C (1.2) errors if sending closured proc pointer to C (1.2) - correctly captures type of closured block arg correctly captures type of closured block arg - marks outer fun as closured when using self marks outer fun as closured when using self - marks variable as closured in block marks variable as closured in block - 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 - transforms block to proc literal without parameters transforms block to proc literal without parameters - unifies types of closured var (2) unifies types of closured var (2) - errors if sending closured proc literal to C errors if sending closured proc literal to C - 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 - doesn't crash for non-existing variable (#3789) doesn't crash for non-existing variable (#3789) - 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 - gives error when doing yield inside proc literal gives error when doing yield inside proc literal - errors when transforming block to proc literal if type mismatch errors when transforming block to proc literal if type mismatch - doesn't mark var as closured if only used in two block doesn't mark var as closured if only used in two block - says can't send closure to C with captured block says can't send closure to C with captured block - 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 - lookups return type in correct scope lookups return type in correct scope - 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 - correctly detects previous var as closured (#5609) correctly detects previous var as closured (#5609) - says can't send closure to C with new notation says can't send closure to C with new notation - 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 - allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal - marks outer fun inside a block as closured marks outer fun inside a block as closured - doesn't closure typeof instance var (#9479) doesn't closure typeof instance var (#9479) - doesn't mark var as closured if only used in block doesn't mark var as closured if only used in block - marks method as self closured if explicit self call is made marks method as self closured if explicit self call is made -Normalize: range literal - normalizes exclusive normalizes exclusive - normalizes not exclusive normalizes not exclusive -Code gen: C ABI - 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) - 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) - 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) - 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) - 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) - 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) - 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 (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) - 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) - 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 - 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) -Semantic: primitives - types @[Primitive] method types @[Primitive] method - errors if using instance variable inside primitive type errors if using instance variable inside primitive type - correctly types first hash from type vars (bug) correctly types first hash from type vars (bug) - types pointer of int types pointer of int - extends from Number and doesn't find + method extends from Number and doesn't find + method - types a float64 types a float64 - types a int64 types a int64 - types 1 + 2 types 1 + 2 - types a char types a char - types nop types nop - types nil types nil - types char ord types char ord - 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 - allows @[Primitive] on method that has body allows @[Primitive] on method that has body - errors if @[Primitive] has no args errors if @[Primitive] has no args - looks up return type in correct scope (#13652) looks up return type in correct scope (#13652) - types a symbol types a symbol - types a float32 types a float32 - can invoke binary on primitive typedef (#614) can invoke binary on primitive typedef (#614) - types a int128 types a int128 - Reference.pre_initialize - types with virtual reference type types with virtual reference type - errors on uninstantiated generic type errors on uninstantiated generic type - types with reference type types with reference type - errors on abstract type errors on abstract type - types a bool types a bool - errors if @[Primitive] has non-symbol arg errors if @[Primitive] has non-symbol arg - types a uint128 types a uint128 - types a string types a string - can invoke cast on primitive typedef (#614) can invoke cast on primitive typedef (#614) - errors when comparing void (#225) errors when comparing void (#225) - types an expression types an expression - 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 - Slice.literal - with element type - types primitive float literal types primitive float literal - errors if element type is not primitive int or float errors if element type is not primitive int or float - types primitive int literal types primitive int literal - types empty literal types empty literal - 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 - computes correct hash value type if it's a function literal (#320) computes correct hash value type if it's a function literal (#320) - types an int32 types an int32 -Code gen: not - doesn't crash doesn't crash - codegens not nilable type (true) codegens not nilable type (true) - codegens not pointer (false) codegens not pointer (false) - codegens not pointer (true) codegens not pointer (true) - codegens not nilable type (false) codegens not nilable type (false) - codegens not number codegens not number - codegens not with inlinable value (#6451) codegens not with inlinable value (#6451) - codegens not true codegens not true - codegens not false codegens not false - codegens not nil codegens not nil -Semantic: type - can access instance variables of original type can access instance variables of original type - errors if original type doesn't support instance variables errors if original type doesn't support instance variables - can call methods of original type can call methods of original type - can call methods of parent type can call methods of parent type -Semantic: previous_def - types previous def with forwarded arguments, different internal names (#8895) types previous def with forwarded arguments, different internal names (#8895) - says wrong number of arguments for previous_def (#1223) says wrong number of arguments for previous_def (#1223) - types previous def types previous def - 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 when inside fun types previous def when inside fun - errors if there's no previous def errors if there's no previous def - types previous def with forwarded arguments, def has parameters types previous def with forwarded arguments, def has parameters - types previous def in generic class types previous def in generic class - types previous def with restrictions types previous def with restrictions - types previous def with forwarded arguments, def has bare splat parameter (#8895) types previous def with forwarded arguments, def has bare splat parameter (#8895) - 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 with named arguments, def has double splat parameter (#8895) types previous def with named arguments, def has double splat parameter (#8895) - types previous def with explicit arguments types previous def with explicit arguments - types previous def when inside fun and forwards args types previous def when inside fun and forwards args -Codegen: while - break with value, condition fails break with value, condition fails - doesn't crash on while true begin break rescue (#7786) doesn't crash on while true begin break rescue (#7786) - conditional break without value conditional break without value - doesn't crash on #2767 (2) doesn't crash on #2767 (2) - conditional break with value conditional break with value - codegens def with while codegens def with while - codegens while with false codegens while with false - endless break with value endless break with value - break with value break with value - codegens endless while codegens endless while - codegens while with non-false condition codegens while with non-false condition - skip block with next skip block with next - doesn't crash on #2767 (3) doesn't crash on #2767 (3) - doesn't crash on #2767 (4) doesn't crash on #2767 (4) - codegens while with declared var 1 codegens while with declared var 1 - break without value break without value - doesn't crash on #2767 doesn't crash on #2767 - codegens while with declared var 3 codegens while with declared var 3 - codegens while with declared var 2 codegens while with declared var 2 - doesn't crash on a = NoReturn doesn't crash on a = NoReturn - endless conditional break with value endless conditional break with value -Crystal::JSONHierarchyPrinter - works works -Semantic: macro overload - doesn't overwrite last macro definition if named args differs doesn't overwrite last macro definition if named args differs -Code gen: next - codegens next conditionally codegens next conditionally - codegens next with break (1) codegens next with break (1) - codegens next codegens next - codegens next conditionally with int type (2) codegens next conditionally with int type (2) - codegens next with break (3) codegens next with break (3) - codegens next with break (2) codegens next with break (2) - codegens next with while inside block codegens next with while inside block - codegens next without expressions codegens next without expressions -Semantic: class var - infers in multiple assign for tuple type (1) infers in multiple assign for tuple type (1) - allows self.class as type var in class body (#537) allows self.class as type var in class body (#537) - errors on undefined constant (1) errors on undefined constant (1) - redefines class variable type redefines class variable type - errors if using self as type var but there's no self errors if using self as type var but there's no self - errors when using Class (#2605) errors when using Class (#2605) - types as nilable if doesn't have initializer types as nilable if doesn't have initializer - 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) - errors if using local variable in initializer errors if using local variable in initializer - types class var types class var - doesn't error if accessing class variable before defined (#2941) doesn't error if accessing class variable before defined (#2941) - errors if redefining class var type in included module errors if redefining class var type in included module - types class var inside instance method types class var inside instance method - errors on undefined constant (2) errors on undefined constant (2) - doesn't error on recursive dependency if var is nilable (#2943) doesn't error on recursive dependency if var is nilable (#2943) - infers type from number literal infers type from number literal - can access constant from generic metaclass (#3719) can access constant from generic metaclass (#3719) - infers type from T.new infers type from T.new - can find class var through included module can find class var through included module - says undefined class variable says undefined class variable - types class var inside proc literal inside class types class var inside proc literal inside class - can find class var in subclass can find class var in subclass - errors if redefining class var type in subclass, with guess errors if redefining class var type in subclass, with guess - declares class var in generic class declares class var in generic class - declares class variable declares class variable - errors if redefining class var type in subclass errors if redefining class var type in subclass - errors if using class variable at the top level errors if using class variable at the top level - types class var as nil if not assigned at the top level types class var as nil if not assigned at the top level - 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) - declares class variable (2) declares class variable (2) - errors when typing a class variable inside a method errors when typing a class variable inside a method - declares uninitialized (#2935) declares uninitialized (#2935) - errors if class variable not nilable without initializer errors if class variable not nilable without initializer - allows class var in primitive types (#612) allows class var in primitive types (#612) - 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 - declares class var in generic module declares class var in generic module -Semantic: lib - supports forward references with struct inside struct (#399) supports forward references with struct inside struct (#399) - errors if defining incompatible funs with the same name in the same lib (#3045) errors if defining incompatible funs with the same name in the same lib (#3045) - reports error when changing var type and something breaks reports error when changing var type and something breaks - can use macros inside lib can use macros inside lib - types fun returning void as nil types fun returning void as nil - errors if using void via typedef as parameter (related to #508) errors if using void via typedef as parameter (related to #508) - disallows passing nil or pointer to arg expecting pointer disallows passing nil or pointer to arg expecting pointer - reports error on fun argument type not primitive like, Nil (#2994) reports error on fun argument type not primitive like, Nil (#2994) - passes int as another integer type in variable passes int as another integer type in variable - warns if Link annotations use positional arguments warns if Link annotations use positional arguments - errors if fourth argument is not a bool errors if fourth argument is not a bool - types lib var get types lib var get - errors if using void as parameter (related to #508) errors if using void as parameter (related to #508) - errors if missing link arguments errors if missing link arguments - errors if CallConvention argument is not a valid string errors if CallConvention argument is not a valid string - clears annotations after lib clears annotations after lib - raises on undefined fun raises on undefined fun - passes float as another integer type in variable passes float as another integer type in variable - errors if lib named arg is not a String errors if lib named arg is not a String - can list lib functions at the top level (#12395) can list lib functions at the top level (#12395) - errors if invoking to_i32! and got error in that call errors if invoking to_i32! and got error in that call - errors if wrong number of arguments for CallConvention errors if wrong number of arguments for CallConvention - errors if passing void lib call to call argument (#4414) errors if passing void lib call to call argument (#4414) - reopens lib and adds more link annotations reopens lib and adds more link annotations - errors if second argument is not a string errors if second argument is not a string - errors if dll argument does not end with '.dll' errors if dll argument does not end with '.dll' - errors if lib fun call is part of dispatch errors if lib fun call is part of dispatch - errors if invoking to_i32! and got wrong type errors if invoking to_i32! and got wrong type - errors if unknown named arg errors if unknown named arg - reports error on fun return type not primitive like reports error on fun return type not primitive like - errors if using out with void pointer (#2424) errors if using out with void pointer (#2424) - passes int as another integer type with literal passes int as another integer type with literal - specifies a call convention specifies a call convention - supports forward references (#399) supports forward references (#399) - allows passing splat to LibC fun allows passing splat to LibC fun - errors if using out with void pointer through type errors if using out with void pointer through type - doesn't try to invoke unsafe for c struct/union (#1362) doesn't try to invoke unsafe for c struct/union (#1362) - errors if defining incompatible funs with the same name in different libs (#3045) errors if defining incompatible funs with the same name in different libs (#3045) - types lib var get with forward declaration types lib var get with forward declaration - errors if too many link arguments errors if too many link arguments - reports error on typedef type not primitive like reports error on typedef type not primitive like - errors if CallConvention argument is not a string errors if CallConvention argument is not a string - allows dll argument allows dll argument - can use named args can use named args - gathers link annotations from macro expression gathers link annotations from macro expression - errors if lib already specified with positional argument errors if lib already specified with positional argument - error if passing non primitive type as varargs error if passing non primitive type as varargs - types lib var set types lib var set - reports error on struct field type not primitive like reports error on struct field type not primitive like - overrides definition of fun overrides definition of fun - can use tuple as fun return can use tuple as fun return - errors if dll argument contains directory separators errors if dll argument contains directory separators - types a varargs external types a varargs external - errors if missing argument errors if missing argument - errors if redefining fun with different signature (#2468) errors if redefining fun with different signature (#2468) - errors if using out with varargs errors if using out with varargs - specifies a call convention to a lib specifies a call convention to a lib - errors if assigning void lib call to var (#4414) errors if assigning void lib call to var (#4414) - reports redefinition of fun with different signature reports redefinition of fun with different signature - errors if missing arguments errors if missing arguments - warns if @[Link(static: true)] is specified warns if @[Link(static: true)] is specified - defines lib funs before funs with body defines lib funs before funs with body - errors if defines def on lib errors if defines def on lib - can use macros inside struct can use macros inside struct - errors if using named args with variadic function errors if using named args with variadic function - allows invoking lib call without obj inside lib allows invoking lib call without obj inside lib - allows invoking out with underscore allows invoking out with underscore - error if passing non primitive type as varargs invoking to_unsafe error if passing non primitive type as varargs invoking to_unsafe - errors if using out with non-pointer errors if using out with non-pointer - types fun returning nothing as nil types fun returning nothing as nil - reports error out can only be used with lib funs reports error out can only be used with lib funs - reports error on fun argument type not primitive like reports error on fun argument type not primitive like - errors if parameter already specified errors if parameter already specified - raises wrong number of arguments raises wrong number of arguments - reopens lib and adds same link annotations reopens lib and adds same link annotations - defined fun with aliased type defined fun with aliased type - errors if using unknown named param errors if using unknown named param - reports error if using out with an already declared variable reports error if using out with an already declared variable - reports error out can only be used with lib funs in named argument reports error out can only be used with lib funs in named argument - reports error when changing instance var type and something breaks reports error when changing instance var type and something breaks - raises wrong argument type raises wrong argument type - types fun returning nil as nil types fun returning nil as nil - can use out with named args can use out with named args - errors if third argument is not a bool errors if third argument is not a bool - allows passing double splat to LibC fun allows passing double splat to LibC fun - error if passing type to LibC with to_unsafe but type doesn't match error if passing type to LibC with to_unsafe but type doesn't match - errors if first argument is not a string errors if first argument is not a string - correctly attached link flags if there's a macro if correctly attached link flags if there's a macro if + includes error message in included hook (#889) includes error message in included hook (#889) +Code gen: c union + codegens assign c union to union codegens assign c union to union + codegens union property setter 2 codegens union property setter 2 + fills union type to the max size fills union type to the max size + automatically converts by invoking to_unsafe automatically converts by invoking to_unsafe + reads union instance var reads union instance var + automatically converts numeric type in field assignment automatically converts numeric type in field assignment + 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 + builds union setter with fun type builds union setter with fun type + 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 + aligns to the member with biggest align requirements aligns to the member with biggest align requirements + 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 default value codegens union property default value + 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 setter 1 codegens union property setter 1 +Code gen: hooks + fixes empty types in hooks (#3946) fixes empty types in hooks (#3946) + 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 finished does finished + does extended macro does extended macro + does included macro does included macro + does added method macro does added method macro + does inherited macro does inherited macro + does inherited macro recursively does inherited macro recursively +Crystal::Repl::Interpreter + classes + interprets read instance var interprets read instance var + does object_id does object_id + calls implicit struct self method calls implicit struct self method + does constructor does constructor + calls implicit class self method calls implicit class self method + discards allocate discards allocate + calls explicit struct self method calls explicit struct self method + does allocate, set instance var and get instance var does allocate, set instance var and get instance var + downcasts virtual type to its only type (#12351) downcasts virtual type to its only type (#12351) + inlines instance var access from virtual type with a single type (#39520) inlines instance var access from virtual type with a single type (#39520) Code gen: generic class type + uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) allows initializing instance variable in inherited generic type allows initializing instance variable in inherited generic type - invokes super in generic class (#2354) invokes super in generic class (#2354) - codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 - allows initializing instance variable (#665) allows initializing instance variable (#665) doesn't use virtual + in type arguments for NamedTuple (#2839) doesn't use virtual + in type arguments for NamedTuple (#2839) - recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) - runs generic instance var initializers in superclass's metaclass context (#4753) runs generic instance var initializers in superclass's metaclass context (#4753) - codegens static array size after instantiating codegens static array size after instantiating - inherited instance var initialize from generic to concrete (#2128) inherited instance var initialize from generic to concrete (#2128) doesn't crash on generic type restriction with initially no subtypes (#8411) doesn't crash on generic type restriction with initially no subtypes (#8411) - doesn't consider abstract types for including types (#7200) doesn't consider abstract types for including types (#7200) - instantiates generic class with default argument in initialize (#394) instantiates generic class with default argument in initialize (#394) inherited instance var initialize from generic to generic to concrete (#2128) inherited instance var initialize from generic to generic to concrete (#2128) - doesn't consider abstract generic instantiation when restricting type (#5190) doesn't consider abstract generic instantiation when restricting type (#5190) - doesn't run generic instance var initializers in formal superclass's context (#4753) doesn't run generic instance var initializers in formal superclass's context (#4753) - codegens inherited generic class instance var codegens inherited generic class instance var - declares instance var with virtual T (#1675) declares instance var with virtual T (#1675) - uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) - codegens virtual generic metaclass macro method call codegens virtual generic metaclass macro method call - runs generic instance var initializers in superclass's metaclass context (2) (#6482) runs generic instance var initializers in superclass's metaclass context (2) (#6482) - doesn't use virtual + in type arguments for Tuple (#2839) doesn't use virtual + in type arguments for Tuple (#2839) doesn't override guessed instance var in generic type if already declared in superclass (#9431) doesn't override guessed instance var in generic type if already declared in superclass (#9431) doesn't crash on generic type restriction with no subtypes (#7583) doesn't crash on generic type restriction with no subtypes (#7583) + declares instance var with virtual T (#1675) declares instance var with virtual T (#1675) + codegens virtual generic metaclass macro method call codegens virtual generic metaclass macro method call + doesn't consider abstract generic instantiation when restricting type (#5190) doesn't consider abstract generic instantiation when restricting type (#5190) doesn't use virtual + in type arguments (#2839) doesn't use virtual + in type arguments (#2839) + doesn't use virtual + in type arguments for Tuple (#2839) doesn't use virtual + in type arguments for Tuple (#2839) + codegens inherited generic class instance var codegens inherited generic class instance var + runs generic instance var initializers in superclass's metaclass context (2) (#6482) runs generic instance var initializers in superclass's metaclass context (2) (#6482) + doesn't run generic instance var initializers in formal superclass's context (#4753) doesn't run generic instance var initializers in formal superclass's context (#4753) + instantiates generic class with default argument in initialize (#394) instantiates generic class with default argument in initialize (#394) + inherited instance var initialize from generic to concrete (#2128) inherited instance var initialize from generic to concrete (#2128) + invokes super in generic class (#2354) invokes super in generic class (#2354) + codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 + allows initializing instance variable (#665) allows initializing instance variable (#665) + recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) + doesn't consider abstract types for including types (#7200) doesn't consider abstract types for including types (#7200) + runs generic instance var initializers in superclass's metaclass context (#4753) runs generic instance var initializers in superclass's metaclass context (#4753) + codegens static array size after instantiating codegens static array size after instantiating +Code gen: def with 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 a restriction considers first the one with a restriction + doesn't mix types of instance vars with initialize and new doesn't mix types of instance vars with initialize and new + codegens def with one default value codegens def with one default value + codegens def new with one default value codegens def new with one default value + considers first the one with more arguments considers first the one with more arguments +Code gen: exception + doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) doesn't execute else if exception is raised (1) + executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block + executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) executes body if nothing raised (1) + can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) can rescue TypeCastError (#2607) + executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally executes rescue if something is raised conditionally + executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) executes ensure when exception is unhandled (2) + can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) can use argument in rescue, with a different type (1) (#2844) + handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) handles exception in outer block (2) + executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target + handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal handle exception raised by proc literal + executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) executes ensure when no exception is raised (2) + handles nested exceptions handles nested exceptions handles nested exceptions handles nested exceptions handles nested exceptions handles nested exceptions handles nested exceptions handles nested exceptions handles nested exceptions handles nested exceptions + codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception codegens rescue specific leaf exception + executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) executes ensure when exception is raised (2) + executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block executes ensure of break inside block + closures rescue variable (#8141) closures rescue variable (#8141) + can result into union (1) can result into union (1) can result into union (1) can result into union (1) can result into union (1) can result into union (1) can result into union (1) can result into union (1) can result into union (1) can result into union (1) + executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body executes ensure of break inside while inside body + runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) runs NoReturn ensure (#3082) + handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) handle multiple exception types (2) + handles rescuing module type handles rescuing module type handles rescuing module type handles rescuing module type handles rescuing module type handles rescuing module type handles rescuing module type handles rescuing module type handles rescuing module type handles rescuing module type + doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) doesn't execute else if exception is raised conditionally (2) + executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) executes else if no exception is raised (1) + doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) doesn't execute else if exception is raised (2) + executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns + captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc captures exception thrown from proc + executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) executes ensure of calling method when doing break inside block (#1233) + does not rescue just any union does not rescue just any union does not rescue just any union does not rescue just any union does not rescue just any union does not rescue just any union does not rescue just any union does not rescue just any union does not rescue just any union does not rescue just any union + executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) executes ensure when exception is unhandled (1) + types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) types parenthesized expression (#5511) + executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns executes ensure when the main block yields and returns + handles subclass handles subclass handles subclass handles subclass handles subclass handles subclass handles subclass handles subclass handles subclass handles subclass + executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure executes return inside rescue, executing ensure + executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) executes else if no exception is raised (2) + executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target executes ensure from return until target + executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body executes ensure of next inside while inside body + executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) executes ensure when no exception is raised (1) + can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) can use argument in rescue, with a different type (2) (#2844) + codegens issue #118 (2) codegens issue #118 (2) + ensure without rescue ensure without rescue ensure without rescue ensure without rescue ensure without rescue ensure without rescue ensure without rescue ensure without rescue ensure without rescue ensure without rescue + handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types handles rescuing union between module types + handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type handles rescuing union between module type and class type + handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) handles exception in outer block (1) + rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue rescues with types defaults to generic rescue + executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns executes ensure when the main block returns + doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 doesn't crash on #1988 + executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else executes ensure of break inside while inside else + doesn't codegen duplicated ensure if unreachable (#709) doesn't codegen duplicated ensure if unreachable (#709) + doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) doesn't execute else if exception is raised conditionally (1) + rescues a valid union rescues a valid union rescues a valid union rescues a valid union rescues a valid union rescues a valid union rescues a valid union rescues a valid union rescues a valid union rescues a valid union + catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) catches exception thrown by as inside method (#4030) + rescues with type rescues with type rescues with type rescues with type rescues with type rescues with type rescues with type rescues with type rescues with type rescues with type + executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue executes ensure of break inside while inside rescue + does not rescue just any module does not rescue just any module does not rescue just any module does not rescue just any module does not rescue just any module does not rescue just any module does not rescue just any module does not rescue just any module does not rescue just any module does not rescue just any module + executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) executes ensure when exception is raised (1) + propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) propagates raise status (#2074) + executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue executes ensure when raising inside rescue + can result into union (2) can result into union (2) can result into union (2) can result into union (2) can result into union (2) can result into union (2) can result into union (2) can result into union (2) can result into union (2) can result into union (2) + does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) does ensure after rescue which returns (#171) + codegens issue #118 (1) codegens issue #118 (1) + runs #2441 runs #2441 runs #2441 runs #2441 runs #2441 runs #2441 runs #2441 runs #2441 runs #2441 runs #2441 + can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) can use argument in rescue (#2844) + codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value codegens return from rescue with value + executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block executes ensure of break inside while inside body with block + receives exception object receives exception object receives exception object receives exception object receives exception object receives exception object receives exception object receives exception object receives exception object receives exception object + rescues a valid nested union rescues a valid nested union rescues a valid nested union rescues a valid nested union rescues a valid nested union rescues a valid nested union rescues a valid nested union rescues a valid nested union rescues a valid nested union rescues a valid nested union + executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers executes ensure of break inside while inside body with nested handlers + handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) handle multiple exception types (1) + uses exception after rescue uses exception after rescue uses exception after rescue uses exception after rescue uses exception after rescue uses exception after rescue uses exception after rescue uses exception after rescue uses exception after rescue uses exception after rescue + executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally executes rescue if something is raised unconditionally + executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block executes ensure of next inside block + codegens exception handler with return codegens exception handler with return codegens exception handler with return codegens exception handler with return codegens exception handler with return codegens exception handler with return codegens exception handler with return codegens exception handler with return codegens exception handler with return codegens exception handler with return +Code gen: and + codegens and with primitive type other than bool with union codegens and with primitive type other than bool with union + codegens and with bool union as left node 2 codegens and with bool union as left node 2 + codegens and with nilable as left node 2 codegens and with nilable as left node 2 + codegens assign in right node, inside if must not be nil codegens assign in right node, inside if must not be nil + codegens and with bool true and true codegens and with bool true and true + codegens and with bool true and false codegens and with bool true and false + codegens and with primitive type other than bool codegens and with primitive type other than bool + codegens and with bool false and false codegens and with bool false and false + codegens and with bool union as left node 1 codegens and with bool union as left node 1 + codegens and with bool union as left node 3 codegens and with bool union as left node 3 + codegens assign in right node, after must be nilable codegens assign in right node, after must be nilable + codegens and with nil union as left node 2 codegens and with nil union as left node 2 + codegens and with primitive type other than bool codegens and with primitive type other than bool + codegens and with nil union as left node 1 codegens and with nil union as left node 1 + codegens and with bool and int 1 codegens and with bool and int 1 + codegens and with bool union as left node 4 codegens and with bool union as left node 4 + codegens and with bool union as left node 2 codegens and with bool union as left node 2 + codegens assign in right node, after if must be nilable codegens assign in right node, after if must be nilable + codegens and with bool and int 2 codegens and with bool and int 2 + codegens and with bool union as left node 1 codegens and with bool union as left node 1 + codegens and with nilable as left node 1 codegens and with nilable as left node 1 + codegens and with non-false union as left node codegens and with non-false union as left node + codegens and with bool false and true codegens and with bool false and true + codegens and with bool union as left node 3 codegens and with bool union as left node 3 +Code gen: array literal spec + creates custom generic array, with splats creates custom generic array, with splats + creates custom generic array with type var creates custom generic array with type var + creates custom generic array via alias (2) creates custom generic array via alias (2) + assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works assignment in array literal works + creates custom non-generic array, with splats creates custom non-generic array, with splats + creates custom generic array creates custom generic array + creates custom non-generic array in module creates custom non-generic array in module + creates custom generic array in module (#5684) creates custom generic array in module (#5684) + creates custom non-generic array creates custom non-generic array + creates custom generic array via alias creates custom generic array via alias + creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array creates typed array + assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works assignment in array-like literal works + creates custom non-generic array in nested module creates custom non-generic array in nested module +Semantic: exception + types exception var with no types types exception var with no types + transform nodes in else block transform nodes in else block + errors if caught exception is not a subclass of Exception errors if caught exception is not a subclass of Exception + type for exception handler for explicit types type for exception handler for explicit types + assigns var inside ensure (1) (#3919) assigns var inside ensure (1) (#3919) + marks proc literal as raises marks proc literal as raises + marks fun as raises marks fun as raises + marks method calling lib fun that raises as raises marks method calling lib fun that raises as raises + types a var after rescue as being nilable types a var after rescue as being nilable + errors if caught exception is a union but not all types are valid errors if caught exception is a union but not all types are valid + errors if caught exception is not a subclass of Exception without var errors if caught exception is not a subclass of Exception without var + errors if caught exception is a nested union but not all types are valid errors if caught exception is a nested union but not all types are valid + shadows local variable (1) shadows local variable (1) + correctly types variables inside conditional inside exception handler with no-return rescue (#8012) correctly types variables inside conditional inside exception handler with no-return rescue (#8012) + can use next inside block inside ensure (#4470) can use next inside block inside ensure (#4470) + type union with empty rescue block type union with empty rescue block + types a var after begin rescue as having all possible types in begin and rescue (2) types a var after begin rescue as having all possible types in begin and rescue (2) + types instance variable as nilable if assigned inside an exception handler (#1845) types instance variable as nilable if assigned inside an exception handler (#1845) + types var as not nil if defined inside begin and defined inside rescue types var as not nil if defined inside begin and defined inside rescue + type is union of main and rescue blocks type is union of main and rescue blocks + can use break inside block inside ensure (#4470) can use break inside block inside ensure (#4470) + doesn't type instance variable as nilable if assigned inside an exception handler after being assigned doesn't type instance variable as nilable if assigned inside an exception handler after being assigned + says syntax error on "begin; else; 1; end" says syntax error on "begin; else; 1; end" + types a var after begin rescue as having all possible types in begin and rescue types a var after begin rescue as having all possible types in begin and rescue + types a var after begin rescue as having all possible types and nil in begin if read (2) types a var after begin rescue as having all possible types and nil in begin if read (2) + types exception with type types exception with type + marks method calling method that raises as raises marks method calling method that raises as raises + doesn't consider vars as nilable inside else (#610) doesn't consider vars as nilable inside else (#610) + assigns var inside ensure (2) (#3919) assigns var inside ensure (2) (#3919) + can't use break inside block inside ensure (#4470) can't use break inside block inside ensure (#4470) + doesn't infect type to variable before handler (#4002) doesn't infect type to variable before handler (#4002) + types var as nilable if previously nilable (2) types var as nilable if previously nilable (2) + detects reading nil-if-read variable after exception handler (#4723) detects reading nil-if-read variable after exception handler (#4723) + can't return from ensure (#4470) can't return from ensure (#4470) + type union with empty main block type union with empty main block + can use break inside while inside ensure (#4470) can use break inside while inside ensure (#4470) + marks instance variable as nilable if assigned inside rescue inside initialize marks instance variable as nilable if assigned inside rescue inside initialize + marks def as raises marks def as raises + gets a non-nilable type if all rescue are unreachable (#8751) gets a non-nilable type if all rescue are unreachable (#8751) + types var as nilable inside ensure (1) types var as nilable inside ensure (1) + types code with abstract exception that delegates method types code with abstract exception that delegates method + types a var after begin rescue with no-return in rescue types a var after begin rescue with no-return in rescue + marks method that calls another method that raises as raises, recursively marks method that calls another method that raises as raises, recursively + types var assignment inside block inside exception handler (#3324) types var assignment inside block inside exception handler (#3324) + can't use next inside while inside ensure (#4470) can't use next inside while inside ensure (#4470) + doesn't crash on break inside rescue, in while (#2441) doesn't crash on break inside rescue, in while (#2441) + can't use break inside while inside ensure (#4470) can't use break inside while inside ensure (#4470) + can't return from block inside ensure (#4470) can't return from block inside ensure (#4470) + can't use next inside block inside ensure (#4470) can't use next inside block inside ensure (#4470) + correctly types #1988 correctly types #1988 + can't return from while inside ensure (#4470) can't return from while inside ensure (#4470) + types var as nilable inside ensure (2) types var as nilable inside ensure (2) + types var as nilable if previously nilable (1) types var as nilable if previously nilable (1) + can use next inside while inside ensure (#4470) can use next inside while inside ensure (#4470) + says syntax error on "begin; rescue ex; rescue ex : Foo; end; ex" says syntax error on "begin; rescue ex; rescue ex : Foo; end; ex" + remains nilable after rescue remains nilable after rescue + says syntax error on "begin; rescue ex; rescue; end; ex" says syntax error on "begin; rescue ex; rescue; end; ex" + correctly types variable assigned inside nested exception handler (#9769) correctly types variable assigned inside nested exception handler (#9769) +.parse_args + DIR DIR + DIR (absolute) DIR (absolute) + DIR (relative to home) DIR (relative to home) + DIR = . DIR = . + NAME DIR NAME DIR + DIR with path DIR with path +Codegen: is_a? + does is_a? for virtual generic instance type against generic does is_a? for virtual generic instance type against generic + restricts metaclass against virtual metaclass type restricts metaclass against virtual metaclass type + says false for GenericChild(Base).is_a?(GenericBase(Child)) (#1294) says false for GenericChild(Base).is_a?(GenericBase(Child)) (#1294) + codegens is_a? casts union to nilable in method codegens is_a? casts union to nilable in method + doesn't skip assignment when used in combination with .is_a? (false case) (#1121) doesn't skip assignment when used in combination with .is_a? (false case) (#1121) + restricts type in else but lazily restricts type in else but lazily + codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true codegens is_a? with a Const does comparison and gives true + works with inherited generic class against an instantiation (3) works with inherited generic class against an instantiation (3) + does is_a?(generic type) for nested generic inheritance, through upcast (2) does is_a?(generic type) for nested generic inheritance, through upcast (2) + does is_a?(generic type) for nested generic inheritance (1) (#9660) does is_a?(generic type) for nested generic inheritance (1) (#9660) + codegens is_a? from virtual type to module codegens is_a? from virtual type to module + codegens is_a? with virtual and module codegens is_a? with virtual and module + transforms then if condition is always truthy transforms then if condition is always truthy + codegens is_a? false for simple type codegens is_a? false for simple type + doesn't skip assignment when used in combination with .is_a? and && (#1121) doesn't skip assignment when used in combination with .is_a? and && (#1121) + doesn't work with inherited generic class against an instantiation (2) doesn't work with inherited generic class against an instantiation (2) + codegens is_a? with virtual and nil codegens is_a? with virtual and nil + virtual metaclass type is not virtual instance type (#12628) virtual metaclass type is not virtual instance type (#12628) + does is_a?(generic type) for nested generic inheritance, through upcast (1) does is_a?(generic type) for nested generic inheritance, through upcast (1) + doesn't skip assignment when used in combination with .is_a? (true case, then) (#1121) doesn't skip assignment when used in combination with .is_a? (true case, then) (#1121) + passes is_a? with generic module type on virtual type (#10302) passes is_a? with generic module type on virtual type (#10302) + codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false codegens is_a? with a Const does comparison and gives false + does is_a?(generic type) for nested generic inheritance (2) does is_a?(generic type) for nested generic inheritance (2) + codegens is_a? with nilable gives false because no type codegens is_a? with nilable gives false because no type + does is_a? for union of module and type does is_a? for union of module and type + doesn't type merge (2) (#548) doesn't type merge (2) (#548) + resets truthy state after visiting nodes (bug) resets truthy state after visiting nodes (bug) + doesn't error if result is discarded (#14113) doesn't error if result is discarded (#14113) + codegens is_a? with nilable gives false because other type 1 codegens is_a? with nilable gives false because other type 1 + codegens is_a? true for simple type codegens is_a? true for simple type + codegens is_a? with union gives false codegens is_a? with union gives false + gives false if generic type doesn't match exactly gives false if generic type doesn't match exactly + evaluates method on filtered union type 2 evaluates method on filtered union type 2 + doesn't type merge (1) (#548) doesn't type merge (1) (#548) + evaluates method on filtered union type evaluates method on filtered union type + codegens is_a? with union gives false codegens is_a? with union gives false + codegens is_a? with nilable gives true codegens is_a? with nilable gives true + codegens is_a? on right side of and codegens is_a? on right side of and + does is_a? with more strict virtual type does is_a? with more strict virtual type + visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) visits 1.to_s twice, may trigger enclosing_call (#4364) + restricts union metaclass to metaclass (#12295) restricts union metaclass to metaclass (#12295) + says false for value.is_a?(Class) says false for value.is_a?(Class) + codegens is_a? from nilable reference union type to nil codegens is_a? from nilable reference union type to nil + restricts virtual metaclass against virtual metaclass type restricts virtual metaclass against virtual metaclass type + does is_a? with union type as Union(X, Y), don't resolve to virtual type (#10244) does is_a? with union type as Union(X, Y), don't resolve to virtual type (#10244) + evaluate method on filtered type nilable type not-nil evaluate method on filtered type nilable type not-nil + codegens is_a? with nilable gives false because other type 2 codegens is_a? with nilable gives false because other type 2 + evaluate method on filtered type evaluate method on filtered type + codegens is_a? with nilable gives false because no type codegens is_a? with nilable gives false because no type + doesn't consider generic type to be a generic type of a recursive alias (#3524) doesn't consider generic type to be a generic type of a recursive alias (#3524) + codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used codegens when is_a? is always false but properties are used + restricts simple type with union restricts simple type with union + evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 evaluates method on filtered union type 3 + codegens is_a? with union gives true codegens is_a? with union gives true + does is_a? with generic class metaclass does is_a? with generic class metaclass + transforms else if condition is always falsey transforms else if condition is always falsey + does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) does is_a? for generic type against generic class instance type (#12304) + doesn't skip assignment when used in combination with .is_a? (true case, else) (#1121) doesn't skip assignment when used in combination with .is_a? (true case, else) (#1121) + works with inherited generic class against an instantiation works with inherited generic class against an instantiation + codegens is_a? with union gives true codegens is_a? with union gives true + does is_a?/responds_to? twice (#1451) does is_a?/responds_to? twice (#1451) + says true for Class.is_a?(Class.class.class) (#4374) says true for Class.is_a?(Class.class.class) (#4374) + says true for Class.is_a?(Class.class) (#4374) says true for Class.is_a?(Class.class) (#4374) + codegens untyped var (#4009) codegens untyped var (#4009) + codegens is_a? with virtual codegens is_a? with virtual + restricts union with union restricts union with union + codegens is_a? casts union to nilable codegens is_a? casts union to nilable + does is_a? with && and true condition does is_a? with && and true condition + codegens is_a? from nilable reference union type to type codegens is_a? from nilable reference union type to type + evaluate method on filtered type nilable type nil evaluate method on filtered type nilable type nil + does is_a? with union type, don't resolve to virtual type (#10244) does is_a? with union type, don't resolve to virtual type (#10244) +Code gen: no return + codegens Pointer(NoReturn).malloc codegens Pointer(NoReturn).malloc + codegen types exception handler as NoReturn if ensure is NoReturn codegen types exception handler as NoReturn if ensure is NoReturn + codegens if with no return and variable used afterwards codegens if with no return and variable used afterwards + codegens no return variable declaration (#1508) codegens no return variable declaration (#1508) + codegens no return instance variable declaration (#1508) codegens no return instance variable declaration (#1508) + codegens untyped typeof (#5105) codegens untyped typeof (#5105) + codegens call with no return because of falsey if (#3661) codegens call with no return because of falsey if (#3661) + codegens if with NoReturn on then and union on else codegens if with NoReturn on then and union on else +Crystal::Repl::Interpreter + special vars + does special var that's a reference for multidispatch does special var that's a reference for multidispatch + sets special var inside call inside block (#12250) sets special var inside call inside block (#12250) + 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 inside block does special var that's a reference inside block + 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 +Crystal::Doc::Method + doc + inherits doc from ancestor (use :inherit:) inherits doc from ancestor (use :inherit:) + inherits doc from ancestor (no extra comment) inherits doc from ancestor (no extra comment) + inherits doc from ancestor (use :inherit: plus more content) inherits doc from ancestor (use :inherit: plus more content) + inherits doc from previous def (no extra comment) inherits doc from previous def (no extra comment) + trailing comment is not a doc comment trailing comment is not a doc comment + trailing comment is not part of a doc comment trailing comment is not part of a doc comment + gets doc from underlying method gets doc from underlying method + args_to_s + shows default value of arg with highlighting shows default value of arg with highlighting + shows args and return type restriction shows args and return type restriction + shows underscore restriction shows underscore restriction + shows block args with underscore shows block args with underscore + shows double splat args shows double splat args + shows splat args shows splat args + shows return type restriction shows return type restriction + shows typeof restriction of arg with highlighting shows typeof restriction of arg with highlighting + shows external name of arg shows external name of arg + shows block args shows block args + shows external name of arg with quotes and escaping shows external name of arg with quotes and escaping + shows simple args shows simple args + shows block args if a def has `yield` shows block args if a def has `yield` +Crystal::Repl::Interpreter + control flow + interprets if union type with nil, false interprets if union type with nil, false + interprets return Nil interprets return Nil + interprets if union type with bool, false interprets if union type with bool, false + interprets if (int type) interprets if (int type) + interprets if pointer, true interprets if pointer, true + interprets while interprets while + interprets while, returns nil interprets while, returns nil + interprets next inside while interprets next inside while + discards while discards while + interprets return interprets return + interprets break with value inside while (through break) interprets break with value inside while (through break) + interprets if bool (true) interprets if bool (true) + interprets break inside nested while interprets break inside nested while + interprets break inside while interprets break inside while + interprets if (true literal) interprets if (true literal) + interprets return implicit nil and Int32 interprets return implicit nil and Int32 + interprets break with value inside while (through normal flow) interprets break with value inside while (through normal flow) + interprets if bool (false) interprets if bool (false) + interprets return Nil with explicit return (#12178) interprets return Nil with explicit return (#12178) + discards if discards if + interprets if pointer, false interprets if pointer, false + interprets if (nil type) interprets if (nil type) + interprets unless interprets unless + interprets break inside while inside block interprets break inside while inside block + interprets next inside while inside block interprets next inside while inside block + interprets if (false literal) interprets if (false literal) + interprets if (nil literal) interprets if (nil literal) + interprets if union type with bool, true interprets if union type with bool, true + interprets until interprets until +Semantic: nilable instance var + finds type that doesn't initialize instance var (#1222) finds type that doesn't initialize instance var (#1222) + says instance var was not initialized in all of the initialize methods says instance var was not initialized in all of the initialize methods + says self was used before instance var was initialized says self was used before instance var was initialized + says instance var was used before initialized says instance var was used before initialized + doesn't consider as nil if initialized with catch-all doesn't consider as nil if initialized with catch-all + says self was used before instance var was initialized (3) says self was used before instance var was initialized (3) + says self was used before instance var was initialized (2) says self was used before instance var was initialized (2) + marks instance var as nilable if assigned inside captured block (#1696) marks instance var as nilable if assigned inside captured block (#1696) + says instance var was used before initialized (2) says instance var was used before initialized (2) + marks instance var as nilable if assigned inside proc literal marks instance var as nilable if assigned inside proc literal + says instance var was not initialized in all of the initialize methods, with var declaration says instance var was not initialized in all of the initialize methods, with var declaration + says instance var was not initialized in all of the initialize methods (2) says instance var was not initialized in all of the initialize methods (2) +types to_s of + nilable reference type nilable reference type + does for type contained in generic module does for type contained in generic module + named tuple named tuple + nilable type with more than two elements, Nil at the end nilable type with more than two elements, Nil at the end + array of simple types array of simple types + nilable value type nilable value type + does for type contained in generic class does for type contained in generic class + union types + should not have extra parens + in pointers in pointers + in tuples in tuples + in arrays in arrays + should have parens + as return type as return type + as arg type as arg type + non-instantiated array non-instantiated array + union of simple types union of simple types +Code gen: closure + allows passing proc literal to def that captures block with & allows passing proc literal to def that captures block with & + codegen closure in instance method without self closured codegen closure in instance method without self closured + codegens proc literal with struct codegens proc literal with struct + 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 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) + allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize + codegens nested closure codegens nested closure + ensures it can raise from the closure check ensures it can raise from the closure check + codegens simple closure in function with argument codegens simple closure in function with argument + codegens closure inside initialize inside block with self codegens closure inside initialize inside block with self + 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 closured self in block (#3388) codegens closured self in block (#3388) + doesn't incorrectly consider local as closured (#4948) doesn't incorrectly consider local as closured (#4948) + codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars + codegens closure with instance var codegens closure with instance var + codegens closure with def that has an if codegens closure with def that has an if + transforms block to proc literal transforms block to proc literal + codegens nested closure with block (1) codegens nested closure with block (1) + codegens simple closure in block codegens simple closure in block + allows mixing yield and block.call allows mixing yield and block.call + codegens closured nested in block codegens closured nested in block + codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars + unifies types of closured var unifies types of closured var + codegens simple closure at global scope codegens simple closure at global scope + codegens closure with struct codegens closure with struct + 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 super nested closure codegens super nested closure + codegens simple closure in function codegens simple closure in function + codegens nested closure with block (2) codegens nested closure with block (2) + 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 block codegens closure with block + transforms block to proc literal with free var transforms block to proc literal with free var + codegens closure with self and var codegens closure with self and var + closures struct self closures struct self + codegens closure with instance var and var codegens closure with instance var and var + allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal + codegens closure with block that declares same var codegens closure with block that declares same var + codegens nested closure with nested closured variable codegens nested closure with nested closured variable + codegens super nested closure with nested closured variable codegens super nested closure with nested closured variable + codegens closure with self and arguments codegens closure with self and arguments + codegens multiple nested blocks codegens multiple nested blocks + allows passing an external function along allows passing an external function along + codegens closure with implicit self and var codegens closure with implicit self and var + codegens closure with instance var and block codegens closure with instance var and block + codegens nested closure that mentions var in both contexts codegens nested closure that mentions var in both contexts + 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) + allows passing an external function along (2) allows passing an external function along (2) +read_file? + with relative path + reads file (doesn't exist) reads file (doesn't exist) + with absolute path + reads file (doesn't exist) reads file (doesn't exist) +Crystal::Repl::Interpreter + unions + returns union type returns union type + put and remove from union in local var put and remove from union in local var + put and remove from union, together with is_a? (truthy case) put and remove from union, together with is_a? (truthy case) + puts union inside union puts union inside union + converts from NilableType to NonGenericClassType converts from NilableType to NonGenericClassType + returns large union type (#15041) returns large union type (#15041) + discards is_a? discards is_a? + put and remove from union in instance var put and remove from union in instance var + put and remove from union, together with is_a? (falsey case) put and remove from union, together with is_a? (falsey case) +Crystal::Repl::Interpreter + class vars + interprets class var for virtual metaclass type interprets class var for virtual metaclass type + interprets class var for virtual type interprets class var for virtual type + interprets class var with initializer interprets class var with initializer + does class var initializer with union (#12633) does class var initializer with union (#12633) + finds self in class var initializer (#12439) finds self in class var initializer (#12439) + interprets class var without initializer interprets class var without initializer + reads class var initializer with union (#12633) reads class var initializer with union (#12633) +Codegen: super + calls super in module method (#556) calls super in module method (#556) + does super in virtual type including module does super in virtual type including module + doesn't invoke super twice in inherited generic types (#942) doesn't invoke super twice in inherited generic types (#942) + codegens super inside closure forwarding args codegens super inside closure forwarding args + calls super in generic module method calls super in generic module method + codegens super without arguments but parent has arguments codegens super without arguments but parent has arguments + calls super on an object (#10004) calls super on an object (#10004) + calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) calls super in metaclass (#1522) + codegens super that calls subclass method 6 codegens super that calls subclass method 6 + calls super with dispatch (#2318) calls super with dispatch (#2318) + codegens super that calls subclass method codegens super that calls subclass method + codegens super that calls subclass method 5 codegens super that calls subclass method 5 + codegens super that calls subclass method 2 codegens super that calls subclass method 2 + build super on generic class (bug) build super on generic class (bug) + codegens super that calls subclass method 4 codegens super that calls subclass method 4 + calls super from virtual metaclass type (#2841) calls super from virtual metaclass type (#2841) + codegens super that calls subclass method 3 codegens super that calls subclass method 3 + codegens super inside closure codegens super inside closure + codegens super without arguments and instance variable codegens super without arguments and instance variable + codegens super without arguments codegens super without arguments +Code gen: uninitialized + works with uninitialized NoReturn (#3314) works with uninitialized NoReturn (#3314) + codegens declare var and read it codegens declare var and read it + codegens value (#3641) codegens value (#3641) + codegens declare var and changes it codegens declare var and changes it + 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 + doesn't break on inherited declared var (#390) doesn't break on inherited declared var (#390) + codegens declare instance var codegens declare instance var +Crystal::Repl::Interpreter + blocks + interprets block with multiple yields interprets block with multiple yields + interprets next inside block interprets next inside block + interprets yield inside def with arguments interprets yield inside def with arguments + interprets break inside block interprets break inside block + interprets yield with splat, block with splat interprets yield with splat, block with splat + considers block arg without type as having NoReturn type (2) (#12270) considers block arg without type as having NoReturn type (2) (#12270) + caches method with captured block (#12276) caches method with captured block (#12276) + clears block local variables when calling block (2) clears block local variables when calling block (2) + considers block arg without type as having NoReturn type (#12270) considers block arg without type as having NoReturn type (#12270) + interprets yield with splat (2) interprets yield with splat (2) + captures non-closure block captures non-closure block + interprets simplest block interprets simplest block + interprets with ... yield interprets with ... yield + yields different values to form a union yields different values to form a union + interprets next inside block (union, through next) interprets next inside block (union, through next) + interprets next inside block (union, through normal exit) interprets next inside block (union, through normal exit) + interprets break inside block (union, through normal flow) interprets break inside block (union, through normal flow) + interprets yield inside another block interprets yield inside another block + returns from block returns from block + interprets yield expressions interprets yield expressions + interprets break inside block (union, through return) interprets break inside block (union, through return) + casts yield expression to block var type (not block arg type) casts yield expression to block var type (not block arg type) + interprets yield with splat, block with splat (#12227) interprets yield with splat, block with splat (#12227) + interprets with ... yield with struct interprets with ... yield with struct + counts with ... yield scope in block args bytesize (#12316) counts with ... yield scope in block args bytesize (#12316) + interprets yield with splat, less block arguments interprets yield with splat, less block arguments + interprets break inside block (union, through break) interprets break inside block (union, through break) + interprets with ... yield with extra arguments (#12296) interprets with ... yield with extra arguments (#12296) + interprets yield with splat (1) interprets yield with splat (1) + interprets yield expression interprets yield expression + interprets block with splat interprets block with splat + interprets block with args that conflict with a local var interprets block with args that conflict with a local var + interprets block with args that conflict with a local var interprets block with args that conflict with a local var + clears block local variables when calling block clears block local variables when calling block + discards yield expression discards yield expression + interprets yield return value interprets yield return value +.system + successful command successful command +sh: line 1: commanddoesnotexist: command not found + command does not exist command does not exist + successful command with output successful command with output + failing command failing command +Codegen: const + 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 + 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) + inlines simple const inlines simple const + codegens constant that is declared later because of virtual dispatch codegens constant that is declared later because of virtual dispatch + 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 + declaring var declaring var declaring var declaring var declaring var declaring var declaring var declaring var declaring var declaring var + inlines const with math inlines const with math + 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 + 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) + constants with expression constants with expression + 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 + 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 + define a constant define a constant + 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 + inlines const referencing another const inlines const referencing another const + supports closured vars inside initializers (#10474) supports closured vars inside initializers (#10474) + 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) + support constant inside a def support constant inside a def + initializes simple const initializes simple const + 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) + 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 + 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 + 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 + inlines char const inlines char const + 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 + inlines bool const inlines bool const + initializes ARGC_UNSAFE initializes ARGC_UNSAFE + inlines enum value inlines enum value + 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 + 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 + finds global constant finds global constant + initializes simple const via another const initializes simple const via another const + support nested constant support nested constant + finds nearest constant first finds nearest constant first + allows constants with same name allows constants with same name + define a constant in lib define a constant in lib + 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 +Code gen: new + inherits initialize inherits initialize + can create Reference can create Reference + overloads new and initialize, 2 (#2489) overloads new and initialize, 2 (#2489) + codegens instance method with new and instance var codegens instance method with new and instance var + inherits initialize for generic type inherits initialize for generic type + overloads new and initialize, 3 (#2489) overloads new and initialize, 3 (#2489) + finds new in superclass for Enum finds new in superclass for Enum + evaluates initialize default value at the instance scope (3) (#731) evaluates initialize default value at the instance scope (3) (#731) + finds super in deep hierarchy finds super in deep hierarchy + evaluates initialize default value at the instance scope (4) (#731) evaluates initialize default value at the instance scope (4) (#731) + defines new for module defines new for module + 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) + codegens instance method with allocate codegens instance method with allocate + evaluates initialize default value at the instance scope (2) (#731) evaluates initialize default value at the instance scope (2) (#731) + overloads new and initialize, 1 (#2489) overloads new and initialize, 1 (#2489) + finds new in superclass if no initialize is defined (1) finds new in superclass if no initialize is defined (1) + 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 + evaluates initialize default value at the instance scope (1) (#731) evaluates initialize default value at the instance scope (1) (#731) +Crystal::Doc::Macro + args_to_s + shows external name of arg with quotes and escaping shows external name of arg with quotes and escaping + shows simple arg and block arg shows simple arg and block arg + shows double splat arg shows double splat arg + shows default value with highlighting shows default value with highlighting + shows external name of arg shows external name of arg + shows simple arg and double splat arg shows simple arg and double splat arg + shows simple arg and splat arg shows simple arg and splat arg + shows splat arg shows splat arg + shows simple args shows simple args + shows block arg shows block arg + shows double splat arg shows double splat arg +Code gen: sizeof + gets sizeof class gets sizeof class + can use sizeof in type argument (2) can use sizeof in type argument (2) + gets sizeof int gets sizeof int + can use sizeof in type argument (1) can use sizeof in type argument (1) + doesn't precompute sizeof of module (#7741) doesn't precompute sizeof of module (#7741) + gets sizeof union gets sizeof union + returns correct sizeof for abstract struct (#4319) returns correct sizeof for abstract struct (#4319) + doesn't precompute sizeof of abstract struct (#7741) doesn't precompute sizeof of abstract struct (#7741) + can use sizeof of virtual type can use sizeof of virtual type + gets sizeof Bool (#8272) gets sizeof Bool (#8272) + gets sizeof Nil (#7644) gets sizeof Nil (#7644) + can use instance_sizeof of virtual type can use instance_sizeof of virtual type + can use instance_sizeof in type argument can use instance_sizeof in type argument + gets sizeof NoReturn gets sizeof NoReturn + gets sizeof struct gets sizeof struct + gets instance_sizeof a generic type with type vars gets instance_sizeof a generic type with type vars + gets instance_sizeof class gets instance_sizeof class + gets sizeof Void gets sizeof Void + instance_alignof + gets instance_alignof a generic type with type vars gets instance_alignof a generic type with type vars + gets instance_alignof class gets instance_alignof class + alignof + gets alignof class gets alignof class + gets alignof union gets alignof union + gets alignof primitive types gets alignof primitive types + alignof mixed union is not less than alignof its variant types alignof mixed union is not less than alignof its variant types + gets alignof struct gets alignof struct +Crystal::Repl::Interpreter + enum + does enum value does enum value + does enum new does enum new +Crystal::Doc::MarkdDocRenderer + renders headline + renders "## Foo Bar\n### Sub\n## Bar Baz\n### Sub" renders "## Foo Bar\n### Sub\n## Bar Baz\n### Sub" + renders "## Foo Bar" renders "## Foo Bar" + expand_code_links + doesn't find wrong absolute type doesn't find wrong absolute type + doesn't find sibling methods of wrong type doesn't find sibling methods of wrong type + finds methods of a type finds methods of a type + doesn't find substrings for methods doesn't find substrings for methods + doesn't find parents' methods doesn't find parents' methods + finds types from base finds types from base + finds method of an absolute type finds method of an absolute type + doesn't find wrong kind of methods doesn't find wrong kind of methods + doesn't find parents' methods doesn't find parents' methods + finds method with unspecified args finds method with unspecified args + doesn't find method with wrong number of args doesn't find method with wrong number of args + finds multiple methods with brackets finds multiple methods with brackets + doesn't find method with wrong number of args doesn't find method with wrong number of args + doesn't match with different separator doesn't match with different separator + finds sibling methods finds sibling methods + doesn't find type not at word boundary doesn't find type not at word boundary + doesn't spuriously match range literals doesn't spuriously match range literals + doesn't find sibling methods with fake receiver doesn't find sibling methods with fake receiver + does not break when referencing lib type (#9928) does not break when referencing lib type (#9928) + finds sibling methods with self receiver finds sibling methods with self receiver + finds constant finds constant + finds operator method with unspecified args finds operator method with unspecified args + finds sibling methods finds sibling methods + finds nested type finds nested type + finds method with zero args finds method with zero args + finds method with question mark finds method with question mark + matches methods on single-character class names matches methods on single-character class names + finds absolute type finds absolute type + finds multiple kinds of things finds multiple kinds of things + finds method with args even with empty brackets finds method with args even with empty brackets + doesn't find wrong kind of sibling methods doesn't find wrong kind of sibling methods + finds types from nested finds types from nested + finds method with args finds method with args + finds operator method finds operator method + finds method with exclamation mark finds method with exclamation mark + renders links + renders "[foo](http://example.com/foo)" renders "[foo](http://example.com/foo)" + renders "[`Foo`](http://example.com/foo)" renders "[`Foo`](http://example.com/foo)" + renders "[filter](https://docs.celestine.dev/Celestine/Meta/Context.html#filter(&block:Celestine::Filter-%3ECelestine::Filter)-instance-method)" renders "[filter](https://docs.celestine.dev/Celestine/Meta/Context.html#filter(&block:Celestine::Filter-%3ECelestine::Filter)-instance-method)" + renders html + renders "

Foo

" renders "

Foo

" + renders code spans + renders "`