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

Measure and symbol name clash #142

Open
panagosg7 opened this issue Feb 26, 2016 · 0 comments
Open

Measure and symbol name clash #142

panagosg7 opened this issue Feb 26, 2016 · 0 comments
Assignees
Labels

Comments

@panagosg7
Copy link
Contributor

Clash on hasProperty:

export interface Map<M extends ReadOnly, T> {
    [index: string]: T ;
}

/*@ qualif HSqualif(s: Str, v: a): hasProperty v s */
/*@ qualif EPqualif(s: Str, v: a): enumProp v s */

/*@ sum :: (array: IArray<{ (Immutable) {[s:string]:number} | hasProperty v prop }>, prop: string) => number */
export function sum(array: any[], prop: string): number {
    let result = 0;
    for (let i = 0; i < array.length; i++) {
        result += <number>(array[i][prop]);
    }
    return result;
}

/*@ hasProperty :: <M extends ReadOnly, T>(map: Map<M,T>, key: string) => { boolean | Prop(v) <=> (hasDirectProperty map key && hasProperty map key) } */
export declare function hasProperty<M extends ReadOnly, TT>(map: Map<M, TT>, key: string): boolean;
@panagosg7 panagosg7 added the bug label Feb 26, 2016
@panagosg7 panagosg7 self-assigned this Feb 26, 2016
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

1 participant