Home | History | Annotate | Download | only in 1.0
      1 /*
      2  * Copyright (C) 2016 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package tests.errors.syntax@1.0;
     18 
     19 // c++ keyword: error
     20 struct asm {};
     21 // java keyword: error
     22 struct transient {};
     23 // c++ collide: error
     24 struct offsetof {};
     25 struct size_t {};
     26 // hidl names: should warn
     27 struct hidl_vec{};
     28 // interface reserved: should be okay
     29 struct version{};
     30 
     31 interface IIdentifier1 {
     32     // c++ keyword: error
     33     alignof();
     34     // java keyword: error
     35     native();
     36     // c++ collide: error
     37     IMPLEMENT_REGISTER_AND_GET_SERVICE();
     38     // interface reserved: should error
     39     dump();
     40     // struct reserved: should be okay
     41     readEmbeddedFromParcel();
     42 };
     43 
     44 struct GoodStruct {
     45     // java keyword: error
     46     int32_t native;
     47     // struct reserved: should error
     48     int32_t readEmbeddedFromParcel;
     49     // interface reserved: should be okay
     50     int32_t dump;
     51 };
     52