Skip to content

Commit 3426b48

Browse files
Add more invalid type checks
1 parent d84cbb4 commit 3426b48

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

flang/test/Fir/invalid-types.fir

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ func.func private @mem3() -> !fir.ref<>
104104

105105
// -----
106106

107+
// expected-error@+1 {{expected non-function type}}
108+
func.func private @mem3() -> !fir.ref<, volatile>
109+
110+
// -----
111+
107112
// expected-error@+1 {{expected ':'}}
108113
func.func private @arr1() -> !fir.array<*>
109114

@@ -164,5 +169,10 @@ func.func private @upe() -> !fir.box<!fir.class<none>>
164169

165170
// -----
166171

172+
// expected-error@+1 {{invalid element type}}
173+
func.func private @upe() -> !fir.box<!fir.class<none>, volatile>
174+
175+
// -----
176+
167177
// expected-error@+1 {{invalid element type}}
168178
func.func private @upe() -> !fir.class<!fir.box<i32>>

0 commit comments

Comments
 (0)