File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -631,7 +631,7 @@ export class Parser extends DiagnosticEmitter {
631
631
}
632
632
// ... | type
633
633
while ( tn . skip ( Token . Bar ) ) {
634
- let nextType = this . parseType ( tn , false , true ) ;
634
+ let nextType = this . parseType ( tn , true , false ) ;
635
635
if ( ! nextType ) return null ;
636
636
let typeIsNull = type . kind == NodeKind . NamedType && ( < NamedTypeNode > type ) . isNull ;
637
637
let nextTypeIsNull = nextType . kind == NodeKind . NamedType && ( < NamedTypeNode > nextType ) . isNull ;
Original file line number Diff line number Diff line change
1
+ export function foo ( a : aaa | bbb | ccc ) : i32 {
2
+ return 1 ;
3
+ }
4
+
5
+ export function bar ( a : i32 | u32 | f32 ) : i32 {
6
+ return 1 ;
7
+ }
8
+
9
+ export let a : i32 | u32 | f32 | null = 1 ;
Original file line number Diff line number Diff line change
1
+ export let a = 1 ;
2
+ // ERROR 100: "Not implemented: union types" in union.ts(1,36+3)
3
+ // ERROR 100: "Not implemented: union types" in union.ts(5,36+3)
4
+ // ERROR 100: "Not implemented: union types" in union.ts(9,27+10)
You can’t perform that action at this time.
0 commit comments