Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bogus nominal type check error when creating a variable of typed with a subtype in Rakudo #1676

Closed
p6rt opened this issue Apr 10, 2010 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 10, 2010

Migrated from rt.perl.org#74234 (status was 'resolved')

Searchable as RT74234$

@p6rt
Copy link
Author

p6rt commented Apr 10, 2010

From @masak

<masak> rakudo​: subset A of Mu; my A $x
<p6eval> rakudo 43f865​: OUTPUT«Nominal type check failed for parameter
'$original'; expected Any but got Mu instead [...]
* masak submits rakudobug

Note the leaked '$original' variable name above, suggestion that it's
some internal nominal type check that doesn't quite work.

@p6rt
Copy link
Author

p6rt commented May 29, 2010

From @jnthn

On Sat Apr 10 14​:22​:26 2010, masak wrote​:

<masak> rakudo​: subset A of Mu; my A $x
<p6eval> rakudo 43f865​: OUTPUT«Nominal type check failed for parameter
'$original'; expected Any but got Mu instead [...]
* masak submits rakudobug

Note the leaked '$original' variable name above, suggestion that it's
some internal nominal type check that doesn't quite work.

Now seems this works fine (think it was fixed a bit ago, and the ticket
got missed).

subset A of Mu; my A $x
Mu()

Giving to moritz++ for spectests.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented May 29, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 30, 2010

From @moritz

It works in mainline code, and in eval, but fails in eval_lives_ok.

I have no idea if this is a problem with eval_lives_ok or with the
subtype declaration; until I find out I'm leaving this ticket open.

@p6rt
Copy link
Author

p6rt commented May 30, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S02-polymorphic_types/subset.t

commit 9a1f88b25b604943dc10d6e6fa3f92ade1fcac12
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun May 30 15​:25​:11 2010 +0000

  [t/spec] test for RT #​74234
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;30998 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S02-polymorphic_types/subset.t b/t/spec/S02-polymorphic_types/subset.t
index 872d703..b9d9e4b 100644
--- a/t/spec/S02-polymorphic_types/subset.t
+++ b/t/spec/S02-polymorphic_types/subset.t
@@ -1,6 +1,6 @@
 use v6;
 use Test;
-plan 32;
+plan 33;
 
 =begin description
 
@@ -141,4 +141,11 @@ eval_dies_ok 'my Digit $x = 3.1',
     ok 4 !~~ sY, 'and if nominal type check fails, it is False';
 }
 
+# RT #74234
+{
+    #?rakudo todo 'RT 74234'
+    eval_lives_ok 'subset A of Mu; my A $x = 23;',
+        'subset A of Mu + type check and assignment works';
+}
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Oct 21, 2011

From @coke

On Sun May 30 08​:25​:28 2010, moritz wrote​:

It works in mainline code, and in eval, but fails in eval_lives_ok.

I have no idea if this is a problem with eval_lives_ok or with the
subtype declaration; until I find out I'm leaving this ticket open.

Looks like this test is being run and passing. Closing ticket.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 21, 2011

@coke - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 21, 2011
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant