Skip to content

Higher Order Generics: Runtime "Type Error: cannot read property ... of underfined" on type function invocation #667

Description

@lukedegruchy

Write the following higher order generics code using the production 1.2.0 Eclipse plugin:

    Set<Param> getSet<Param>(Set<Param> params, Param next) given Param satisfies Object
        => set(params.sequence().withTrailing(next));

    <Param> given Param satisfies Object => Set<Param>(Set<Param>, Param) ref = getSet;

    value mySet = ref(set{1,2,3}, 4);

Attempt to run it.

This error happens:

${ECLIPSE_WORKSPACE}/HigherOrderGenerics/modules/luke/higherOrderGenerics/1.0.0/luke.higherOrderGenerics-1.0.0.js:96
var $cf7=function($cf8,$cf9,$romevz$){return m$cdm.set($cf8.sequence().withTrailing($cf9,{Other$withTrailing:$romevz$.Param$getSet}),undefined,{Element$set:$romevz$.Param$getSet});};
                                                                                                                     ^

TypeError: Cannot read property 'Param$getSet' of undefined
    at Number.$cf7 (${ECLIPSE_WORKSPACE}/HigherOrderGenerics/modules/luke/higherOrderGenerics/1.0.0/luke.higherOrderGenerics-1.0.0.js:96:118)
    at c2 (${Eclipse.app}/Contents/Eclipse/plugins/com.redhat.ceylon.dist.repo_1.2.0.v20151028-2216/repo/ceylon/language/1.2.0/ceylon.language-1.2.0.js:690:10)
    at runStreamStuff (${ECLIPSE_WORKSPACE}/HigherOrderGenerics/modules/luke/higherOrderGenerics/1.0.0/luke.higherOrderGenerics-1.0.0.js:99:10)
    at [eval]:1:358
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:435:26)
    at node.js:576:27
    at doNTCallback0 (node.js:417:9)
    at process._tickCallback (node.js:346:13)
ceylon run-js: Node process exited with non-zero exit code: 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions