File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -7832,10 +7832,10 @@ export class Compiler extends DiagnosticEmitter {
7832
7832
7833
7833
if ( typeParameterNodes !== null && typeParameterNodes . length != 0 ) {
7834
7834
this . error (
7835
- DiagnosticCode . Expected_0_arguments_but_got_1 ,
7836
- expression . range , typeParameterNodes . length . toString ( ) , "0"
7835
+ DiagnosticCode . Type_argument_expected ,
7836
+ expression . range
7837
7837
) ;
7838
- return module . unreachable ( ) ;
7838
+ break ; // also diagnose 'not a value at runtime'
7839
7839
}
7840
7840
7841
7841
let functionInstance = this . resolver . resolveFunction (
@@ -7856,10 +7856,10 @@ export class Compiler extends DiagnosticEmitter {
7856
7856
}
7857
7857
}
7858
7858
this . error (
7859
- DiagnosticCode . Expression_refers_to_a_static_element_that_does_not_compile_to_a_value_at_runtime ,
7859
+ DiagnosticCode . Expression_does_not_compile_to_a_value_at_runtime ,
7860
7860
expression . range
7861
7861
) ;
7862
- return this . module . unreachable ( ) ;
7862
+ return module . unreachable ( ) ;
7863
7863
}
7864
7864
7865
7865
private compileInstanceOfExpression (
@@ -9207,7 +9207,7 @@ export class Compiler extends DiagnosticEmitter {
9207
9207
}
9208
9208
}
9209
9209
this . error (
9210
- DiagnosticCode . Expression_refers_to_a_static_element_that_does_not_compile_to_a_value_at_runtime ,
9210
+ DiagnosticCode . Expression_does_not_compile_to_a_value_at_runtime ,
9211
9211
expression . range
9212
9212
) ;
9213
9213
return this . module . unreachable ( ) ;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export enum DiagnosticCode {
48
48
_0_keyword_cannot_be_used_here = 230 ,
49
49
A_class_with_a_constructor_explicitly_returning_something_else_than_this_must_be_final = 231 ,
50
50
Property_0_is_always_assigned_before_being_used = 233 ,
51
- Expression_refers_to_a_static_element_that_does_not_compile_to_a_value_at_runtime = 234 ,
51
+ Expression_does_not_compile_to_a_value_at_runtime = 234 ,
52
52
Importing_the_table_disables_some_indirect_call_optimizations = 901 ,
53
53
Exporting_the_table_disables_some_indirect_call_optimizations = 902 ,
54
54
Expression_compiles_to_a_dynamic_check_at_runtime = 903 ,
@@ -237,7 +237,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string {
237
237
case 230 : return "'{0}' keyword cannot be used here." ;
238
238
case 231 : return "A class with a constructor explicitly returning something else than 'this' must be '@final'." ;
239
239
case 233 : return "Property '{0}' is always assigned before being used." ;
240
- case 234 : return "Expression refers to a static element that does not compile to a value at runtime." ;
240
+ case 234 : return "Expression does not compile to a value at runtime." ;
241
241
case 901 : return "Importing the table disables some indirect call optimizations." ;
242
242
case 902 : return "Exporting the table disables some indirect call optimizations." ;
243
243
case 903 : return "Expression compiles to a dynamic check at runtime." ;
Original file line number Diff line number Diff line change 43
43
"'{0}' keyword cannot be used here." : 230 ,
44
44
"A class with a constructor explicitly returning something else than 'this' must be '@final'." : 231 ,
45
45
"Property '{0}' is always assigned before being used." : 233 ,
46
- "Expression refers to a static element that does not compile to a value at runtime." : 234 ,
46
+ "Expression does not compile to a value at runtime." : 234 ,
47
47
48
48
"Importing the table disables some indirect call optimizations." : 901 ,
49
49
"Exporting the table disables some indirect call optimizations." : 902 ,
You can’t perform that action at this time.
0 commit comments