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

Function type alias (typedef) is not a constant #11592

Closed
scheglov opened this issue Jun 28, 2013 · 7 comments
Closed

Function type alias (typedef) is not a constant #11592

scheglov opened this issue Jun 28, 2013 · 7 comments
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). closed-obsolete Closed as the reported issue is no longer relevant type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@scheglov
Copy link
Contributor

language/first_class_types_constants_test


12.1 Constants

 * An identi er expression that denotes a constant variable or a class.



15.3.1 Typedef

The e�ect of a type alias of the form typedef T id(T1 p1; : : : ; Tn pn;[Tn+1
pn+1; : : : ; Tn+k pn+k]) declared in a library L is is to introduce the name id into
the scope of L, bound to the function type (T1; : : : ; Tn;[Tn+1 pn+1; : : : ; Tn+k
pn+k]) ! T. The e�ect of a type alias of the form typedef T id(T1 p1; : : : ; Tn
pn;fTn+1 pn+1; : : : ; Tn+k pn+kg) declared in a library L is is to introduce the
name id into the scope of L, bound to the function type (T1; : : : ; Tn;fTn+1
pn+1; : : : ; Tn+k pn+kg) ! T.


As I can see, typedef (form for type alias) does not declare class.
So, it is not a constant.

@ricowind
Copy link
Contributor

cc @kasperl.
cc @peter-ahe-google.

@larsbak
Copy link

larsbak commented Aug 28, 2013

Removed this from the M6 milestone.
Added this to the M7 milestone.

@kasperl
Copy link

kasperl commented Jun 4, 2014

Removed this from the M7 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@scheglov scheglov added Type-Defect area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). labels Aug 4, 2014
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@natebosch
Copy link
Member

What is the expected action here?

@scheglov scheglov added the closed-obsolete Closed as the reported issue is no longer relevant label Sep 6, 2018
@scheglov
Copy link
Contributor Author

scheglov commented Sep 6, 2018

The spec has been updated since then to include type aliases into constants.
image

So, the test is OK now.

@scheglov scheglov closed this as completed Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). closed-obsolete Closed as the reported issue is no longer relevant type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

6 participants