• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

superclass constructor invocation

 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is JLS 8.8.5.1 missing an explicit constructor invocation?
ExpressionName.super( ArgumentList ) ;

new Outer() is a Primary expression. ref is an ExpressionName.
[ March 23, 2003: Message edited by: Marlene Miller ]
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per JLS 15.8 Primary Expressions, a Primary expression also includes field accesses. ref (a parameter) is accessed the same way you would access a field.
You could check out this unofficial JLS errata page, maybe you'll find something useful
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the name �ref� in the expression �ref.super()� a primary expression or an expression name?
I think �ref� is an expression name, for the following reason.
If �ref� were a primary expression, it would be one of those things listed in 15.8. So it must be a FieldAccess. If it is a FieldAccess, it has must be one of the three things listed in 15.11. Which it is not.
However, if �ref� is an expression name, it must be one of things described in 6.5.6. Since the name �ref� consists of a single identifier, it is a simple expression name 6.5.6.1. The identifier appears within the scope of a visible parameter declaration? Yes.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic