haxetink / tink_pure

Pure immutable data.
MIT License
10 stars 7 forks source link

Pattern matching a Vector hangs the compiler #18

Open kevinresol opened 3 years ago

kevinresol commented 3 years ago
class Main {
    static function main() {
        final v:tink.pure.Vector<Int> = [1,2];
        switch v {
            case [1,2]: true;
            case _: false;
        }
    }
}

with -v:

...
Typing macro tink.pure._Vector.Vector_Impl_._new
Typing macro tink.pure._Vector.Vector_Impl_.unwrap
Typing macro tink.pure._Vector.Vector_Impl_.get
Typing macro tink.pure._Vector.Vector_Impl_.map
Typing macro tink.pure._Vector.Vector_Impl_.filter
Typing macro tink.pure._Vector.Vector_Impl_.sorted
Typing macro tink.pure._Vector.Vector_Impl_.concat
Typing macro tink.pure._Vector.Vector_Impl_.lconcat
Typing macro tink.pure._Vector.Vector_Impl_.fromVector
Typing macro tink.pure._Vector.Vector_Impl_.fromArray
Typing macro tink.pure._Vector.Vector_Impl_.fromMutable
Typing macro tink.pure._Vector.Vector_Impl_.fromIterable
Typing macro tink.pure._Vector.Vector_Impl_.toArray
Typing macro tink.pure._Vector.Vector_Impl_.ofAny
Typing macro tink.pure._Vector.Vectorlike_Impl_.ofSingle
Calling macro tink.pure._Vector.Vector_Impl_.ofAny (src/Main.hx:5)
Exiting macro tink.pure._Vector.Vector_Impl_.ofAny
Typing tink.pure._Vector.Vector_Impl_._new
kevinresol commented 3 years ago

Guess this is related to https://github.com/HaxeFoundation/haxe/issues/8012

back2dos commented 3 years ago

Seems this was caused here: https://github.com/haxetink/tink_pure/commit/651a254367ec6ba54d58aa88c66f720ed46bfe28#diff-cefb27c151c8992f75ee3147097fe7d56cb7303aa5e2335d01385fa674aa1296R44-R57