ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
jmdaemon has joined #crystal-lang
quazimodo has joined #crystal-lang
<FromGitter> <Blacksmoke16> there are no union types in that example
jmdaemon has quit [Ping timeout: 256 seconds]
<FromGitter> <Blacksmoke16> > When you use the .class or typeof() method in Crystal, it returns the class of the object at runtime, not the type that was specified in the variable declaration. The type specified in the variable declaration is used at compile-time for type checking, but it does not affect the value of the object at runtime. ⏎ > ⏎ > In your example, the variable grid_offset_y is defined as a union of UInt16 and
<FromGitter> ... Int32, but at runtime, it can only ever be an instance of one of those classes. The .class or typeof() method will return the class of the actual object that is assigned to the variable, which will be either UInt16 or Int32, not the union of the two. ⏎ ⏎ to clarify, *only* `.class` would show you its runtime type. `typeof` is i ... [https://gitter.im/crystal-lang/crystal?at=63c76cdb8fd38605368b5ebc]
<FromGitter> <Blacksmoke16> e.g. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=63c76d45c684d15e1d057d91]
ur5us has quit [Ping timeout: 256 seconds]
jhass has quit [Ping timeout: 246 seconds]
straight-shoota has quit [Ping timeout: 272 seconds]
straight-shoota has joined #crystal-lang
jhass has joined #crystal-lang
u0_a3932 has joined #crystal-lang
u0_a3931 has quit [Ping timeout: 260 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #crystal-lang
ur5us has joined #crystal-lang
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
<FromGitter> <moe:busyloop.net> boo, gpt lied to me :(
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #crystal-lang
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #crystal-lang
quazimodo has quit [Ping timeout: 260 seconds]
notzmv has quit [Read error: Connection reset by peer]
hightower2 has quit [Ping timeout: 256 seconds]
notzmv has joined #crystal-lang
hightower2 has joined #crystal-lang
jmdaemon has joined #crystal-lang
jmdaemon has quit [Ping timeout: 256 seconds]
jmdaemon has joined #crystal-lang
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
jmdaemon has joined #crystal-lang
u0_a3933 has joined #crystal-lang
u0_a3932 has quit [Ping timeout: 260 seconds]
jmdaemon has quit [Ping timeout: 272 seconds]
jmdaemon has joined #crystal-lang
u0_a3934 has joined #crystal-lang
u0_a3933 has quit [Ping timeout: 252 seconds]
u0_a3934 has quit [Quit: WeeChat 3.7.1]
jmdaemon has quit [Ping timeout: 256 seconds]
Starfoxxes has quit [Ping timeout: 260 seconds]
_ht has joined #crystal-lang
Starfoxxes has joined #crystal-lang
ur5us has joined #crystal-lang
brw has quit [Read error: Connection reset by peer]
taupiqueur1 has joined #crystal-lang
taupiqueur has quit [Ping timeout: 256 seconds]
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 252 seconds]
_ht has quit [Quit: _ht]
quazimodo has joined #crystal-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]