File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7682,7 +7682,10 @@ export class Compiler extends DiagnosticEmitter {
7682
7682
: module . i32 ( i64_low ( offset ) ) ;
7683
7683
}
7684
7684
}
7685
- assert ( false ) ;
7685
+ this . error (
7686
+ DiagnosticCode . Expression_refers_to_a_static_element_that_does_not_compile_to_a_value_at_runtime ,
7687
+ expression . range
7688
+ ) ;
7686
7689
return this . module . unreachable ( ) ;
7687
7690
}
7688
7691
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export enum DiagnosticCode {
50
50
A_class_with_a_constructor_explicitly_returning_something_else_than_this_must_be_final = 231 ,
51
51
Exported_generic_function_or_class_has_no_concrete_instances = 232 ,
52
52
Property_0_is_always_assigned_before_being_used = 233 ,
53
+ Expression_refers_to_a_static_element_that_does_not_compile_to_a_value_at_runtime = 234 ,
53
54
Importing_the_table_disables_some_indirect_call_optimizations = 901 ,
54
55
Exporting_the_table_disables_some_indirect_call_optimizations = 902 ,
55
56
Expression_compiles_to_a_dynamic_check_at_runtime = 903 ,
@@ -228,6 +229,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string {
228
229
case 231 : return "A class with a constructor explicitly returning something else than 'this' must be '@final'." ;
229
230
case 232 : return "Exported generic function or class has no concrete instances." ;
230
231
case 233 : return "Property '{0}' is always assigned before being used." ;
232
+ case 234 : return "Expression refers to a static element that does not compile to a value at runtime." ;
231
233
case 901 : return "Importing the table disables some indirect call optimizations." ;
232
234
case 902 : return "Exporting the table disables some indirect call optimizations." ;
233
235
case 903 : return "Expression compiles to a dynamic check at runtime." ;
Original file line number Diff line number Diff line change 43
43
"A class with a constructor explicitly returning something else than 'this' must be '@final'." : 231 ,
44
44
"Exported generic function or class has no concrete instances." : 232 ,
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
47
47
48
"Importing the table disables some indirect call optimizations." : 901 ,
48
49
"Exporting the table disables some indirect call optimizations." : 902 ,
You can’t perform that action at this time.
0 commit comments