summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/flatten_all-features.txt17
-rw-r--r--test/passes/flatten_all-features.wast10
2 files changed, 27 insertions, 0 deletions
diff --git a/test/passes/flatten_all-features.txt b/test/passes/flatten_all-features.txt
index efcce6797..99c8cb4bb 100644
--- a/test/passes/flatten_all-features.txt
+++ b/test/passes/flatten_all-features.txt
@@ -2443,3 +2443,20 @@
(unreachable)
)
)
+(module
+ (type $none_=>_none (func))
+ (type $none_=>_funcref (func (result funcref)))
+ (func $0 (result funcref)
+ (local $0 (ref null $none_=>_none))
+ (local.set $0
+ (ref.as_non_null
+ (ref.null $none_=>_none)
+ )
+ )
+ (return
+ (ref.as_non_null
+ (local.get $0)
+ )
+ )
+ )
+)
diff --git a/test/passes/flatten_all-features.wast b/test/passes/flatten_all-features.wast
index 14da24a74..874e91572 100644
--- a/test/passes/flatten_all-features.wast
+++ b/test/passes/flatten_all-features.wast
@@ -1055,3 +1055,13 @@
)
)
)
+;; non-nullable temp vars we add must be handled properly, as non-nullable
+;; locals are not allowed
+(module
+ (type $none_=>_none (func))
+ (func $0 (result funcref)
+ (ref.as_non_null
+ (ref.null $none_=>_none)
+ )
+ )
+)