Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lukedegruchy opened this issue Nov 3, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@lukedegruchy
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants