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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in diagnostic template info #32662

Closed
cRAN-cg opened this issue Sep 13, 2019 · 4 comments

Comments

@cRAN-cg
Copy link
Contributor

commented Sep 13, 2019

馃悶 bug report

Affected Package

The issue is caused by package @angular/compiler-cli

Is this a regression?

No

Description

When a variable is not defined in a template context the diagnostic offset span pushes the error as

The template context does not defined a member called
instead it should be
The template context does not define a member called

馃敟 Exception or Error


The template context does not defined a member called

馃實 Your Environment

Angular Version:




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / 鈻 \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.0.0-beta.15
Node: 10.16.0
OS: darwin x64
Angular: undefined
... 

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-beta.15
@angular-devkit/build-optimizer   0.800.0-beta.15
@angular-devkit/core              8.0.0-beta.15
@angular-devkit/schematics        8.0.0-beta.15
@angular/bazel                    0.0.0
@angular/cli                      8.0.0-beta.15
@schematics/angular               8.0.0-beta.15
@schematics/update                0.800.0-beta.15
rxjs                              6.4.0
typescript                        3.5.3
webpack                           1.12.9

Anything else relevant?

@cRAN-cg

This comment has been minimized.

Copy link
Contributor Author

commented Sep 13, 2019

I would like to work on it.

@cRAN-cg cRAN-cg closed this Sep 13, 2019
@cRAN-cg cRAN-cg reopened this Sep 13, 2019
@cRAN-cg

This comment has been minimized.

Copy link
Contributor Author

commented Sep 13, 2019

Sorry for the closing it.

@ngbot ngbot bot added this to the needsTriage milestone Sep 13, 2019
@gkalpak

This comment has been minimized.

Copy link
Member

commented Sep 13, 2019

Good catch, @cRAN-cg 馃憤
Feel free to go ahead and submit a pull request 馃槈

@cRAN-cg

This comment has been minimized.

Copy link
Contributor Author

commented Sep 13, 2019

@gkalpak While going through the tests of language-service I found that the error message for implicit context reference


    describe('in ngIf', () => {
      function expectError(locationMarker: string, message: string) {
        expectSemanticError('app/ng-if-cases.ts', locationMarker, message);
      }
      it('should report an implicit context reference', () => {
        expectError(
            'implicit', 'The template context does not defined a member called \'unknown\'');
      });
    });

is different than that defined in the compiler-cli


if (ast.value === '$implicit') {
          this.reportError(
              'The template context does not have an implicit value', spanOf(ast.sourceSpan));
        }

I was wondering if you could advise me on the same too.

cRAN-cg added a commit to cRAN-cg/angular that referenced this issue Sep 15, 2019
test(language-service): fix typo in diagnostic template info.

Fixes angular#32662
cRAN-cg added a commit to cRAN-cg/angular that referenced this issue Sep 15, 2019
test(language-service): fix typo in diagnostic template info.

Fixes angular#32662
cRAN-cg added a commit to cRAN-cg/angular that referenced this issue Sep 16, 2019
@kara kara closed this in f6d6667 Sep 16, 2019
kara added a commit that referenced this issue Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.