Skip to content

Commit

Permalink
add tests for rakudo#2965
Browse files Browse the repository at this point in the history
This will segfault until it's built on MoarVM/MoarVM#1116
  • Loading branch information
kazcw committed Jun 8, 2019
1 parent bd2ceef commit 0319e7a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/04-nativecall/23-incomplete-types.t
@@ -0,0 +1,20 @@
use v6;

use MONKEY-SEE-NO-EVAL;

use lib <lib>;
use NativeCall :TEST;
use Test;

plan 6;

for (<CUnion CStruct CPPStruct>) {
# test the stub case
my $b = (class Stub is repr('CStruct') { has int32 $.whatever; }
class Oops is repr(, $_, ) { HAS Stub $.stubby; }).join(');
throws-like { EVAL $b }, Exception, :message ~~ /inline.*before.*definition/;

# self-inlining should fail the same way
my $bad = ('class Oops is repr(', $_, ') { HAS Oops $.more; }').join(');
throws-like { EVAL $bad }, Exception, :message ~~ /inline.*before.*definition/;
}

0 comments on commit 0319e7a

Please sign in to comment.