Commit Graph

1 Commits

Author SHA1 Message Date
Zoltan Somogyi
4a3e4968c9 Fix compiler abort on typeclass accesses in lambdas.
compiler/modecheck_unify.m:
    User-written lambdas always include a mode declaration. However,
    the compiler can also construct lambdas from curried calls, and these
    do not have a mode declaration. These converted, non-mode-declared
    lambdas always start out containing *only* the curried call, but
    the polymorphism transformation can insert other code before this call,
    e.g. to pick up the typeinfos and/or typeclass infos to be passed
    to that call from other typeclass infos, so don't abort if the lambda
    contains calls to the builtin predicates that do these things besides
    the original call.

tests/valid/undetermined_mode_lambda.m:
    A regression test for the bug.

tests/valid/Mmakefile:
    Enable the new test case.
2020-07-29 01:39:42 +10:00