File tree 3 files changed +18
-0
lines changed
3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -8631,6 +8631,13 @@ export class Compiler extends DiagnosticEmitter {
8631
8631
}
8632
8632
var classType = classReference . type ;
8633
8633
this . currentType = classType . nonNullableType ;
8634
+ if ( classReference . kind == ElementKind . INTERFACE ) {
8635
+ this . error (
8636
+ DiagnosticCode . Not_implemented_0 ,
8637
+ expression . range , "Interface hidden classes"
8638
+ ) ;
8639
+ return module . unreachable ( ) ;
8640
+ }
8634
8641
if ( classReference . is ( CommonFlags . ABSTRACT ) ) {
8635
8642
this . error (
8636
8643
DiagnosticCode . Cannot_create_an_instance_of_an_abstract_class ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "asc_flags" : [
3
+ ],
4
+ "stderr" : [
5
+ " AS100: Not implemented: Interface hidden classes" ,
6
+ " EOF"
7
+ ]
8
+ }
Original file line number Diff line number Diff line change
1
+ interface Foo { }
2
+ const foo : Foo = { } ;
3
+ ERROR ( "EOF" ) ;
You can’t perform that action at this time.
0 commit comments