Skip to content

Conversation

ahejlsberg
Copy link
Member

Fixes #344.

@ahejlsberg
Copy link
Member Author

@danquirk @RyanCavanaugh The new test in this commit is intended to check that the compiler correctly resolves extensionless comments. However, I suspect the test harness passes all of the file names to the compiler, so resolution is only partially checked. What's the best way to do this?

errors.push(createFileDiagnostic(refFile, start, length, Diagnostics.File_0_not_found, filename));
else {
if (!(findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) {
errors.push(createFileDiagnostic(refFile, start, length, Diagnostics.File_0_not_found, filename + ".ts"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message is a bit misleading since it says only about failed attempt to find .ts file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but honestly not worth it to add another error message.

@vladima
Copy link
Contributor

vladima commented Aug 5, 2014

👍

1 similar comment
@mhegazy
Copy link
Contributor

mhegazy commented Aug 5, 2014

👍

ahejlsberg added a commit that referenced this pull request Aug 5, 2014
Support extensionless <reference> comments.
@ahejlsberg ahejlsberg merged commit afeabe8 into master Aug 5, 2014
@ahejlsberg ahejlsberg deleted the extensionlessReferences branch August 5, 2014 22:02
@danquirk
Copy link
Member

danquirk commented Aug 5, 2014

@ahejlsberg you'll probably want to add a project test for this since that more closely matches the end to end compiler pipeline with resolution and emit. You add a specification for the test in tests/cases/project and then accompanying sources in tests/cases/projects.

@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New compiler does not support extensionless <reference> comments
5 participants