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

Less than awesome error message for '$x ?? $y :: $z' #2000

Closed
p6rt opened this issue Aug 2, 2010 · 4 comments
Closed

Less than awesome error message for '$x ?? $y :: $z' #2000

p6rt opened this issue Aug 2, 2010 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Aug 2, 2010

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

Searchable as RT76926$

@p6rt
Copy link
Author

p6rt commented Aug 2, 2010

From @cosimo

The old expression​:

  $condition ?? $x :​: $y

is now​:

  $condition ?? $x !! $y

except it took me a long time to find out.
The error message if you write

  say $condition ?? "True" :​: "False";

is​:

  ===SORRY!===
  Confused at line 9, near "say $condi"

which is less than awesome.

--
Cosimo

@p6rt
Copy link
Author

p6rt commented Aug 2, 2010

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

@p6rt
Copy link
Author

p6rt commented May 2, 2011

From @tadzik

On Mon Aug 02 04​:27​:36 2010, cosimo@​streppone.it wrote​:

The error message if you write

say $condition ?? "True" :​: "False";

is​:

===SORRY\!===
Confused at line 9, near "say $condi"

which is less than awesome.

1202 tadzik | rakudo​: my $condition = "perfect"; say $condition ??
  | "True" :​: "False";
1202 +p6eval | rakudo 6ca614​: OUTPUT«===SORRY!===â�¤Please use !! rather
  | than :​: at line 22, near "​:: \"False\""â�¤Â»
1202 tadzik | std​: my $condition = "perfect"; say $condition ?? "True"
  | :​: "False";
1202 +p6eval | std 9f27365​:
  | OUTPUT«?[31m===?[0mSORRY!?[31m===?[0mâ�¤Please use !!
  | rather than :​: at /tmp/DtIIuqUDKd line 1​:â�¤------> ?[32m=
  | "perfect"; say $condition ?? "True" :?[33mâ��?[31m​:
  | "False";?[0mâ�¤ expecting any of​:â�¤
  | coloncircumfixâ�¤ signatureâ�¤Parse failedâ�¤FAILED 00​:01
  | 116mâ�¤Â»

Seems fixed now.

@p6rt
Copy link
Author

p6rt commented May 2, 2011

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

@p6rt p6rt closed this as completed May 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant