File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ import {
26
26
Function ,
27
27
Element ,
28
28
ElementKind ,
29
- Global ,
30
29
Field ,
31
- Class
30
+ Class ,
31
+ TypedElement
32
32
} from "./program" ;
33
33
34
34
import {
@@ -1218,8 +1218,8 @@ export class Flow {
1218
1218
case ExpressionId . GlobalGet : {
1219
1219
// TODO: this is inefficient because it has to read a string
1220
1220
let global = assert ( this . parentFunction . program . elementsByName . get ( assert ( getGlobalGetName ( expr ) ) ) ) ;
1221
- assert ( global . kind == ElementKind . GLOBAL ) ;
1222
- return canConversionOverflow ( ( < Global > global ) . type , type ) ;
1221
+ assert ( global . kind == ElementKind . GLOBAL || global . kind == ElementKind . ENUMVALUE ) ;
1222
+ return canConversionOverflow ( ( < TypedElement > global ) . type , type ) ;
1223
1223
}
1224
1224
1225
1225
case ExpressionId . Binary : {
Original file line number Diff line number Diff line change
1
+ {
2
+ "asc_flags" : [
3
+ ],
4
+ "stderr" : [
5
+ " AS200: Conversion from type 'i32' to 'bool' requires an explicit cast." ,
6
+ " EOF"
7
+ ]
8
+ }
Original file line number Diff line number Diff line change
1
+ enum Bar {
2
+ Baz
3
+ }
4
+
5
+ function foo ( ) : boolean {
6
+ return Bar . Baz ;
7
+ }
8
+
9
+ foo ( ) ;
10
+
11
+ ERROR ( "EOF" ) ;
You can’t perform that action at this time.
0 commit comments