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

Passing files on the command line in a different order produces different errors #1954

Closed
JsonFreeman opened this issue Feb 6, 2015 · 1 comment
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created

Comments

@JsonFreeman
Copy link
Contributor

This bug is very similar to #1953.

0.ts:

///<reference path="1.ts"/>
///<reference path="2.ts"/>
var i: A | B;
var param: any;
i.foo(param); // May or may not produce an error

1.ts:

///<reference path="0.ts"/>
///<reference path="2.ts"/>
interface A {
    foo(): string;
}

2.ts:

///<reference path="0.ts"/>
///<reference path="1.ts"/>
interface B {
    foo(x?): string;
}

These three files form a clique because they all reference each other. If you pass any subset of these files on the command line, you may observe different output depending on which one is first. If you pass 0.ts or 1.ts first, you can an error. If you pass 2.ts first, you get no error.

@JsonFreeman JsonFreeman added the Bug A bug in TypeScript label Feb 6, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Apr 22, 2015

this looks like a dupe of #1953

@mhegazy mhegazy closed this as completed Apr 22, 2015
@mhegazy mhegazy added the Duplicate An existing issue was already created label Apr 22, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants